Tuesday, August 26, 2008

Way to go Joomla!

I am not really fond of Joomla or PHP for that matter. I am more of a Python kind of guy. I like things being ordered and symmetric. To the point...

Recently I needed to craft a site for a friend's business in a hurry. I had some experience with writing/debugging PHP before but more importantly I have used Mambo and Joomla before. Need to make something clear: I have been using both as an end user! In a matter of days I remambered what Mambo was all about and crafted the site in question, installed some components and modules and a new template. Everything worked out fine, my friend is happy, I'm happy, peace all over the world...

The component used by the site is one written for Mambo 4.5.x/ Joomla 1.0.x and hence I had to use that one. Geeky by nature I had to check out how the component would fare in Joomla 1.5. As you have probably guessed by now, it did quite poorly. It did not install even. Being an amateur developer I decided to look within the code, dig in a bit deeper and check if I can flex my fingers on the keyboard and massage it a bit Joomla 1.5.x style.

I decided that the simplest and quickest way to go would be to simple change any references to old functions and stuff like that, so I went that route. After a week I noticed I am not going anywhere this way, it was hopeless. But wait I've been coding for a while, this should not pose such a big problem, it is a rather simple problem. So on to rewriting it was. This woule require more effort but hey, a person learns his whole life, why not learn this. I took a book from a friend, a Joomla 1.5 extensions development book, to be precise. I read through it quickly, it was an easy read and not a too long one - roughly 150 pages. Time for some coding. I rolled up my sleeves and began hammering out some code. Few hours of coding behind my back I stumbled for the first time. The code in the book I read did not work. I did a quick check for the version the book was for and it read 1.5. So the API changed at some point in time after Joomla 1.5 was out, but we are only a x.x.point release from the 1.5 branch. Red point number one!

The "bug" I found was an undefined function. It was removed from the framework somewhere. First thought was to look it up the API. The API itself is kind of hidden in the Joomla site (thank you Google), is not searchable and to top it all is rediculously slow to load. I looked here and there within the API to no avail. Nowhere was there a mention of my missing function, so I turned to the Joomla forums where I only found a few other people like me who had used the function (probably read the same book) and got the same error but no answer. Upon some extensive use of Google I managed to find a commit log. In it I found a one-line reference saying that the name of the function was changed from "outputFilter" to "filterOutput" or something very similar to that. Difficult access to information for rookie developers scores one more red point in my table.

I managed to move on coding various aspects of the component but was constntly annoyed with the documentation. Sometimes the documentation was refereing to API that was depriciated in Joomla 1.5 and sometimes even in Mambo. For some things there is virtually no documentation. I will not even mention the fact that the documentation is spread across a wiki, a documentation page, a forum... Perfect order. Strike three.

Right now I am quite frustrated with all this. I will still continue developing the component as I would like to update my friend's installation to Joomla 1.5 (hopefully less security risks). Further it is a bit of a challange and I like one of those. I just want to send a clear message to the Joomla team: Guys, you might want to revisit your strategy for gathering developers under your flag. Right now I'd say you are trying to scare everyone off from coding for Joomla...

No comments: