Answer's ToC
1. Intro for beginners + beginners resources link
2. About Joomla Architecture
3. Joomla Execution Flow - How Joomla Works
4. Supplementary Resources
1. Intro for Beginners
Using Joomla for site building is rather simple, as it provides a friendly administration area. In most cases this is all that is needed to know for end-users and designers.
A lot of beginners with some knowledge on classic static html and css, have this same common question/expectation: How to edit their files/content, as they see it being rendered on their browser.
However the way Joomla works behind the scenes, is a lot more complicated than editing an html file and requires advanced programming knowledge and experience to fully understand it.
So as a short answer: don't expect to open the FTP/File manager app and find a file called : myArticle.html
, or index.html
that will let you edit it directly or change the appearance of the html elements of your page.
To start, I would suggest to learn first the basics of Joomla and how to manage it from the backend. Slowly, slowly more knowledge and experienced will be gained.
Beginners resources
A topic with helpful resources and tutorials can be found here:
Joomla Beginner Tutorials - How to start with Joomla?
2. About Joomla Architecture
Joomla is more than a modern CMS built on PHP. It's an advanced web project incorporating multi-layers architecture, that includes:
- The Joomla framework -including 3rd party libraries that the framework relies on, and the plugins that extend the framework.
- Separate Web Applications like the administrator site, the front-end site, the installation.
- The extensions layer (modules, components, templates) that extend the Joomla framework and the applications.
Joomla implements various advanced programming concepts, Object Oriented Programming, MVC design pattern and other common design patterns, a template system etc. Also to not forget to mention that Joomla makes use of a database where data are saved and retrieved when requested to be displayed on screen.
3. Simple and Brief Description of Joomla's Execution Cycle - How Joomla Works
When you reach at the index.php
of the a Joomla site (the front-end JSite application), a whole new execution cycle starts, that includes:
- Important includes of files that define the application's CONSTANTS that are used widely across the application and its extensions.
- Loading the Joomla framework and all its essential Classes that are required for the application to work down the road, -the framework also checks if there is a configuration file in place, or it should take us to the installation folder for making a new Joomla installation.
- The Application object is created and initialised and the session state is handled (new or existing session).
- The configuration file is loaded - that gives also access to the database.
- The router is called. The router is responsible for translating URLs to an associative array of commands and vice versa. These commands will be used as url parameters and sent to PHP's
$_GET
SuperGlobal to make up a complete url. The option
element of this array is the one that defines the component that should be executed.
- With the execution of the component, the Document Object is created. Document is stored in memory and holds data that will be returned later on the browser. The fact that is stored as buffer in memory allows to put and manipulate content in it at no particular order and from any locations. The selected template has been stored in the configuration. Also, it worths noting that the only thing Joomla is doing is to run the component. What else should happen during this step is the job of the component.
- Next comes the Page's Rendering, where alongside the component data from previous step, modules and notification messages are also rendered and placed in their template positions.
- Final step is to output the page to the browser.
- Important to note that during various stages of the above execution cycle, there are Plugin Events points that are called, which allow the various events to interfere and extend Joomla functionality.
A more detailed execution flow list, with the plugin events is documented here: Joomla Application Execution Flow
4. Supplementary Resources: