|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Application Framework
Kiteless, in an earlier post, you mentioned that you do not make use of the Application.cfm. Could you shed some light on why you do not, and what some of the other options are?
Thanks in advance. |
|
#2
|
|||
|
|||
|
I do use the Application.cfm file, just not all the time. Frameworks like Mach-II provide much of the functionality of Application.cfm from within the framework itself (via plugin points at different phases of execution). If I do use Application.cfm, it is usually only to run a <cfapplication> tag.
I think that many folks pile tons of stuff into their Application.cfm file: global variables, constants, path declarations, security and permissions logic, etc. In my opinion these tasks should be encapsulated into their own code files or modules. Running all this in the Application.cfm file is asking for maintenance trouble down the line. That said, for small apps or quick and dirty apps, do whatever you have to do to make the app work. Everything is a trade off and for certain kinds of applicaitons it might not be necessary to plan out every little thing or encapsulate every little piece of functionality. |
|
#3
|
|||
|
|||
|
Good points
kiteless has expressed some good points.
the reason most people use Application.cfm to store information is b/c it is constant throughout an application. As kiteless expressed, Applicaiton.cfm is often the victim of unintentional abuse, and that frameworks often allow better flexibility, especially in handling flexibility for security and permissions logic. I will offer a couple of tips. 1) Always create Application.cfm. Even if you have no plans to use it, always have an Application.cfm in the root folder of your application. Why? b/c ColdFusion spends precious time and resources in searching for Application.cfm, even if it doesn't exist. CF will look for it (with every page request) in each parent folder, all the way to the root folder of the hard drive (not the web root). 2) Always name it like this: Application.cfm On unix/linux, filenames are case sensitive. No, this is not a "feature" in MS's sense. If Application.cfm is any other variation (all lower case, all upper case, mixed case, etc.), it will not be recognized on unix/linux servers. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Application Framework |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|