LOGIC Library

This site is the Logic involvement in sharing expertise and skills acquired in daily work. The goal is to create a solid knowledge base and share best practices in software development and systems management.

More info about us can be found on logicsistemi.it.

Developing MVC components for Joomla! 2.5 - Part 1

This post begins a series of small howtos that will create a component for Joomla! CMS realized following the MVC pattern.

The posts will be in the form of simple notes wrote down to clarify the concepts, particulary to myself, about a relatively complex argument, where existing documentation is pour and somethimes out of date.

During the realization of the component, I was inspired by the following documents, published on the Joomla! official documentation website:

The first one is a bit out of date, but has a more detailed explanation of the code. The second one is quite recent, but limited almost exclusively to listing the code to write, without going into details on how Joomla! libraries are working.

I was also inspired by the book "Learning Joomla! 1.5 Extension Development" by Joseph LeBlanc. Also obsolete, but with the most complete explanation of the code.

Joomla! and its extensions

Joomla! is a CMS, a content management system, used by a great number of people and used for the realization of a wide range of websites, with a very different range of functionality and sizes.

The reason for its success is certainly given by the possibilities of customization it offers. In particular, it provides wide possibility of graphic personalization, through the mechanism of system templates, and a detailed extension system that allow to modify every part of the website or of the page without altering the original code of the CMS.

The extensions are divided into 3 categories:

  • Plug-ins: These are small pieces of code that are invoked by events triggered by the Joomla! engine or from another extension
  • Modules: These are extensions that can be placed anywhere on a page, but cannot replace a full page
  • Components: These extensions build an entire page or more in details, each page is an instance of a component

Public and administrative part of Joomla! are realized with similar technologies, therefore, the extensions can be used to complete the functionality of both sides.

Objectives of this tutorial

This tutorial focuses on the components and, in particular, on the realization of the administration part of these. For other types of extensions I apologize for the lack of details, but as I write above, these are only notes that have no presumption to be exahustives...

The project will aim not only to create a working component, but to realize a component compliants with Joomla! standards, So that the end result will integrate from a graphical and functional point of view, with the basic Joomla! administrations tools.

It should be finally noted that the public portion of the component will not be realized. This is because its development follows the same principles of the administration part and may be developed using similar logic. Moreover the public part is not subject to standardization in terms of user interface and its realization will be a little out of the scope of this tutorial.

In the next post we will create the basic component (the classic Hello, world!) and the package for its installation in the Joomla! CMS.


#1 Hardik 2013-05-18 08:02
Can u please help me on how to create component back-end as well as front-end..as we show usually in other components using menu and so on..Thanks In Advance.
#2 Edy Incoletti 2013-05-20 08:07
Hi Hardik,
You're reading the right tutorial! Let's go on with the next parts and you will create a complete component.
If you're not a developer and seeking for an help, contact my company on www.logicsistemi.it.
#3 Cassius Giorgio 2015-10-25 18:57
Just to thank you for sharing this detailed tutorial and well explained! Thank's again!!!