Back when I first discussed the new Application event model exposed via Application.cfc, several users asked if inheritance would be supported. At the time I said no (at the time it wasn’t). But actually, inheritance did make it in.
For example, you could define an Application.cfc in the root of your application. Then, if you wanted to override the onError() method for a particular subdirectory you could create an Application.cfc in that subdirectory and have it inherit all of the methods in that first Application.cfc with the exception of onError which you’d override.
Technote Extend the ColdFusion MX 7 Application Framework using ColdFusion Components explains this in detail.
Leave a Reply