How can an Application.cfc's extend to other Application.cfc's?

One of the cool things you can do with Application.cfc is to extend it in subdirectories to override behavior for parts of your application. This Tech Note tells you how.


Update: there is a way to extend the root Application.cfc without using a mapping. In your root directory, alongside your root Application.cfc, create ProxyApplication.cfc that contains just these two lines:

<cfcomponent extends="Application">
</cfcomponent>

Now, in your subdirectory's Application.cfc you simply extend ProxyApplication (which CFMX will find in your root directory). It doesn't need mappings so it should help people on shared hosts, as well as keeping your server configuration leaner.

Taken from blog post: http://corfield.org/entry/Extending_Applicationcfc

This question was written by Sean Corfield
It was last updated on October 19, 2006.

Categories

Application Management

Comments

comments powered by Disqus