> -----Original Message-----
> From: Seamus Campbell [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 26, 2002 7:57 PM
> To: CF-Talk
> Subject: Re: application.cfm?
>
>
> I read somewhere that cf searches for an application.cfm file all the way
> up to the root
> so it's actually quicker to put in an almost empty
> application.cfm (I think
> you need an application name)
> than no application.cfm

In my opinion, I really don't think it matters if you put an Application.cfm
in your app directory structure somewhere, or not, in regards to giving CF
something to find sooner than later.  I doubt there is any measurable speed
increase; in fact, I would bet that the fact that CF has to load it in (even
if it contains a comment only) would negate any benefit.

With that said, I have only one in all my apps, and it's out of the web
root.  I have my own recursion routine (based on the current template path)
that allows me to have a global application file for any of my directories
or even files that I wish, meaning if I had a file in a structure like so:

ClientName\
  AppName\
    www\
      admin\
        index.cfm

I could specify a global settings file for that file ONLY, or the whole
directory.  The beauty is, I could specify this settings file for that
directory (the admin directory) and one for JUST the index.cfm file, and all
the other files in that directory would be "under" the other settings file,
while the index.cfm would have it's own settings file.  Admittedly, I just
came up with the idea for granular settings files down to the file level,
but haven't used it yet.  The functionality is there, though, if need be.

Another thing that wasn't pointed out: CF looks for Application.cfm up to
the root of the drive that your application is on.  OnRequestEnd.cfm must be
in the same directory as that Application.cfm file, or it won't get
executed.  So if you had:

c:\Application.cfm
  ClientName\
    AppName\
      www\
        admin\
          OnRequestEnd.cfm

the OnRequestEnd.cfm file wouldn't be executed since there is no
Application.cfm file in the same directory.  Likewise, when CF recursed up
to the root of the drive and found the Application.cfm file there, the
OnRequestEnd.cfm file in the admn\ directory would not be executed since it
doesn't reside in c:\

--Andy


______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to