To do development work in any framework, it is a good idea to first study the request flow. This basically answers the question ‘what happens between request send to server and request received from the server?’.
I have made the Flow Diagram available here for public use and/or modifications, as long as you cite me as an author. Although I have decided to share this, it took awhile to create this version, so I would appreciate getting some credit for my work.
Please refer to the Creative Commons Attribution-Noncommercial-share Alike license:
You are free to share and make derivatives (i.e. corrections or updates), as long as you include a revision history, attribute the contributors as authors, you do not use it for commercial purposes, and you freely share the document.
You can download the request to response flow diagram as
[download#14#nohits] or as
Here is what happens in case of Joomla 1.5…
When a request comes to Joomla website,
1) It loads framework files, but first of all it loads ‘defines.php’ and ‘framework.php’ files.
‘defines.php‘ as name suggest defines the some global constant for Joomla framework files and folders.
‘framework.php‘ first performs the installation check, and then initiates the process of importing all other files needed for Joomla framework to work.
2)Joomla ‘Site’ application is created, which basically means that $mainframe object is created.
Session is initialized by creating a new one if no session exists.
3) Application is initialized, it means that first website’s language file is loaded and then system plugin is loaded and onAfterInitialise system event is triggered to let other plugins know that application is ready for routing.
At this stage, Joomla core is up and running.
Afterwards ‘onAfterRoute‘ system event is triggered by Joomla to inform other plugins that system is now ready to dispatch the request to the component.
5)Application Dispatching, which basically means that requested component now get the change to handle the request. If the component does not exists then request is send to default component.
$document object is created and output from the component is buffered.
‘onAfterDispatch‘ event is triggered to let plugins know that system is now ready for rendering.
If administrator has set the website to offline mode, then it shows the offline template otherwise rendered output is buffered in JResponse variable.
‘onAfterRender’ event is triggered to let plugins know that response is ready to send.
7)Response is sent, finally the buffered data in JResponse variable is sent back to the user.
This is the whole process followed by Joomla once it receives a request.
I know this is far from perfect, It would be great if some one who knows better can come up and help me improve this diagram.