IMO, this is not a "too broad" topic. This is not an opinion, I would call it best practice.
There are many reasons to use cfc for cfm . I was in this particular situation.
Here is a list of common functions available in Application.cfc (I'm sure you know):
- onApplicationStart ()
- onSessionStart ()
- onRequestStart ()
- onRequest ()
- onRequestEnd ()
- onSessionEnd ()
- onApplicationEnd ()
- OnError ()
Without going into the details of each of them, having the ability to sort your code in context buckets like this, you can better manage your various areas of variables. Without these contextual triggers, you simply respond to the procedural aspects of Application.cfm .
While both users are launched on each page request, only certain functions in cfc . cfm , you have code running all the time, checking the conditions for when it should or should not run.
Staying with cfm , of course, less risky, but if you cfm it, you should expect that you will damage things along the way. The adoption of best practices should be part of this process.
source share