My favourite Joomla 4 feature - Extendibility (Søren Beck Jensen)
Yes, we all love the Joomla core and all the possibilities that come with it. But for Søren Beck Jensen, the beauty of Joomla lies in the extendibility. Joomla follows a predictable development pattern, which makes it very suitable for complex projects that need custom (extensions) development. In this issue, Søren tells us how every core feature and functionality can be extended, and along the way provides us with some useful tips on how to do it.
Thanks for participating in this article, Søren! Could you tell us a little about yourself?
My name is Soren or rather Søren, as we write it in Denmark where I am originally from. I have been living in Spain for the past 17 years, where I have a 14-year-old daughter and a 5-year-old son. My wife Lili is from Mexico and is a graphic designer (who designed the Joomla social media templates that Joomla uses).
My company is called Jensen Technologies, and we do custom web and app development and are behind Component Creator for Joomla.
So your favourite Joomla 4 feature is the Extendibility. Could you elaborate on that? What is it, what does it mean?
I would like to expand that to “structured extendibility” if I may. What I mean is that almost every core feature and functionality of Joomla can be extended. In a structured and opinionated way.
At first glance, “opinionated” might not sound so nice, and it may even be a little frustrating for some 3rd party developers at first, but for the ecosystem and the experienced developer it is a blessing. Let me explain.
Joomla (unlike WordPress for instance), lays out general rules for developers who wish to extend the core functionality. This means that developers are strongly encouraged to code extensions in a certain way (following the Joomla MVC). The benefit of this is that any Joomla developer can work on code developed by any other Joomla developer, and this to me is really the biggest strength of Joomla.
If you are an organization that invests thousands of dollars into developing some custom functionality for your web project, then you are not locked into using the same provider forever. You can hire another developer or a freelancer to work on your extension, and they should be able to quickly identify and fix a bug or improve a feature using the standardized approach.
This kind of benefit takes years to reveal itself and might not be what you would first associate with Joomla. But as a company consulting in both Joomla and WordPress, I can tell you that this is one of the biggest challenges for complex WordPress sites that Joomla sites handle much better.
We have taken over many disaster projects over the years in both Joomla and WordPress and have had to recommend completely restarting the project over simply fixing it, on many more WordPress projects than Joomla.
The fact that Joomla follows a predictable development pattern, makes it a much safer bet for complex projects that need custom development. It also makes it much more fun to develop in, to be honest.
Joomla 3 was already pretty expandable. What makes J4 extendibility an improvement?
There is not much change in the extendibility to be honest, which might be one of the strengths of the Joomla project as well. The MVC is largely unchanged, which makes it easy for experienced Joomla 3 developers to take up Joomla 4 development. However, the introduction of namespaces, improved autoloading and the minimum requirements of PHP 7 are very welcomed.
I am really amazed at all the work that a group of volunteers with no financial support has been able to achieve with making Joomla 4 a modern development framework. I have so much respect for those guys.
So you can expand Joomla with extensions, but what if you need an extension that doesn’t exist yet? How hard is it to create extensions for Joomla?
Following the Joomla Documentation, it is relatively simple to develop your own extensions, but I would be silly not to recommend using our own Component Creator for Joomla for building (and learning) proper extension development. It is completely free to build a component with just a single database table and really is a great way to learn how to structure and build a component, the right way.
I would also like to say that Joomla comes prebuilt with re-usable features such as custom fields and that I recommend reusing what you can from Joomla core instead of building a custom component if you are able to.
What knowledge do we need to make the most of this feature?
There is excellent documentation on custom fields which I recommend learning first. If you can’t use custom fields for your project and you wish to extend Joomla with an extension, then you can learn how to write your own or simply use Component Creator.
Do you have tips for users when it comes to extending the functionalities of their Joomla website?
Learn the Joomla MVC and stick to it rigorously. Don’t be lazy and add a database query in the controller. Don’t try to reinvent the wheel. Re-use the many helper classes and methods that Joomla provides for string manipulation, html rendering and SQL security etc.
You are already miles ahead by developing in Joomla, but don’t shoot yourself in the foot, by not following the “Joomla way”.
Share your favourite with us!
By accepting you will be accessing a service provided by a third-party external to https://magazine.joomla.org/