Processing request events
In ColdFusion, inside the Application.cfc
file, there are several standard events: onApplicationStart()
, onSessionStart()
, onRequestStart()
, and others. Many ColdFusion-based MVC frameworks have standard events inside the controllers. The COOP page controller follows the same concept. The following are the common event methods in the coprocessor (COOP controllers):
onPageStart()
onFirstCall()
onPostBack()
beforeViewCall()
onPageEnd()
Event model for the coprocessor
COOP handles calling the events methods at the proper time. The following diagram illustrates the flow of the request. We can see that after the page start method is called, COOP chooses to either call the onFirstCall()
or onPostBack()
method. As illustrated, the difference here is determined by whether or not it was a form. COOP looks for some special, hidden form variables to determine this.
We see that COOP also knows when to actually handle the view. COOP does not handle the layout, because that is outside...