ColdBox Application Life Cycle
ColdBox is based on the MVC design pattern shown below. You will also so in continuation the request lifecycle of a typical ColdBox request and a typical ColdBox proxy request.

The Request Lifecycle
This section describes how the framework executes an incoming request. This will give you a roadmap of where you would like to place interceptors, module calls, security, etc.
For each request, the following cycle occurs:
- Is the framework initialized?
- False: Initialize framework (Creates controller, internal structures, and prepares for requests) then Goto step 4.
- True : Goto step 4
- Is the config auto reload flag set to true?
- True : Initialize Framework then Goto step 4
- False : Goto step 4
- Is the handler index auto reload flag set to true?
- True : Register handlers index then Goto step 4
- False : Goto step 4
- Capture Request and create request context
- Does the Application Start Handler exist and has it not fired yet?
- True : Execute Application Start Handler then Goto step 6
- False : Goto step 6
- Execute the preProcess Interceptors
- Execute the Request Start Handler if it exists
- Is the incoming event cached?
- True : Retrieve event cache and render, then Goto step 19.
- False : Continue
- Execute the preEvent Interceptors
- Execute the handler.preHandler() event if it exists
- Execute the handler.event()
- Execute the handler.postHandler() event if it exists
- Execute the postEvent Interceptors
- Execute the Request End Handler if it exists
- Execute the preView Interceptors
- Render the View/Layout Combinations
- Execute the postView Interceptors
- Execute the postProcess Interceptors
- Are we in debug mode?
- True : Render the debugging panel
- END
The ColdBox Proxy Lifecycle
For a ColdBox Proxy request, the following cycle occurs:
- Is the framework initialized?
- False: Initialize framework (Creates controller, internal structures, and prepares for requests) then Goto step 4.
- True : Goto step 4
- Is the config auto reload flag set to true?
- True : Initialize Framework then Goto step 4
- False : Goto step 4
- Is the handler index auto reload flag set to true?
- True : Register handlers index then Goto step 4
- False : Goto step 4
- Capture Request and create request context according to passed in proxy parameters.
- Set flag in event object that this is a proxy request
- Does the Application Start Handler exist and has it not fired yet?
- True : Execute Application Start Handler then Goto next step
- False : Goto next step
- Execute the preProcess Interceptors
- Execute the Request Start Handler if it exists
- Execute the preEvent Interceptors
- Execute the handler.preHandler() event if it exists
- Execute the handler.event()
- Execute the handler.postHandler() event if it exists
- Execute the postEvent Interceptors
- Determine if returning the request collection or the return variables from the executed event.
- Return Request Collection structure or
- Return Event Results
