ColdBox Application Life Cycle
Introduction
ColdBox is an MVC framework that follows a pattern that is shown in the diagram below. ColdBox can also morph into a remote driven framework and therefore has a different pattern and execution lifecycle. Both of these life cycles are explained below.

The MVC 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 : Re-Initialize Framework then Goto step 4
- False : Goto step 4
- Is the handler index auto reload flag set to true?
- True : Register handlers index again 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 that uses the process() method, the following is the request life cycle:
- 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
