A Code Journey: Concept to Core

Something you often see asked around the internet is how you can contribute to Joomla!.  Whether it be code, docs, support, or marketing, folks always seem to want to offer something.  So, we'll take a look at the 15-month journey to get a not-so-typical feature request merged into Joomla.


The concept for this patch was actually quite simple.  To help modernize the CMS architecture, we rebase the top level application classes onto the newer web application class, helping to migrate away from what is now considered legacy code in the CMS (and in many ways, duplicate code with the new architecture in place).  As with everything that starts off seeming simple, it never is; by the time the patch was merged into the CMS, a total of 67 files ended up needing editing in some form with a net of 2,284 lines of code added to the package.

Ironically, making the concept work was quite simple.  The idea originally came as I was looking at how the new application classes could be used in the CMS while preparing my talk for J & Beyond 2012.  In its crudest form, it took around 10 hours of effort to get the original concept working, and it worked decently.  There was still a lot to be desired in terms of code use, what actually changed, and dealing with certain backwards compatibility issues.

Continuing the Push

The concept was one that came and went for me over the months following that initial push to write the code and with other projects and focuses going on at the time, it fell by the wayside for a while.  Over the following year, the idea resurfaced and went away a couple of times before finally making the big push to get it in.  Quite frankly, it was becoming harder to justify not making the switch at this point.  Many of the new libraries written as part of GSoC 2012 have dependencies on the newer application classes and development was potentially being hindered with this incompatibility.  You can't use the JOauth libraries in the CMS because of this, which really limits the adoption of the JFacebook and JTwitter libraries.

Committing to Core

So came the beginning of the summer this year and realizing the need to get this restructuring implemented sooner than later, I went through and rebuilt the code.  And in doing so, I took the chance to discuss backwards compatibility issues and replacing other duplicated code with this effort with others in the community.  The end result is an API that should be nearly transparent to all when updating from 3.1 to 3.2 and a bunch of duplicated code starting to find its way out of the CMS.  With this, new doors are opened for new extensions and using these new APIs in the CMS.  So developers, get your development environments ready and enjoy the new possibilities coming soon to a Joomla 3.2 near you.