The New Joomla Framework
- Published: 03 April 2013
Over the last few months, the Platform team of maintainers and developers have been talking about future directions. One of our goals for this year is to introduce namespacing. This has been a very large undertaking and as work has progressed, it became obvious that backward compatibility was going to be a constant battle. One of the negative side-effects of this would be that the Joomla CMS wouldn’t be able to use the planned 13.1 release of the Platform for some time if we introduced namespacing in that version.
After a lot of discussion both internally and with other developers in the community, in order to address the problem, as well as to take advantage of some new opportunities, we’ve decided to make some changes to the Platform.
Changing the Name to the Joomla Framework
Because the impact of the namespacing change is so significant, and coupled with other changes outlined below, we’ve decided to rename the Joomla Platform back to the Joomla Framework (this was the original name up to the release of Joomla 1.6 in 2011).
The changing of the name is important because it draws a line between what really could be considered as the engine that the Joomla CMS ran on (that is, the Joomla Platform), and focuses more on a suite of libraries that the wider PHP community can use to build any type of application on top of Joomla code.
Publishing with Composer
Currently the easiest way to get the Joomla CMS is to go to the downloads page and get the latest version. But, it’s not as easy to integrate the Joomla Platform into software projects. However, there are ways the PHP community is distributing library code. PEAR has been around for many years, but more recently a system called Composer has become available and has been widely adopted.
Along with the changes needed to make the Joomla Framework available on Composer, we’ve also taken steps to make each package stand alone as much as possible and with the absolute minimum of dependencies. Doing this will allow you to:
a) install just the code you need to install for your custom applications, or even Joomla CMS extensions; and
b) upgrade just the code you need to upgrade
A New Mailing List
We have closed down and archived the current Joomla Platform mailing list and reopening the old Joomla Framework mailing list that was started back in 2009.
A New Source Code Repository
There is a new repository for the Joomla Framework.
The current Joomla Platform code repository is going to be tagged as version 13.1 (soon) and this code will be frozen as the last official version of the Joomla Platform. The repository will remain public for the foreseeable future but you will not be able to post issues and any pull requests will be closed.
Semantic Versioning of Packages
The old Joomla Platform uses a sequential numbering system based on the current calendar year. Initially this was an easy system to follow but has proven over time to be a bit flawed. The new Joomla Framework will follow semantic versioning practice just as the Joomla CMS currently does. This will make it much clearer when breaking changes have been made in the code (due to an increment in the major version number).
In summary, all the newly created Joomla Framework package versions will be synchronized and we are resetting the version numbering.
Version 1.0 of the Joomla Framework suite will be the debut release, released under the GPL. Developers will be able to include the Framework in their software projects using Composer.
If all goes according to plan, version 2.0 of the Joomla Framework suite will be released under the LGPL and will be ready for the wider PHP community to use. At this point in time, we cannot estimate when that will be, as it depends on talks with our legal team on the license change.
We are providing up-to-date API documentation built on phpDocumentor2 in the new Joomla Framework repository itself.
The API documentation will be automatically refreshed each time there is a push to master.
In addition, the old Platform Manual has been broken up into README files and are now in the root of each individual package. This puts the specific package information with the package making it easier to find.
New Test Strategy
Unit tests are now found in a /Tests/ folder in each package and they will be able to run standalone. Along with the documentation, this centralises everything to do with each package in one place.
Merging the Platform Back into the CMS
The Joomla CMS will not be immediately including the new Joomla Framework code - it would just cause too many problems and too much confusion for Joomla 3.1. However, the CMS will be taking a copy of the Platform code from the frozen Joomla Platform repository and including it where possible. The Joomla Bug Squad will continue the role of maintaining the Platform code, which it does already, but in one place instead of two (thereby reducing double handling).
It will also be making the following changes over the course of the next development cycle (for Joomla 3.2):
a) The libraries/cms folder will contain classes specific to the CMS. This will make it clear what is "CMS property".
b) The libraries/joomla folder will contain library code from external providers and also the platform code that is maintained by the Joomla project that is required for the CMS to actually run.
c) The libraries/legacy folder will contain all the classes scheduled for removal in the next major version of the CMS. This will include all the class proxies that were made as a result of ratifying the new autoloader conventions. It also makes it clear what code developers should be keeping away from while maintaining their extensions.
The Future for the New Joomla Framework
Here is our vision for the new Joomla Framework:
1. That making the Framework available on Composer generates interest in the wider PHP community and encourages people who wouldn't normally think about using Joomla code at all to experiment with it.
2. That breaking the Framework into isolated packages will allow each package to evolve more easily than if all packages are tied to a single, monolithic release.
3. That removing all the deprecated code and the last remaining "CMS code" allows us to concentrate on doing things better rather than constantly battling with the question of "will this break the current CMS".
4. That using Composer and more modern development practices will attract new developers to Joomla project, including to the CMS.
The Future for the Joomla CMS
Even though the new Framework will not be immediately incorporated into the Joomla CMS, there are a number of short, medium and long term benefits for the CMS.
Breaking the Framework into packages will allow the CMS, in the future, to just upgrade the parts of the Framework it needs at the time. At the moment, the CMS needs to take a single version of the Platform and you can't upgrade it in previous versions of the CMS. For example, wouldn't it be great if Joomla 2.5 and Joomla 3.0 could run on the same version of the Platform? That's impossible to do now but is possible in the future with the new arrangement if we plan it well.
When the CMS is ready to do a technical refresh on its architecture, all the experimentation and work we are doing on the Framework now will be ready and tested for the CMS to embrace.
Things will be a little different for a while, but that does not mean that both Framework and CMS can not and will not work together towards a common purpose. For example, Chris Davenport is working hard on a new web services layer for the Joomla CMS. That layer can be built directly on the new Joomla Framework and allows CMS teams and also extension developers to ease into the new paradigms. Projects like the new Joomla Issue Tracker can also start using the Joomla Framework today as can anyone else developing other types of web or command line applications on top of Joomla code.
Ultimately, the mission of the Joomla project as a whole is “to provide a flexible platform for digital publishing and collaboration” and these changes to the Framework are big steps towards making that a reality.