10

Based on this question: How Templates work and load css/js files? Website building process with Purity III

Quote:
.... I have to present my website tomorrow and i may get asked "where does the content come from?" and i can't answer because i don't get it myself.

What does happen if I call the site? In the index.php file is php code but i can't find the spot where the rest of the website gets "called" or something....

and also on type of questions like this: Where Joomla Files Located

I decided to create this Q/A to work as a reference for all similar questions. Anyone who would like to contribute to make this a solid community wiki post is welcome.

2 Answers 2

15

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:

0
1

Small contribution, the full list of Joomla! Plugin Events.

4
  • small but useful
    – FFrewin
    Commented Jul 15, 2016 at 7:57
  • maybe you could write the most essential parts of that page here
    – FFrewin
    Commented Jul 15, 2016 at 7:57
  • @FFrewin I would but basically it's a long list of links of each Plugin events! I'm trying to find a sort of "timeline" of all the events in this list but I can't find much about it, I've stumbled in your answer here after lot of googling and the Joomla Application Execution Flow do mention some of the System group Events but not much about all others.
    – Gruber
    Commented Jul 15, 2016 at 13:02
  • @FFrewin also would be useful a sort of overview description of all different groups of plugin events, but I didn't find much in the Joomla docs (tho I admit my GoogleFu is a bit lacking these days dunno why, maybe is the heat :P)
    – Gruber
    Commented Jul 15, 2016 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.