Luis Majano Forums Notification: Post to Best Practices X Event Handler

Title: RE: Best Practices X Event Handler
Thread: Best Practices X Event Handler
Forum: Discussions
Conference: ColdBox
User: oscararevalo

Hi Ronan,

I always try to have some kind of mapping between the different
logical "sections" or "modules" of my application and their
event handlers. For example, if my application has a section for user
management, with master and detail views, I'd create a single event handler cfc
to hold all the methods related to that module.

As for the ehGeneral.cfc, I
prefer to leave that for the coldbox-specific event handlers
(onApplicationStart, onRequestStart, etc,) and maybe put there also other global
event handlers that are particular to my application - such as doLogin,
doLogoff, etc
Now, large sections of your application that are more complex and
have lots of actions and views, may require you to split the event handlers even
more, but the idea is the same.