Joomla devs: the time has come for a general quality improvement of the Joomla extensions code.
So, if you develop extensions (or you're thinking about doing it) please read on to learn about the why and what.
All the world will be grateful sooner or later.
What is all this about?
Lately I have grown a new habit: I try to attend to conferences on technologies that I verstehe nur Bahnhof about (meaning: something I really don't know about. Thanks, Memrise).
It's usually a very difficult and tiring day but I end up knowing at least a bit of a new technology, and that's a good thing.
While attending one of this conferences, which was about a non-Joomla PHP framework, I had a glimpse of how well organized these frameworks are.
And also a glimpse of how a good developer, who knows how to code well and how to leverage the framework, can:
- gain a lot of time
- create software that works better (read: not-buggy) and faster (read: efficient)
- create software that is easy, nay, ridiculously easy to fix and improve
- create software that is easy for anyone else to understand and work on
What it has to do with Joomla?
I think that writing an extension for Joomla is somewhat easier than to write an application for another framework.
That may be a good thing because it lowers the entry barrier. But it's also a bad thing because of exactly the same reason.
How many of you have written an extension by basically only copying and editing an existing one?
Just when I was deciding if this topic was worth some additional thought, I read a Tweet from our friend and big Joomla contributor Janich Rasmussen:
Reviewing exts = really ashamed of all those fellow devs who ignore true framework and cms usage! :(
Ok, I'm not alone, and it's definitely time to say something about it
You and whose army?
We're not the best Joomla developers at all. There are many excellent devs out there and I'm sure you know all the usual suspects.
But I feel we always had a good-practice, standard-oriented way of coding that may sometimes be naif but never bad.
And anyway, all good developers are welcome to have their say if they want.
What we plan to do is to write a series of articles about good practices for Joomla developers.
We mean to talk about several topics. Here a few of them, in no particular order:
- models vs helpers
- using Joomla and PHP classes
- naming conventions
- folder structure conventions
- version checking
- error management
- where to use SQL and where not to
- where to validate your data
- external stylesheets
- comments and documentation
Possibly other topics will come up during this series, and we will gladly accept suggestions.
Stay tuned, then, and we will soon create better extensions for our favourite CMS!
Articles in this series
- Prepare your environment
- Everything in its right place
- Put CSS and JS out of the door
- Do not reinvent the wheel
- What MVC is really about
- MVC sample code
- Other useful files in your MVC component
- Basic error management
- Why a coder needs to be a writer
- About version numbers
- Design patterns
- The e-book version
- Refactoring your code
- Latest news from JDatabase
- More on the JLog class