Skip to content

JA7. Joomla Module Development Reflection

This was the 7th week of this course, its content was a continuation of the last week, and going deeper inside the structure of Joomla code. We learned about various terms in the Joomla world, developing a simple Joomla module, installing, configuring, and displaying such a module on a Joomla website.

The discussion assignment asked us to explore the Joomla modules repository and list some of these modules. I chose the following modules: BreadCrumbs, log-In, and Statistics Modules. The Written assignment asked us to install a module on our Joomla website and configure it. I chose the SlideShowCK module.

I have an extensive understanding of WordPress; so, I was comparing all the time between WordPress and Joomla. I found that WordPress is easier to deal with and more flexible, customizable and beginner friendly. However, Joomla’s performance, access control management, and availability of high-quality training seem appealing.

The steps to develop a Joomla module are as follows:

  1. Create a new folder in the modules folder of your Joomla website.
  2. Edit the manifest.xml file to include the module name, description, version, and other information.
  3. Edit the source code of the module in the mod_ files.
  4. Zip the folder and install it on your Joomla website.
  5. Configure the module and display it on your website.

The manifest file is the most important in the module. It defines the module metadata (name, description, version, etc.), parameters, files, dependencies, and the flow that needs to be followed when the module is installed/uninstalled/updated.

The manifest file is an XML file that is read by the Joomla installer. I felt working with XML is a bit complicated, while JSON is more straightforward. However, it might be that I just got used to JSON.

The Joomla CMS provides a nice way to build the module configuration form; by just placing the form fields inside the <config> tag in the manifest file, the Joomla installer will automatically build the form for you. This is a nice feature that saves a lot of time and effort.

Joomla API also provides a clean interface to connect, query, and update the database. The API is very similar to the WordPress API, which is a good thing. I found it easy to use and understand.

While developing the module, few global variables are available to use. These variables include $params, $app, $attribs, $lang, $template, $path, $scope, and $module. These variables provide great flexibility, control, and ease of use over the module.

Although Joomla’s team tried to separate software components into semantic units; which is the reason why there are multiple types of extensions like Modules, Plugins, Components, and Templates. However, I found that the separation is not clear enough, and it is not easy to understand the difference between these extensions.

I enjoyed this week’s content, and I learned a lot about Joomla. But I don’t think I will use Joomla in the future, as I am more comfortable with WordPress. But, I’ve gained enough knowledge to be able to use Joomla if I need to, such as dealing with Legacy projects.

References