Joomla! Dev – Module vs Component

So you’re working on a Joomla! powered website and someone asks for something outside the realm of Joomla! and its existing library of extensions. You know immediately that it’s going to be a custom something but what kind of something should it be? There are several options but the two choices that the decision normally falls to are module and component.

Choosing between the two isn’t so very difficult, it’s just a matter of picking out the strengths of each and deciding which of them you will take advantage of.

Module Strengths

Multiple instances on page. Sometimes there is a need to show things multiple times on a page and for modules this is as easy as copying a module, changing the position of the new one, and enabling it. Good examples of modules that can take advantage of this are Joomla!’s mod_banners and mod_mainmenu as you may often want to display ads in various positions on the page or use secondary navigation such as a footer menu in addition to your main menu.

Coexists with components. Modules do not overwrite the component so you can easily display module contents such as banners and menus alongside components such as com_content which provides your articles.

Smaller than components. Modules are, quite simply, easier to build than components. There are fewer files to work with and their use and implementation are fairly straightforward. In my experience, you write a module to gather some kind of data from a database and display it.

Component Strengths

Administrative functionality. Modules have limited configuration ability granted by their parameters however components may have very rich backends with robust feature sets that usually center around full CRUD operations on Joomla!’s database.

Diverse views. While the module can parse the request URL and produce different views based on the input provided, the structure for this functionality is better presented in the form of a component as the framework is already there.

Direct menu linking ability. As components form the content of the page with the template and usually with modules surrounding it, they also provide you the ability to directly link to it. Something worth noting here is that you do have the option of embedding a module position in an article thus getting a unique page with this module.

Roel's comment is:
On April 30, 2009 at 9:34 am

This is indeed a great discussion on joomla modules, been researching a lot about joomla and this one proves to be very useful. Thanks a lot!

San's comment is:
On July 3, 2009 at 5:56 am


And what about a listing of their respective Disadvantages as well … with perhaps some examples too?


Sumit Joshi's comment is:
On May 17, 2010 at 12:24 am

Why there is two entry of Poll in Component as well as in Module?

Luan's comment is:
On September 10, 2010 at 4:14 am

First I like to thanks for wat you put up.
SecondI still don’t really get wat you saying, for wat I understand from ur saying, modules and component seems similair.
ThirdThanks again.

Ariel's comment is:
On September 23, 2011 at 8:56 am

Nice info, but I agree with San’s comment! Actually, I assumed such a thing would be in the article, sadly it wasn’t

Ravi Kishor Shakya's comment is:
On May 31, 2012 at 3:49 am

Intuitive comparision of Module vs Component. The last point i.e. ‘Direct menu linking ability’ is bit hard to grasp.

%verified_domain%'s comment is:
On May 26, 2014 at 6:30 pm

I do not write a lot of remarks, however after looking at a ton of remarks on this page Softwyre

template and theme's comment is:
On July 16, 2016 at 3:06 am

Hi there to every body, it’s my first visit of this
blog; this webpage contains amazing and genuinely excellent information for visitors.

FirstTrena's comment is:
On December 26, 2017 at 7:22 pm

I see you don’t monetize your page, don’t waste your traffic, you can earn additional cash every month because you’ve got hi quality content.
If you want to know how to make extra bucks, search for: Boorfe’s tips best adsense alternative

TrackBack URL

Leave a comment
Name (required)
Email (required / will not be published)
Usable HTML tags (Copy, paste, and change the text in red for your own)
+ Bold: <strong>Text</strong>
+ Italic: <em>Text</em>
+ Strike: <strike>Text</strike>