A huge Joomla Extension No No
I do a lot of templates, and I program extensions, and I create full websites for clients, almost all with or for Joomla. Basically, I spend most of my time working with Joomla and its many extension options. My personal feelings are that I should be able to install an extension, and it should fit in with the design. There are limits, and most extensions add some kind of CSS to my site to help manage the new code. I can live with that, most of the time. It needs to work out of the box of course, and the less time required, the better.
However, some extensions seem to be on a vendetta against the beauty of Joomla templates. In fact, they reinvent the wheel or burden the user with so much excess work to get the extension looking decent that its not worth it. Truth be told, I spend more time integrating these major extensions with my templates than on any other aspect of development.
The big No No for Joomla Extensions
Do not, do not, I repeat, do not override the Joomla template system. Don't. I work very hard to make a template, and then you decide I have to create a whole separate template for your extension? Or do you have such a hacky, complicated, or extremely complex templating system implemented that I have to override piece by piece, in dozens of files, with hundreds of line of code?
No thanks, I'll look for another extension. If there isn't one, my time would be better spent building a new extension that follows better convention, but thats often not an option (budgets, deadlines) so I'm stuck.
The whole idea behind Joomla templates is to provide a single design that all elements can use to display content, making it as easy as a couple clicks to switch between designs. What I have been seeing is a trend for extensions to require developers to modify or recreate design elements for their extensions. This is moving backwards in the evolution of extensions.
The worst is a template that destroys the Joomla template, and forces their own. If I create a template, you've just doubled my work. In most cases, if said extension is required by a project, my quote probably has to nearly double. Clients love to hear that. Beyond that, it means more skill is required to get good use out of your product.
Then lets point fingers at extensions (components or modules) that have no method of overriding their output. That means I have to hack the code, making it impossible to upgrade it later on and probably forcing me to fix other lousy code.
The next worst, in my humble opinion, is a component that forces designers to work through an extra 30,000 lines of CSS to begin modifying the layout, or ignores the power of the MVC architecture forcing some unique templating system upon its users, often poorly documented.
Other horrible stories include minor version releases of extensions completely redoing the style classes in the overrides between updates (forcing you to redo it all on upgrade), mixing style and layout options in multiple locations like its an easter egg hunt, and including hideous default styling that reminds me of things I used to see on geocities websites.
There are certainly a few special cases that have little choice, generally when they implement outside party tools, non-html elements, or services. However the goal to simplify output customization remains.
What drives developers to do this?
I can think of a few reasons, but by now they are all pretty excuses.
Sometimes the problem is the extension has been around for a while, and the code is mostly from those times. These extensions are basically Mambo or Joomla 1.0 extensions that have been hacked to work in 1.5 (sometimes only with legacy). It has been 2 years since Joomla 1.5 came out, and if the extension is living in the past, they very well haven't implemented the positive changes.
Extensions that have massive output parameters are likely the most difficult to style. It only makes sense. However, why not rely on the default styles more? Perhaps you can provide multiple css files, one that has the essential layout styles, and one that has your predefined template so its easier to manage. I might actually want all of my links to be green, and not your purple override style.
I think its often about control over the program, as Joomla can be very complex when you load it up with several extensions. Often larger extensions exert a larger control over the way Joomla operates (makes sense), but in order to enact their plans of Joomla superiority, they have to muscle out your defined template styles.
It boils down to a balance between the work put into the program, the developer's familiarity with MVC and template overrides in Joomla, and how much control the developers wish to exert over the default design.
What does it do to end users?
I began with saying that a large portion of my time is spent making a Joomla template merge with the extensions. This means higher costs. It also means that it takes more skill to implement these extensions, especially if custom design elements are required. So it means that your extension is less accessible, and costs users more.
It also creates submarkets in the Joomla world. Essentially, these extensions segment the Joomla community because of their unique demands on the developers, and you start to see support services, templates, and other extensions growing around it. Is this bad? Not exactly, but it does limit the impact of your extension and user's options. There is a push for many template makers to create extension specific templates, which seems more important than the base theme itself. This is a problem for the sustainability of Joomla as a common ground, in my view. It creates a subcommunity that acts almost like a fork.
One possible answer is being implemented in Ninjaboard 1.0
Stian Didriksen is the lead developer for Ninjaboard 1.0 (not to be confused with Ninjaboard 0.5), which has been built completely from scratch. He has been developing some techniques that are one possible method of getting around this issue. Stian was kind enough to share some thoughts with what he is doing, and why.
In my opinion, the components should reuse as much of the main template as possible. The core purpose of Joomla's templating and component/module system is to have one template that the components and modules just worked with. For Joomla, this is still true today with modules, but the trend with components is the opposite mostly because of lack of knowledge I think.
Its important to never assume things like, what background color the user is likely to have, font/typefaces, that's just more work for the user. Reuse as much of the common template classes, and conventions as possible. And finally, all html output should be in layouts and be overridable, including css, javascript, and helper files!
I know that a lot of work has gone into the new Ninjaboard forum extension, but the flexibility of the extension to mould to different templates is extremely impressive and so terribly practical for end users. The methods used are just one of the possible ways to do this (and you'll have to check it out to see how it works), but in general the larger the extension the more creatively the extension will have to handle output. Ninjaboard has made this one of the extension priorities, and I certainly believe it will make it far more popular (and practical) because of it.
Even if your template methodology is valid...
Some developers will respond with something about their method being the most practical method, or the only way to ensure their extension works. I say that is not true. Sure, not all templates are the same or implement the same styles, so there is no guarantee to rely that they have the styles you need. Sure, major extensions require major layout styles. There is another way, and its no secret.
Rely on Joomla.
Design your extensions to fit the MVC architecture. Provide me with as little css to modify by planning your styles and output well. Give us the ablity to override if we must, but work to make sure it fits in as best as possible by default with our templates. Update your code, or start over. Get creative, but play by the guidelines. The future of your extension relies on it.
And please, never override my template.
About Gnome on the run
We are a full web development studio located in the Houston, Texas area. We blog about websites, video, design, business, web analytics, conversion tracking, and various open source projects we work with.
You can track us on the following networks and ways.
Need help with your Joomla site?
If you have a project you'd like to ask us about, feel free to request a free consultation from us.
