[Looking for Charlie's main web site?]

Here's what I think of CF8...what do you think?

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
I don't know if that title sounds controversial (I don't mean it to), but if anyone indeed would like to hear my take on CF8, you can check out a couple page interview I did with Michael Smith (of CFUnited and TeraTech fame), which was posted yesterday on the CFUnited site.

I don't know if it's what most may expect. I don't recount all the new features, nor do I pontificate even about the marquis ones. Rather, I focus on some areas of interest for me (and others), and I offer several resources for finding additional info that I hope readers will find useful (and perhaps uncommon).

Interviews are often challenging: where do you draw the line in discussing a topic? and how do you guide the interview to say all that you might? and what might you say with just a little more time?

Please let me know what you think, here, whether you learn something, or think I forgot something important.

How would you run code against multiple CF versions at once using IIS on XP?

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
If you use IIS on XP, have you ever wished you could put your code in one directory and run it against different versions of CF, easily. In this note, I show you how.

Someone asserted on a list that some code failed as of CF8, but I tested it against 8, 7, 6, and 5, and it worked the same in all. Hearing that, someone else asked, "Charlie, are you running all those on the same machine or on vmware?"

I assume that the reader, like many, is using IIS on XP, which doesn't let you have more than one web site, which might seem to make it impossible, though some may know the tricks I'll mention.

Of course, folks running on Apache, or IIS on Win2k3 or Win2k Server, would just say, "create different web sites, and install each CF version into a different web site".

Fair enough, but how do you solve this using IIS on XP (or Wink2 workstation), if you can't have multiple sites? That's what I explain below.

Before I go on, though, let me make an important for those who may not be aware: you certainly can run multiple versions of CF on a single machine. They each get installed in their own directories, with their own JVM (as of CF6). The challenge is just to avoid port conflicts and external web server conflicts.

But why not just use the built-in web server?

Sure, if you use the built-in web server available in CFMX since 6, then you can indeed run multiple CF versions each with their own web docroot without conflict.

But that's not the point here. That would cause each CF instance to have its own wwwroot, and you'd have to put your code there to run it on that version.

And I have even explained in a recent blog entry that you can get around that using virtual mappings in the JRun web server, pointing to the shared document directory. But sometimes you really want to use IIS for some reason, or you just don't want to have to remember to use the right port and virtual directory name configured for the built-in web server.

But you can have multiple web sites in XP, if you know how...

Yep, some will want to note that you can indeed create multiple web sites in XP, if you use the right tools. I've written about such tools before. It's just that you can't run them at once, so you have to enable/disable each time you want to run the test. To me, that more of a hassle than just doing the one-time configuration which I discuss below.

So how do you configure things using IIS on XP?

OK, I hope I've headed off complaints some may have. Oh, well, I should add one more: what I'm about to show you is definitely not supported by Adobe. Some might even argue against doing it. Certainly, if you have problems with things while trying to work this way, they're going to tell you to use a vanilla setup.

Still, it's worked for me for years. In fact, I first wrote about it in a CFDJ article back in Sep 03 (co-authored with Jeff Houser). That was written in the timeframe of people moving from CF5 to CFMX and wanting to set things up this way, but the concept still applies even for those moving from 7 to 8, or 6 to 7. It also mentioned using the same approach for running against BD as well, which means it would apply also to Railo and Smith, etc.

Finally, since writing that article, I've also realized a few things I could have added to the article, which further motivates me writing this entry.

How I set things up

So, as explained in the article (which shows you the actual steps in IIS), I configure different IIS virtual directories called _cf5, _cf6, _cf7, and _cf8. I set each to points their CFM extension (and related CF ones) to the appropriate web server extension that would be used if I'd configured each server to work with IIS (like C:\CFusion\BIN\ISCF.DLL for 5, C:\CFusionMX\runtime\lib\wsconfig\1\jrun.dll for 6, and so on).

More important, I have them all point at the same, single document root (in my case, c:\inetpub\wwwroot). That allows me to then run code in that single directory against different editions, using a url like http://localhost/_cf5/somefile.cfm, or http://localhost/_cf7/somefile.cfm, or the default http://localhost/somefile.cfm goes against CF8.

Note that you must run the web server connector for each CF edition from CFMX and above, since it only builds those jrun.dlls (I mentioned above) if you do that. See the CF docs ("Installing and Configuring ColdFusion" to learn how to run that, even after CF is installed, if you installed it using the built-in web server instead.

Before you do, though, as explained in the article, be sure to save off the path to the DLL for .cfm file extensions, as running the configuration tool will wipe over the previous path.

Some concerns using the CF Admin in this setup

There's something else to take note of about using the CF Admin (/cfide/administrator/index.cfm) when you set things up this way.

It has to do with whether, when you install each version, you tell CF to install using the built-in web server or using IIS.

In the former case, CF will put that version's CFIDE directory (and all its related files) into the wwwroot for that built-in CF server, such as c:\coldfusion8\wwwroot\ for CF8, or c:\cfusionmx7\wwwroot\ for CF7.

In the latter case (if you tell CF during installation to use IIS), then CF will place those files into the IIS docroot you name. Assuming you would always choose that c:\inetpub\wwwroot directory, that means that its CFIDE directory will be replaced with whatever is the last CF version you install.

And that means that even if using the virtual directories above, they'll all point to the last CFIDE version, which won't work (the CF Admin can only run in the version for which it's created).

Either way, you can solve this by creating yet another virtual directory, for CFIDE, inside the version-specific virtual directories above.

So if during the installation of 6, 7, or 8 you told CF to use the built-in web server, you'd point the new CFIDE virtual directory to the builtin web server's CFIDE. For my _CF6, for instance, I'd create a CFIDE virtual directory within that to point at c:\cfusionmx\wwwroot\CFIDE.

If instead you choose to install each version using IIS, then just as you needed to save off the file extension's path to the web server DLL, you would similarly need to remember before each install to save off a copy the CFIDE directory for the previous release. This is especially key for CF5, since there is no concept of a built-in web server for that.

Back when I installed CFMX 6, before doing so, I copied the CFIDE directory to call it CFIDE5 instead. (Sure, you could do a rename, but only JUST before you installed, in case you need it.) Then I created the CFIDE VD within the _CF5 VD to point to that.

It may be worth noting here that if you do install CF 6/7/8 using the built-in web server initially, and then use the web server configurator tool to then connect them to IIS, that does not move the CFIDE from the built-in web server root to the IIS docroot. So again you will need to point your CFIDE virtual directory to that CFIDE in the built-in web server.

Why not just use the built-in web server for the CF Admin?

Of course, you could just use the built-in web server to access the Admin instead, even if you are otherwise running code via IIS.

And going back to the original writer, you could indeed also do this using VMWARE. (I've written about how versions of it and Virtual PC are now free.) It might be overkill, though. Again, you don't need to worry about running multiple versions of CF on a single server. It's all just about avoiding port conflicts and potential external web server conflicts.

That's what this has been about all about: how to run all your code via IIS against multiple version of CF, all from a single directory.

Conclusion

Did this help you? Let me know. Did I forget something? Got a complaint? (People seem to love that opportunity. Go for it.) I hope it has helped some of you. It's certainly helped me, and others who I've shown it to.

I'll be teaching Fast Track to CF next week, and in October

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
If you know anyone seeking training in ColdFusion, I've been teaching the "FastTrack to ColdFusion" class again for the past year, on a contract basis with EchoEleven in Atlanta.

If you know anyone in the Atlanta area interested in that class, I'll be teaching it next week, Aug 28-30 and Oct 16-18. For more details on the Fast Track course (its topics, the location, costs, and more), see their site for the FTCF class.

To register, as well as to see future dates if you find this entry later, see Echo Eleven's page for the CF class schedule. Check out the disinctives about EchoEleven's Adobe training.

Come let me share my 10 years experience in using CF. I get consistently high rankings, and I try to share a lot more than just what's in the materials, reaching a wide range of students with or without CF experience (though, again, it is first and foremost an introductory class).

Main CF page now makes free CF Developer Edition more prominent

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
If you haven't noticed, the main CF page now makes more prominent the availability of the free Developer edition. Woo hoo. :-)

I had made the suggestion to Tim, Jason, and Ben back on 7/31. I don't know if it was really my suggestion that made it happen, of course. Anyway, I felt that the new CF8 front page, which listed only the buy/upgrade/trial options, was a missed opportunity to make it clear to folks that there was indeed a free developer edition.

Many have lamented that some might never realize there was one, especially those a little skeptical or just not currently fans. Sure, the availability was listed on the downloads and product editions pages, but what if such folks never took that step?

So, it's a move in the right direction, and thanks for listening (to whoever), Adobe! Let's hope more newcomers notice it. (BTW, the arrow in the screenshot at left is of my own adding. It's not on the Adobe site!)

Resources for getting a much greater understanding of the SQL Server query plan/procedure cache

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Ever wanted to understand the SQL Server query plan/procedure cache better? It can be vital to good performance of SQL statements, especially with respect to the concept of "bind variables" or "parameterized queries" (using CFQUERYPARAM in a CFML context, or Parameters.Add() in a C# context, among other ways).

Update: If you may wonder why any of this is important, see some subsequent talks I gave on the topic, that give far more context on the problem. While you rarely hear about it from others, it is a source of potentially significant problems so is worth understanding more completely. See the "My Own Talks" section at the bottom of this entry.

Yet we so often just kind of assume the database will do what's best. Or we blindly use (or recommend use of) bind variables without fully understanding why, nor understanding some implications when it may not always be such a good idea.

And did you know that if you can't (or don't) change your code to cause parameterization, did you know that the database can do it for you, either automatically in some simple cases, or by way of an enforced parameterization, either for an entire table of for queries that meet certain "plan guides"? There are many implications to understand in all this.

And how do you track the plan cache (using DMVs, the profiler, perfmon)? And how does it work (allocation of memory, flushing the cache automatically or manually)?

Fortunately, I've found many great resources to help you understand, and I've not found them listed (all together) anywhere else yet.

The info applies to 2005, 2000, and 7, though some aspects may differ, as the resources indicate. (There are even substantive changes in 2005 SP2 that are important to note over the RTM and SP1 releases.)

Huge Plan Caching Article Series by MS Engineers

First, I'll point out that some MS engineers have put together a long and very resourceful series of article-length blog posts on the topic, with explanations, code, demos, troubleshooting techniques, and lots more.

They do kindly offer a "table of contents" page listing all the topics covered, with bullet points about topics within each entry.

Sadly, that page doesn't offer URLs to the articles, nor have any that I found there, nor do the articles link to each other. You can dig around and find the URLs, even finding a category page that lists them in rather random order. But I've looked around the web and can't find any page that lists them all with their links, in order, so here you go:

  1. Structure of the Plan Cache and Types of Cached Objects (original URL)
  2. Sql_Handle and Plan_Handle Explained (Original URL)
  3. How Cache Lookups Work
  4. Query Parameterization
  5. Retrieving Query Plans from Plan Cache DMV's
  6. Best Programming Practices
  7. Costing Cache Entries
  8. Factors that affect Batch Cache-ability
  9. Memory Pressure Limits
  10. Plan Cache Flush
  11. Temporary Tables, Table Variables and Recompiles
  12. Plan Cache Trace Events and Performance

They also offer a series of extensions to that, on troubleshooting:

Chapter in "Practical SQL Server 2005 Troubleshooting" book

Next, I'd point out that one of the contributors to that, Bart Duncan, is a Microsoft Support engineer who I saw speak on the topic at the SQL Server PASS 2006 conference, where I first learned a lot of this info.

He identified then that a lot of the info was in a chapter of a new book, SQL Server 2005 Practical Troubleshooting: The Database Engine, which I've since gotten and was indeed very useful.

If you're a member of the O'Reilly Safari service (or join for their trial), you can find the chapter online.

Of course, both the talk and the book came out before the article series above, and certainly before SP2, so I would recommend you consider both. (I've not yet done a comparison to determine what may be in the chapter that's not in the articles.)

SQL Server BooksOnline

Of course, it always pays to read the docs, and there are indeed some discussions of this concept and related features in the SQL Server Books Online, but I honestly found the info above either easier to find or just more complete.

My Own Talks

I've made my own attempts to communicate some of this info myself in a couple of talks I've given to both CFML and SQL Server audiences:

But really, there is just too much to communicate in any one hour. If this topic seems of interest, take a few hours to digest all the above. I think you'll be AMAZED at what you learn.

Did you know that Aptana supports Javascript debugging?

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
A lot of folks are high on Aptana, which is a plug-in for Eclipse that works as a nice adjunct to CFEclipse, since it adds nice support for working with HTML, CSS, and JavaScript files.

One thing I've not seen mentioned often is that it supports Javascript Debugging (at least in Firefox, and soon in IE). For more info, see:

http://aptana.com/docs/index.php/About_the_JavaScript_debugger

For those still relatively new to Aptana, this is one of many topics discussed in a "Getting to Know Aptana" guide on the site:

http://aptana.com/docs/index.php/Getting_to_know_the_Aptana_IDE_%28General_IDE_Concepts%29

Livedocs for CF8: They're here, they're faster, with commenting working, and more

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
I want to share some news with those who may have noticed recent challenges with the Adobe LiveDocs, especially for CF8, and a challenge in commenting in them. All is resolved now. I've been working in the background with the Adobe gent in charge of this (who may prefer I don't share his name) and he's been great about attending to and resolving these. There's also good news: they seem faster (to me) than the CF7 livedocs.

First, you CAN now get to the livedocs...

As some noticed, there was a brief time in recent days when you couldn't get to the livedocs at all (for CF8 or otherwise). You'd get stuck in a loop on a main docs page. That's since been fixed.

But note that you may need to take a (good) detour...

But about that "main docs page", yep, it's worth noting that trying to go livedocs.adobe.com will no longer send you to the livedocs front page but rather will go instead to a new page I'll call the main Adobe docs page.

There, you have to pick which doc you want to see from a select control, and further the page you're taken to offers both a link to the livedocs and to the PDF docs. (It was the link from there to the livedocs that was broken last week, sending you right back to this page.)

Now, some may be annoyed that they get sent here. I just want to get to the livedocs. Well, if you know the URL for your product, you can, such as for CF8 or CF7.

There's more than the livedocs: PDF; and the print versions you can buy

But I do myself like that they've sent people to the main docs page first, if they don't know a short-cut. So many people never knew of the PDFs. They're nice to have sometimes.

Also, that page offers a link to the printed docs (for now, only the CF7 docs are for sale, as the CF8 docs may not be available until late August).

I've blogged about buying the printed docs before. I think for many it's the best $50 bucks they'll spend for 2500 pages of content.

New look for the CF8 docs...and faster

If you do go to the CF8 livedocs, you'll find that they have a new look compared to the CF7 docs. Also, at least it seems to me, they're much faster.

Yes, they're still a framed interface, but that's not the end of the world--and if you need them all as one, remember the PDFs, and the HTML form available on your machine where CF is installed (C:\ColdFusion8\wwwroot\cfdocs\htmldocs on my machine).

Some docs retired...

I will point out that sadly, one book from the CF7 livedocs doesn't seem to have been updated for CF8, the "Getting Started Building ColdFusion MX Applications". Again, this was a hidden gem that I think many missed and would get great value from. If you're moving from 5 or 6 to 8, please do take time to read this 150 page guide. It's really quite good.

Also, two that were available in HTML/PDF form (not on livedocs) that also seem to have been retired are the "CFML Quick Reference" and the awesome 60-page "Migrating Applications to ColdFusion MX 7". Again, if you're skipping 7 (or used it but never really took full advantage of it), check out those docs.

And yes, Virginia, you can now make comments...

Finally, and perhaps best of all, some may have noticed if they DID get to the CF8 livedocs that for some reason, the ability to comment was gone. That, too, is finally fixed. Thanks, Randy! :-) (Doh! Ok, I'll use his first name. He knows who he is, and some of you. If he wants to speak up and identify himself, I'd welcome it.)

So get out there and start commenting away. Let's share what we learn as we pour through the CF8 docs, whether online, in print, in PDF, or in HTML.

I'll have a little more to share about the commenting system and some related features in an upcoming note.

Testing code in CF8 and earlier releases--in the same code directory

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
As folks contemplate moving to CF8 from 6 or 7, they may know that they can run these releases alongside each other--as long as you use a separate web server (or web site in servers that support it) configured to hand CFML requests to each CF server. Since CF6, CF has included a built-in web server to help with this very issue, especially on servers (like IIS on XP) where you can't have more than one site.

But what if you want to test some code in a single directory against one or more editions? Is that possible? I mean, let's say you have CF7 setup against IIS, and your code is in the c:\inetpub\wwwroot? And you've installed CF 8 for testing using its built-in web server, which runs on port 8500 (or whatever you chose) and finds its code in, for instance, c:\coldfusion8\wwwroot.

How would you have CF8 look at the code you've long had running in the IIS root? (or Apache, or a virtual directory you've setup for use by either external web server). Do you have to move the code around among these directories to test it on different versions of CF? No, you don't.

The trick is in the jrun-web.xml, which you can find in cfusionmx_home]\wwwroot\WEB-INF\jrun-web.xml . You can add a new "virtual-mapping" entry there, naming a new "alias" which points to files outside the normal CF-based wwwroot:

<virtual-mapping>
<resource-path>/inet/*</resource-path>
<system-path>C:/inetpub/wwwroot/</system-path>
</virtual-mapping>

So now a request for http://localhost:8500/inet/ will look instead in the inetpub/wwwroot, or wherever you point it.

Update: Note that when you use the resource-path, it's case-sensitive, even on Windows, so http://localhost:8500/INET/ would not be the same.

Of course, this works also if you set up CF8 to run via your built-in web server, but setup CF 7 or 6 to run on its own built-in web server. And of course, if you're savvy enough you may figure out how to run things so that you can run all 3 using an external web server.

There are a couple of potential challenges with this technique. For one thing, if your code has hard-coded references (such as hyperlinks, images, CFLOCATIONS, etc.) to either run on a particular host (without the port) or at a particular root-relative path, then this introduction of a new port or the /inet/ alias may hamper it working. That's not a "CF" problem but rather a coding one. Your stuck then.

But it certainly works well for testing individual files. I do it all the time and have for years. Indeed, I'll share, for the sake of posterity, that this modifying of the jrun-web.xml is something I first wrote about back in 2002, but many may have missed when such info was being shared.

I'm going to go back and reprise a lot of those "oldies but goodies", spread across a few different blogs I've had over the past several years. I think I'll call them "carehart classics".

My new Adobe DevNet articles on the CF8 Monitor

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
If you'd not seen it, there are a slew of new CF8 articles on the Adobe CF Developer Center, including one I've done that's the first of a 4-part series on the CF8 monitor. The first both introduces the monitor and focuses on its uses first in development:

ColdFusion 8 server monitoring - Part 1: Using the Server Monitor in development

It's 8 pages printed, so lots of info there. I hope you'll get value from it. Since there's no feedback mechanism there, I'd appreciate if you'd share comments here of what you think of it. We writers get precious little feedback on our work, most times.

For now, it's even listed as a front-page article on the CF8 Dev Center. (FWIW, note that the URLs say "devnet" while the site itself uses the phrase "Developer Center".)

Future articles in my CF8 Monitor series will focus on using the monitor in production, then using the multi-server monitor, alerts, and snapshots, and finally several miscellaneous features and tips in part 4.

I should say finally, since many know I've talked a lot about FusionReactor and SeeFusion in the past, that, no, I don't think the CF8 monitor is a death knell for those tools (nor do I think the CF8 debugger will kill off FusionDebug). There's a place for both (especially if you're not yet on 8, and even afterwards possibly), and since the monitor is only in CF8 Enterprise, that especially keeps the other monitors in the running. I've written a more complete discussion of my perspective on these things:

Scorpio Debugger and Monitor: What's it mean for FusionDebug, FusionReactor, and SeeFusion?

Now, about it being in Enterprise, that's something I couldn't say in either my past entries or even in the current article on the DevCenter, as those were all written before the final release of CF8. I'm sorry if they read as if everyone using CF8 could use them. I really had no way to say otherwise.

That said, with the CF8 monitor being free in CF8, and especially with it giving us access to some awesome new info (which even the other monitors could now provide access to), it's worth learning what's possible. There's a lot more to it than you may think.

See the other entries I've done on the monitor. Some of them have info I couldn't fit into the DevCenter articles, or that may not be published for a few weeks.

Some really cool free tools, which almost every CFer can use

Note: This blog post is from 2007. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Recently I was pointed to a useful (and free) tool from Quest (SQL Log Reader), and I noticed that I'd had a couple others already installed (Toad and Benchmark Factory). That led me to start looking into what else they had, and I was impressed with the number of free and very professional tools. It wasn't as straightforward to find them as it may seem. I thought I'd share my observations.

The range of free tools is amazing, from tools for working with databases (like Toad or Knowledge Expert for SQL Server, MySQL, or Oracle), to tools for generating load tests for databases (Benchmark Factory), to tools for managing/monitoring Windows or J2EE servers, Active Directory, and lots more.

As you review the list below, note that some of the pages show links to "evaluation" editions but I've only listed pages where I found it to say the tool was free (somewhere on the page, even if it shows an "evaluation download").

It seems some have no time limit at all (true freeware). With some, the license is time-limited and you must return for a new key (see Spotlight® on WebSphere, for instance). With others, you must uninstall and reinstall (see Object Restore for AD, for instance). I suppose it's better than a trial, in that with most trials you couldn't uninstall/reinstall. Others list a duration with no indication of whether you must uninstall (and I found one note on a forum that said you could just register for a new license key for at least one of them).

Some tools are also indicated as windows only (such as Spotlight on MySQL), but I've not paid attention here to which run on what.

The thing is, curiously, they have a page of freeware (http://www.quest.com/free-tools/) , but it doesn't list all that I've found elsewhere on the site. In fact, there's an "a-z" product page (http://www.quest.com/solutions/allproducts--atoz.asp) which indicates which are freeware, but it too does not list them all.

There were also some other Quest tools that were free in the past but are no longer, but those old versions can still be found elsewhere (sites like download.com) and though perhaps a couple of years old or more may still be useful:

I'll share more about a couple of these later.

More Entries

Copyright ©2024 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting