<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
			<channel>
			<title>Charlie Arehart&apos;s Blog - cf9</title>
			<link>http://www.carehart.org/blog/client/index.cfm</link>
			<atom:link href="http://www.carehart.org/blog/client/rss.cfm" rel="self" type="application/rss+xml" />
			<description>Charlie Arehart&apos;s Blog</description>
			<language>en-us</language>
			<lastBuildDate>Mon, 16 Aug 2010 15:55:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>blogmaster@carehart.org (Charlie Arehart)</managingEditor>
			<webMaster>blogmaster@carehart.org (Charlie Arehart)</webMaster>
			
			<item>
				<title>Coming review of &quot;ColdFusion 9 Developer Tutorial&quot; book by John Farrar, and a free chapter for you</title>
				<link>http://www.carehart.org/blog/client/index.cfm/2010/8/16/upcoming_farrar_book_and_preview_chapter</link>
				<description>
				
				Today the publisher of John Farrar&apos;s new book, &lt;a href=&quot;https://www.packtpub.com/coldfusion-9-developer-tutorial/book&quot;&gt;ColdFusion 9 Developer Tutorial&lt;/a&gt; offered to send me a review copy. I appreciate and look forward to that, as I&apos;ve heard good things about it.

I&apos;ll post a review in coming weeks after I&apos;ve had a chance to take a look.

&lt;h3&gt;Free Preview Chapter on ORM&lt;/h3&gt;
In the meantime, they have also offered for free one of the chapters in the book so you can get a taste of the book&apos;s approach. 

It&apos;s chapter 4, 
&lt;a href=&quot;https://www.packtpub.com/sites/default/files/0249-chapter-4-ORM-Database-Interaction.pdf&quot;&gt;ORM Database Interaction&lt;/a&gt;, and as you&apos;ll see John leads you gently through this important new feature of CF9. Assuming you have no prior experience with ORM, he works in 20 pages from introducing the concepts, to quickly configuring and coding, to working with relationships, and more. You&apos;ll see he uses lots of screenshots and example code. 

One editorial/review comment: I did notice that the preview chapter lists a last section to be on &quot;custom configuration&quot;, which isn&apos;t ever found in the chapter. I brought this to John&apos;s attention and he apologized that it slipped through.

Having contributed to several books myself&lt;sup&gt;*&lt;/sup&gt;, I know that can happen and I don&apos;t regard it as a big deal. It doesn&apos;t take away at all from the rest of the book.

&lt;h3&gt;Looking forward to the rest of the book&lt;/h3&gt;

As for that rest of the book, and why you may want to consider it, the introduction indicates it &quot;will teach you the basics of ColdFusion programming, basic application architecture, object reuse, and ORM concepts before showing you a range of topics including AJAX library integration, RESTful Web Services, Unit Testing, building custom tags, and his hybrid example of tags and objects COOP&quot; ... &quot;with real-world examples of the hows and whys, to
get more done faster with ColdFusion 9&quot; ...[and] &quot;also covers the new features of ColdFusion Builder and additional version 9 updates&quot;.

I&apos;m sure it will benefit many, and I&apos;ll look into all that when I get the review copy, and I&apos;ll be back to pass along my observations.

&lt;sup&gt;*&lt;/sup&gt;I&apos;m sure the publishers of my own books would think it appropriate at this point to mention those other books, which are also out recently and updated for CF9. They are the ColdFusion 9 Web Application Construction Kit, &lt;a href=&quot;http://www.amazon.com/dp/032166034X?tag=carehartorg-20&amp;camp=14573&amp;creative=327641&amp;linkCode=as1&amp;creativeASIN=032166034X&amp;adid=0KRJQ24DPGN1FJ6DRPEV&amp;&quot;&gt;Volume 1 (Getting Started)&lt;/a&gt;, &lt;a href=&quot;http://www.amazon.com/dp/0321679199?tag=carehartorg-20&amp;camp=14573&amp;creative=327641&amp;linkCode=as1&amp;creativeASIN=0321679199&amp;adid=01YXTZ3VSA04AM04TEY6&amp;&quot;&gt;Volume 2, Application Development&lt;/a&gt;, and &lt;a href=&quot;http://www.amazon.com/dp/0321679202?tag=carehartorg-20&amp;camp=14573&amp;creative=327641&amp;linkCode=as1&amp;creativeASIN=0321679202&amp;adid=0D531P0ETDYYZ1KPPQZY&amp;&quot;&gt;Volume 3, Advanced Application Development&lt;/a&gt;. 
				</description>
				
				<category>cf9</category>
				
				<category>general</category>
				
				<category>writing</category>
				
				<pubDate>Mon, 16 Aug 2010 15:55:00 -0400</pubDate>
				<guid>http://www.carehart.org/blog/client/index.cfm/2010/8/16/upcoming_farrar_book_and_preview_chapter</guid>
				
			</item>
			
			<item>
				<title>The Ultimate Var Scope Resource list? Understanding/resolving problems with the var scope in CFML</title>
				<link>http://www.carehart.org/blog/client/index.cfm/2010/3/4/resources_on_the_var_scope_problem</link>
				<description>
				
				If you or anyone you know ever wants to get up to speed on the &quot;var scope problem&quot; in CF, you may be challenged by the fact that there are many discussions of the topic, spread across many blogs. I&apos;ve accumulated here a starting list of several of the key ones I know of. I certainly may have missed some, so I welcome suggestions of more. 

I think it&apos;s helpful to have all the resources in one place. Indeed, ultimately I&apos;ll move this to my &quot;&lt;a href=&quot;/resourcelists/&quot;&gt;resource lists&lt;/a&gt;&quot; page where I keep similar &quot;compendia&quot;.

I created the list of VAR scope resources today after helping a client with a problem which seemed related to this classic problem: the need to remember to var scope your variables in CFCs. It&apos;s often the cause of subtle bugs. Like many, they still hadn&apos;t heard about the problem (or had seen mention of it but didn&apos;t really understand it). 

So if you&apos;re in that place, or know someone who may be, here are resources to help get started on understanding the topic and related issues. As always, the CF community has rallied the troops on the matter, and several folks have blogged in various detail or on various related aspects.

&lt;h3&gt;About the resources&lt;/h3&gt;

The first few elaborate on the problem, and the first one even includes a live running example to demonstrate the point. Then a couple explain some related issues. 

I also then list resources on the related new &quot;local&quot; scope in CF 9, and some more that discuss compatibility issues with that.

Note that these may have been written any time in the past couple/few years, so keep that in mind and be sure to check the comments as well.

&lt;h3&gt;The resources&lt;/h3&gt;

First, some general resources introducing the var scoping issue/feature:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.schierberl.com/cfblog/index.cfm/2008/7/21/Thread-safety-and-the-var-scope--live-example&quot;&gt;Thread safety and the var scope - live example&lt;/a&gt;, by Mike Schierberl &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.dopefly.com/techblog/entry.cfm?entry=278&quot;&gt;Why precisely is it important to var-scope your variables?&lt;/a&gt;, by Nathan Strutz&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://daveshuck.instantspot.com/blog/2006/11/28/Thread-safety-example--Var-scope-your-loop-index-in-ColdFusion-CFCs&quot;&gt;Thread safety example: Var scope your loop index in ColdFusion CFCs!&lt;/a&gt;, by Dave Shuck&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.iknowkungfoo.com/blog/index.cfm/2007/8/22/Object-Oriented-Coldfusion--4--The-var-scope&quot;&gt;Object Oriented Coldfusion : 4 : The var scope&lt;/a&gt;, by Adrian Moreno&lt;/li&gt;
&lt;/ul&gt;

And some that address various issues related to using the VAR scope:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.coldfusionjedi.com/index.cfm?mode=entry&amp;entry=6579B85C-F992-5BFE-388D680443054E0F&quot;&gt;Always var scope! Always!! Except...&lt;/a&gt;, by Ray Camden&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.garyrgilbert.com/blog/index.cfm/2008/7/21/Var-Scoping-Queries&quot;&gt;Var Scoping Queries&lt;/a&gt;, by Gary Gilbert&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.daveshuck.com/blog/2006/3/21/VAR-scoping-using-structures&quot;&gt;VAR scoping using structures&lt;/a&gt;, by Dave Shuck&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.webapper.com/blog/index.php/2007/2/5/The-VAR-keyword-is-idiotic&quot;&gt;The VAR keyword is idiotic&lt;/a&gt;, by Steve Nelson&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.webapper.com/blog/index.php/2007/2/9/The-REAL-reason-you-need-to-varscope-your-local-CFC-function-variables&quot;&gt;The REAL reason you need to var-scope your local CFC function variables&lt;/a&gt;, by Tyson Vanek&lt;/li&gt;
&lt;/ul&gt;

And some on the change in CF9, for the local scope:

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://forta.com/blog/index.cfm/2009/6/21/The-New-ColdFusion-LOCAL-Scope&quot;&gt;The New ColdFusion LOCAL Scope&lt;/a&gt;, by Ben Forta&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://fusiongrokker.com/post/deciphering-the-new-local-scope&quot;&gt;Deciphering the new Local Scope&lt;/a&gt;, by Adam Tuttle&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.coldfusionjedi.com/index.cfm/2010/2/8/Repeat--ColdFusion-9-does-NOT-remove-the-need-to-var-scope&quot;&gt;Repeat - ColdFusion 9 does NOT remove the need to var scope!&lt;/a&gt;, by Ray Camden&lt;/li&gt;
&lt;/ul&gt;

And some tangential discussions of that, including some compatibility issues with the new scope:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://dan.skaggsfamily.ws/2010/02/08/be-careful-with-the-local-scope-when-migrating-from-cf8-to-cf9/&quot;&gt;
Be careful with the &apos;local&apos; scope when migrating from CF8 to CF9&lt;/a&gt;, by Dan Skaggs&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.coldfusionjedi.com/index.cfm/2010/2/20/CHF-Warning--Impacts-MXUnit&quot;&gt;CHF Warning - Impacts MXUnit&lt;/a&gt;, by Ray Camden (important impact of CF 9 CHF 1, even if not using MXUnit)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.bennadel.com/blog/94-LOCAL-Variables-Scope-Conflicts-With-ColdFusion-Query-of-Queries.htm&quot;&gt;LOCAL Variables Scope Conflicts With ColdFusion Query of Queries&lt;/a&gt;, by Ben Nadel&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.kukiel.net/2009/12/is-this-issue-with-local-scope-in.html&quot;&gt;Is this an issue with the local scope in ColdFusion 9?&lt;/a&gt;, by Paul Kukiel&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.kukiel.net/2009/12/coldfusion-9-and-local-scope-continued.html&quot;&gt;ColdFusion 9 and the local scope continued&lt;/a&gt;, by Paul Kukiel&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://jlamoree.posterous.com/coldfusion-9-and-the-local-scope-0&quot;&gt;ColdFusion 9 and the LOCAL Scope&lt;/a&gt;, by Joseph Lamoree&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://bytestopshere.com/post.cfm/major-flaw-in-cf9-may-break-code&quot;&gt;Major Flaw in CF9 - May Break Code!&lt;/a&gt; and &lt;a href=&quot;http://bytestopshere.com/post.cfm/major-flaw-in-cf9-may-break-code-part-2&quot;&gt;part 2&lt;/a&gt;/&lt;a href=&quot;http://bytestopshere.com/post.cfm/major-flaw-in-cf9-may-break-code-part-3&quot;&gt;part 3&lt;/a&gt;, by Sami Hoda&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;The VarScope tool&lt;/h3&gt;
Finally, of course, as most of these resources point out, be sure to use Mike Schierberl&apos;s wonderful &lt;a href=&quot;http://varscoper.riaforge.org/&quot;&gt;varscoper&lt;/a&gt; tool to help find whether you have instances of this problem. It tells you literally what to change, where, to don&apos;t let concern of this problem overwhelm you.

&lt;h3&gt;Conclusion&lt;/h3&gt;

Hope those are helpful. Again, it&apos;s just a starting list. I welcome additions, and I look forward to your comments. In time, I&apos;ll move this (and any suggested additions) to my &quot;&lt;a href=&quot;/resourcelists/&quot;&gt;resource lists&lt;/a&gt;&quot; page. Check that out for similar lists of resources on various subjects. 
				</description>
				
				<category>cf9</category>
				
				<category>general</category>
				
				<category>resource lists</category>
				
				<category>troubleshooting</category>
				
				<pubDate>Thu, 04 Mar 2010 12:06:00 -0400</pubDate>
				<guid>http://www.carehart.org/blog/client/index.cfm/2010/3/4/resources_on_the_var_scope_problem</guid>
				
			</item>
			
			<item>
				<title>Spying on ORM database interactions: Hibernate, Transfer, etc. on any CFML engine</title>
				<link>http://www.carehart.org/blog/client/index.cfm/2009/11/14/spy_on_orm</link>
				<description>
				
				As people use CF9&apos;s ORM feature (or other ORMs like Transfer and Reactor, or indeed Hibernate, on any CFML engine), they may be left wondering what sort of SQL interactions happen &quot;under the covers&quot; between the ORM framework and the database engine. Well, there are several ways you can watch them, as this entry will discuss, and it may be interesting to discover what&apos;s going on.

Of course, ORM support is just a different way that the CFML engine (through the ORM framework) sends SQL to a database via a regular DSN, just like any other request, so there&apos;s nothing really &quot;tricky&quot; about this. It&apos;s just about realizing that while you don&apos;t write the SQL yourself, it&apos;s still generated by the CFML engine/ORM framework, and you may not realize/consider the available tools which can spy on it, just like any other DB processing from within CF. Indeed, some people may not even realize how many options exist to spy on JDBC interactions from their CFML engine to the database engine.

The good news is that there are several approaches, some included in CF (some depending on the edition), and some available separately which would work in any edition of CF or the other CFML engines (Open BlueDragon, Railo, etc.), and with any of the ORM frameworks. 

(FWIW, besides the aforementioned Transfer and Reactor, there are still others, which I mention in my CF411 list as &lt;a href=&quot;http://www.cf411.com/#cffw_orm&quot;&gt;CFML ORM Frameworks&lt;/a&gt;. Indeed, note that you can run &lt;a href=&quot;http://www.firemoss.com/index.cfm/2007/5/31/ColdFusion-8--Hibernate--Woot&quot;&gt;Hibernate on CF prior to CF9&lt;/a&gt;.)

&lt;h2&gt;Built-in ORM Logging Option&lt;/h2&gt;
&lt;b&gt;Update:&lt;/b&gt; After posting this entry, I learned that there&apos;s yet another option, so I&apos;m adding it here as the first to consider. There is a built-in option in the CF ORM setup where one can enable logging, settable in the application.cfc: see the this.ormsettings option and its available key/value pair, logSQL=&quot;true&quot;.

There are several resources where you can learn more on that. Besides the &lt;a href=&quot;http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSED380324-6CBE-47cb-9E5E-26B66ACA9E81.html#WS2CED8D4C-8F3B-4f88-AEAA-D3F94F04964D&quot;&gt;CF9 docs page on the ORM settings&lt;/a&gt;, there is also a &lt;a href=&quot;http://www.rupeshk.org/blog/index.php/2009/07/coldfusion-orm-how-to-log-sql/&quot;&gt;blog entry by Adobe engineer Rupesh Kumar&lt;/a&gt;. I&apos;ve not yet used it, so don&apos;t know how it compares to the other options below. I will leave them for all to consider.

&lt;h2&gt;Using FusionReactor or SeeFusion&lt;/h2&gt;

Users of any CF edition (6+) or CFML engine can use tools like SeeFusion and FusionReactor, which have always had the ability to monitor database interactions by &quot;wrapping&quot; the datasource to be monitored. FusionReactor engineer John Hawksley has posted a recent article specifically on monitoring CF9&apos;s ORM interaction, in the FR Devnet site, &lt;a href=&quot;http://www.fusion-reactor.com/community/developers/autodev_detailed.cfm?article=FRS-228&quot;&gt;Using FusionReactor&apos;s JDBC Driver Wrapper With ColdFusion 9 ORM&lt;/a&gt;. Its concepts would apply to any ORM, of course. 

Similarly, I&apos;ve written generically about its database monitoring feature in &lt;a href=&quot;http://www.carehart.org/blog/client/index.cfm/2008/7/22/fusionreactor_datasource_monitoring&quot;&gt;What is the FusionReactor datasource monitoring feature? Why would I use it? Powerful stuff&lt;/a&gt;. As I point out in that article, the concepts discussed apply as well to SeeFusion&apos;s ability to monitor queries by wrapping datasources.

&lt;h2&gt;CF Enterprise, with a caveat&lt;/h2&gt;

I also mention in that article that those running CF 8 (or now 9) Enterprise will find that it has built-in wrapping of datasources, such that its Enterprise Server Monitor reports database interactivity, so that can also monitor the ORM interactions. 

A key difference for FR and SeeFusion over that, though, is that while they all have means to highlight queries that exceed certain limits, only FR and SeeFusion have the built-in ability to log every DB interaction (FR to text logs and SF to a database, and they both do so with low overhead).  The CF Enterprise Server Monitor has no logging ability at all, and while you can set its interface to lower the threshold for what active queries to show, it has no means to show queries which have executed in the past. 

It&apos;s just that it can be useful sometimes to see every single DB interaction for a request (or all requests), and it may be all the more interesting for discovering/observing what&apos;s happening with ORM interactivity.

&lt;h2&gt;Another alternative CF feature&lt;/h2&gt;

Still another little-known feature for spying on JDBC interactions in CF is by way of the JDBC &quot;spy&quot; feature, which does in fact allow logging of all JDBC interactions mde from within CF. This feature was first enabled by way of the DataDirect 3.5 driver update which was made available (as an optional upgrade for 6 and 7) in the CF 7.02 timeframe. I wrote about the Spy feature back &lt;a href=&quot;http://www.carehart.org/blog/client/index.cfm/2006/8/8/spy_jdbc_tool&quot;&gt;back in Aug 2006&lt;/a&gt;. 

Since then, CF 8 (and now 9) offer it instead as a new &quot;log activity&quot; option in the &quot;advanced settings&quot; for a datasource definition in the CF Admin (which is disabled by default). I pointed this out in &lt;a h ref=&quot;http://www.carehart.org/blog/client/index.cfm/2007/7/3/cf8_admin_changes&quot;&gt;another entry from 2007&lt;/a&gt; as one of many easily missed changes for the CF 8 Admin.

This &quot;log activity&quot; output is not as easy to interpret as FusionReactor&apos;s logs, and can indeed be voluminous (moreso than FR&apos;s), so be careful. Anyway, it&apos;s one of the several ways you can monitor JDBC interactions between CFML and your DB engine. Again, any of these may be useful for monitoring any of your CFML/database interactions.

&lt;h2&gt;Generic DB Monitoring tools&lt;/h2&gt;

Indeed, it&apos;s worth noting finally that while the focus here has been watching the DB interaction from CF (and the ORM framework) to the database (by watching the JDBC traffic going out of CF and returning), you could just as well watch the DB interactivity from the DB&apos;s perspective instead (watching it coming and and being returned). 

There are many tools that can monitor database processing, available for each of the major databases (free and commercial). I list several such tools in one of my CF411 section, &lt;a href=&quot;http://www.cf411.com/#dbmon&quot;&gt;Database/SQL Monitoring Tools&lt;/a&gt;.

Hope all that&apos;s helpful, whether you use ORM or not. 
				</description>
				
				<category>cf9</category>
				
				<category>orm</category>
				
				<category>cf8</category>
				
				<category>bluedragon</category>
				
				<category>cf911</category>
				
				<category>fusionreactor</category>
				
				<category>seefusion</category>
				
				<category>railo</category>
				
				<category>monitoring</category>
				
				<category>jdbc</category>
				
				<pubDate>Sat, 14 Nov 2009 11:55:00 -0400</pubDate>
				<guid>http://www.carehart.org/blog/client/index.cfm/2009/11/14/spy_on_orm</guid>
				
			</item>
			
			<item>
				<title>Hidden Gem in CF9: controlling Application.cfm/cfc lookup order</title>
				<link>http://www.carehart.org/blog/client/index.cfm/2009/10/7/hidden_gem_app_cfc_search_order</link>
				<description>
				
				It&apos;s that time again, time for me to start sharing hidden gems in CF9. In this first offering, I&apos;ll point out an interesting option now available in the CF Admin that lets you control how far up the drive CF searches for Application.cfm/cfc files. It&apos;s not quite as obvious as it seems, nor is it well documented. One of the options may even surprise you. More on the feature in a moment.

&lt;h1&gt;About the hidden gems series&lt;/h1&gt;

With CF9 out and final, I&apos;m excited to start identifying the interesting little bits and bobs which you may not have heard much about. Some will know I&apos;ve done this going back to one of my first &lt;a href=&quot;http://www.carehart.org/articles/&quot;&gt;articles&lt;/a&gt; in the CFDJ from Feb 2000, on &quot;Hidden Gems in 4.01&quot;.

Over the course of the next few weeks, I&apos;ll share various things that you may have missed, whether in the CF Admin, the language, the docs, or otherwise.

&lt;h1&gt;Hidden Gem 1: Controlling Application.cfm/cfc Lookup Order in Admin&lt;/h1&gt;

If you&apos;ve not noticed it, there is now a setting in the CF9 Admin for controlling how far above the current directory CF will look for Application.cfm/cfc if not found in the current directory. This is a server-wide setting (found on the Settings page). 

&lt;img src=&quot;http://www.carehart.org/images/cf9_hiddengem_cfcsortorder.jpg&quot;&gt;

&lt;h3&gt;How application file searching works by default&lt;/h3&gt;

As you should know, if CF doesn&apos;t find an Application.cfm (or Application.cfc, since CF 7) in the current folder where a request starts, CF searches up to the parent, then the grandparent, trying to find one (and since CF 7 if it finds an Application.cfc it chooses that over an Application.cfm).

What many don&apos;t know is that by default ColdFusion has always searched &lt;b&gt;all the way to the system root&lt;/b&gt; (the drive root). It doesn&apos;t stop at the webroot, which could lead to both security and possibly performance issues. This can now be changed using this setting. 

To change this, find the Settings page which is the first link in the options on the left (see the arrow pointing to it in the image above). This new setting is about 2/3 the way down this page of settings (which is getting quite long!)

&lt;h3&gt;The options available in CF9&lt;/h3&gt;

As the screenshot above shows, you can now change things to choose either of these alternative search behaviors: 

&lt;ul&gt;
&lt;li&gt;Default order&lt;/li&gt;
&lt;li&gt;Until webroot&lt;/li&gt;
&lt;li&gt;In webroot&lt;/li&gt;
&lt;/ul&gt;

As I said at the outset, things are not quite as obvious as they may seem. OK, the first is: it maintains the default behavior of searching to the system root, such as c:\. 

The second does what some have wished: makes CF stop searching when it reaches the webroot. (The third option may make you think that this second option means search until the webroot but do not search in the webroot. That&apos;s NOT what it means.)

Before explaining that, let me point out as well that changing this setting is immediate. No restart of CF 9 is required.

&lt;h3&gt;The surprising &quot;in webroot&quot; option&lt;/h3&gt;

So what then is the deal with the third option, &quot;in webroot&quot;? It may surprise you (as it did me, at first). What it does is tell CF to search either in the current directory (as they all do) or if not found, search ONLY in the webroot. It DOES NOT search the directories between the current directory and the webroot. Interesting. (To be clear, it does not mean &quot;don&apos;t look in the current directory but only in the webroot&quot;. It still takes affect only if there is no Application.cfc/cfm in the current directory where a request starts.)

Why might one use this third option? Well, if they know that their server code directories are setup in such a way that the Application.cfc/cfm file is either in the directory of templates it should apply to, or if not there it&apos;s only in the webroot, then this option would suit them.

I can see it potentially causing confusion if folks don&apos;t know about the change in behavior and wonder, &quot;why isn&apos;t my Application.cfc/cfm file (in an intermediary directory) running?&quot;

Also, the fact that this is a system-wide feature means that all your apps on your entire server must accept the behavior specified here.

&lt;h3&gt;No documentation on this feature&lt;/h3&gt;

Another source of confusion is the fact that there&apos;s no documentation explaining this feature. It&apos;s mentioned only in passing in the online help of the Administrator, without explanation of the meaning of the options. It&apos;s not mentioned at all in the docs, either the &quot;Configuring and Administrating CF&quot; manual or the &quot;Developing Applications&quot; manual. That&apos;s a real shame and I hope it will change in the next release. 

In the meantime, I hope that this entry will help. Sorry that it was a long one, but again it&apos;s just not a trivial feature. It is indeed a hidden gem, and look for more to come from me soon.

&lt;/blockquote&gt;
(I&apos;ve provided a zip here that can help you demonstrate things. Unzip it into a web root and run the nested /testdir/testsubdir/test.cfm, and observe that whichever Application.cfm runs reports where it was found. You can rename the various Application.cfm files to xApplication.cfm to observe the impact of CF&apos;s search order, and as you change the Admin settings. You&apos;ll also want to copy one of the Application.cfm files to a direcory above your webroot to test that, too. The content is identical in all of them. 

Of course, beware when unzipping the file that you don&apos;t overwrite any Application.cfm that you already have in your webroot. Also, beware that if you have an Application.cfc file in that webroot, it would take precedence over the Application.cfm file.

Finally, to find the zip file, see the link appearing just below this blog entry.)
&lt;/blockquote&gt; 
				</description>
				
				<category>cf9</category>
				
				<category>hidden gems</category>
				
				<pubDate>Wed, 07 Oct 2009 02:21:00 -0400</pubDate>
				<guid>http://www.carehart.org/blog/client/index.cfm/2009/10/7/hidden_gem_app_cfc_search_order</guid>
				
				<enclosure url="http://www.carehart.org/blog/client/enclosures/appsearch.zip" length="1124" type="application/zip"/>
				
			</item>
			
			<item>
				<title>CF9 version numbers (past, present, future reference)</title>
				<link>http://www.carehart.org/blog/client/index.cfm/2009/8/12/cf9_version_numbers</link>
				<description>
				
				At some point you may find yourself wondering exactly what version of CF 9 or its betas that you are running, such as to confirm if you&apos;re running the latest version available. I was in that position, and googled to find reference to the number I found, and there was no reference.

So I&apos;m offering this entry as a place to post this info and for others to update over time.

&lt;ul&gt;
&lt;li&gt;9,0,0,251028 - public release
&lt;li&gt;9,0,0,241018 - first public release candidate, available 07/13/09
&lt;li&gt;9,0,0,233019 - The last beta before the public release&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;How to view your CF Version number&lt;/h4&gt;

Wondering how to see the version number? In code it&apos;s in the variable server.coldfusion.productversion. 

In the admin, you can see it in either the &quot;server settings&gt;settings summary&quot; menu option on the left, or the &quot;system information&quot; icon at top right (or http://[server]/CFIDE/administrator/settings/version.cfm).

If you know of earlier or later releases than those I list (such as if I&apos;ve not updated this in the future), feel free to offer them as comments. 
				</description>
				
				<category>cf9</category>
				
				<pubDate>Wed, 12 Aug 2009 15:25:00 -0400</pubDate>
				<guid>http://www.carehart.org/blog/client/index.cfm/2009/8/12/cf9_version_numbers</guid>
				
			</item>
			</channel></rss>