Software Development, Web Design, Training

All About Application.CFC

Still using Application.CFM files? You might be losing out on some easy improvements to your application.  Application.CFC takes what Application.CFM does and improves upon it greatly. Rather than having the entire file run on every page request (which can be really slow!), you can break the code up so only sections run the first time the app starts up, when a new user longs on, when a new page request starts, when an error is thrown, and much more.  Though it’s a CFC file, you don’t even have to know object-oriented programming to take advantage of Application.CFC.  In this talk we’ll take a look at a legacy application using Application.CFM and step thru moving the code to an Application.CFC file, discussing the benefits and best practices along the way.

Main takeaways:

  • Reasons to stop using Application.CFM
  • Moving to Application.CFC for the first time
  • Using “this” settings
  • Commonly used functions: onApplicationStart, onRequestStart, onSessionStart, onError, onMissingTemplate
  • Other features: onApplicationEnd, onRequestEnd, onSessionEnd
  • Best Practices
  • Other resources