Workflow - Vuzi/jwf GitHub Wiki
Workflow
Front Controller
The front controller handle in first the HTTP request, and construct from it the context. This context contains pretty much every information possible from the request and the request's response.
Then, the front controller give the context to the rewriter engine.
Rewriter
The rewriter will then try to get the corresponding action to proceed by analyzing the request URI and HTTP method. Other verification could be performed if a rule needs any. Once an action is selected (or none), the rewriter return the found value.
Front Controller #2
The controller will then check the found action. If no action where found, then its a 404 error. If credentials don't match, then its a 403 error. After all those checks, then the action can be performed and render.
Renderer
The main renderer will next retreive the renderer to use to display the action's result. The renderer could be selected by the result, directly in the URI in case of APIs, or even using the default defined renderer.
Dispatcher
Then, the dispatcher is ask to instantiate and dispatch the action. The default dispatcher use a pool of threads, but in any case the action will be proceed and the result stored in the context.
Renderer #2
Finally, the main renderer call the selected renderer and render the page. Note that some renderer, like the Velocity render will call multiple times the dispatcher because the'll need to render other actions to generate the final page
And voila !