Slashdot Mirror


Learning Joomla! Extension Development

Michael J. Ross writes "One of the most powerful and popular content management systems (CMSs) is Joomla, a superior derivative of Mambo. Out of the box, Joomla makes it relatively easy to build Web sites that allow collaborative editing of content, attractive styling via prebuilt templates, and many more features. A Joomla-based site can be further improved by adding custom modules, components, and other extensions to the CMS, without any modification to the core Joomla code. A resource that explains how to do this, is Learning Joomla! 1.5 Extension Development: Creating Modules, Components, and Plugins with PHP, by Joseph L. LeBlanc." Read on for the rest of Michael's review. Learning Joomla! 1.5 Extension Development author Joseph L. LeBlanc pages 176 publisher Packt Publishing rating 8 reviewer Michael J. Ross ISBN 1847191304 summary A practical tutorial for creating Joomla! 1.5 extensions

The book is put out by Packt Publishing, under the ISBNs 1847191304 and 978-1-847191-30-4. The publisher maintains a page on their site dedicated to the book, where visitors can read summaries of the chapters and the overall book, order the e-book version (in PDF format) at a discount, download the book's sample source code, read and submit errata and feedback, and download a sample chapter, namely, "Chapter 1: Joomla! Extension Development: An Overview" (also in PDF format). Note that, as of this writing, the errata and feedback do not have their own links, but are located on the page accessible via the link "Code download," which should be clarified.

The book's title page bills it as "A practical tutorial for creating your first Joomla! 1.5 extensions with PHP," and that is exactly what the book is. Rather than organizing the information in a cookbook style — which is quite popular in programming books nowadays — this particular one uses a narrative approach, in which the author illustrates the concepts by stepping the reader through an example project. He begins with a clean install of Joomla, without any of the sample data, and shows how to "build extensions to create, find, promote, and cross-link restaurant reviews."

The nine chapters of the book are organized in a logical manner, and in the order that the typical developer would go about extending a Joomla-based site: overview; Joomla's component structure and registration; backend and front-end development; module development; using the model-view-controller design pattern (MVC); creating plug-ins; adding configurability for the extensions that you have created; packaging the extension elements for use by other Joomla developers.

In explaining the key concepts and procedures for building custom extensions to a Joomla site, the author takes a methodical approach, with a healthy balance between exposition, sample code, and illustrative figures. The chapters read quickly, and the code changes from one section to the next are helpfully bolded. The chapter summaries, as with most programming books, add no value, and could be beneficially dropped, thereby saving space.

The author states in the first chapter that there are three types of extensions within Joomla: components, modules, and plug-ins. This could be confusing to anyone who has read the articles that help introduce Joomla to the new developer, and are contained in the sample data found in Joomla version 1.5. Those articles include one titled "Extensions," which lists two additional extension types — templates and languages — not considered such by LeBlanc. However, that article does not make clear as to why templates and languages should even be considered extensions, which seems counterintuitive at first glance.

The presentation of all of the material in LeBlanc's book is not perfect, but it is certainly more than adequate. It is unfortunate that the book does not have a lay-flat binding, which tends to be more of a problem with slender volumes such as this one (176 pages), since much thicker books have more weight to keep both sides down on the table at the same time when the book is open. All of the screenshots have a bit too much pixelation, which makes the smallest text within the screenshots more difficult to read. However, none of that text is unreadable. The book's text outside of the screenshots is quite easy to read, with a generously-sized font and a logical layout of each page's material. Almost every page has two horizontal lines, one at the top, and one at the bottom; they serve no purpose, and could be eliminated to save ink and space, as could the brackets around every page number. The same is true for the much larger and thicker brackets used to delineate warnings, notes, tips, and tricks. There were a few other very minor flaws in the book. For instance, in the information about the reviewer, "MySQL" is misspelled. In the Table of Contents, the "Available Toolbar Buttons" line appears to be one font size too small, and thus inconsistent with the other subsection heads. All of these weaknesses are of little consequence and could be fixed in the next edition.

Even if a reader initially had no interest in developing their own extensions to Joomla, this book could easily spark their interest, given that the book shows just how powerful those extensions can be, as well as how doable they are, by any competent programmer familiar with PHP and MySQL. In fact, even if the reader were to later decide that they had no interest in creating any extensions, they could still benefit from the book's discussion of how components are structured within Joomla — a more clear explanation than anything I have seen in the official Joomla documentation. Joomla may be an excellent CMS, but the documentation quality does not come close to the value of Joomla itself. That is why there is such a great need for books such as this one.

Although Learning Joomla! 1.5 Extension Development: Creating Modules, Components, and Plugins with PHP has some weaknesses — as do most if not all technical books nowadays — for any developer interested in getting the most out of Joomla by building custom extensions, LeBlanc's contribution should prove especially informative and useful.

Michael J. Ross is a Web developer, freelance writer, and the editor of PristinePlanet.com's free newsletter.

You can purchase Learning Joomla! 1.5 Extension Development from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

11 of 92 comments (clear)

  1. Re:Never used it myself. by Dekortage · · Score: 4, Informative

    I've used Typo3, Joomla, and Drupal. I would say that Joomla is the easiest to set up and use, but it also less customizable (although it seems to have more e-commerce plugins than some of the others). If it does what you need it to, Joomla is great. I haven't used PHP-Nuke in years but my impression is that (again) Joomla is superior in ease of use and inferior in flexibility.

    The CMS Matrix has a summary of features (which can be compared against other CMS systems in its list).

    --
    $nice = $webHosting + $domainNames + $sslCerts
  2. Re:OK, seriously. by colin_s_guthrie · · Score: 4, Informative

    IIRC the name "Joomla" roughly means "community" in I think Swahili. This was chosen at the point when Joomla forked from Mambo due to issues over the formation of a for-profit foundation to commercialise Mambo. The main developers thought that this was diverging away from community feel of the project and so the name they gave to the fork reflected this sentiment: that they really care about the community.

    As for the exclamation mark, well I have no idea!

  3. Re:Never used it myself. by klenwell · · Score: 2, Informative

    Joomla's admin controls definitely look slick, but I quickly noticed the inflexibility, too. Also, its lack of support for granular privileges was one of the things that turned me off of it. I think there's an extension, but I prefer Drupal's built-in support.

    Thanks for the link to the CMS Matrix site. I'd been looking for something like this.

    --
    Innovation makes enemies of all those who prospered under the old regime... -- Machiavelli
  4. Re:Never used it myself. by bertboerland · · Score: 2, Informative

    Maybe you ought to *REALLY* checkout Drupal. It has nothing to do with the *nukes( and is a very solid and clean content management framework used by many high end companies around the world).

    --
    -- for undocumented cisco commands, take a peek @ dotu
  5. Re:Never used it myself. by yuda · · Score: 3, Informative

    I've used all three 'nuke, drupal and joomla. We started migrating sites from nuke 3 or 4 years back as we found nuke was lax on security issues and one site in particular was hacked 3 or 4 times in as many months. Personally I'm not such a great fan of Drupal, the majority of drupal sites have a very generic feel and tends to take a lot of extra work to get something that looks nice (especially if you're wanting a forum) in saying that it's a pretty solid cms, easily customisable and we didn't run into the same problems with security as nuke. I've only had a real quick play round with joomla. Personally I think form an end user point of view it's more intuitive and easier to use out of the box than drupal but I found it much harder to customise than drupal. I wouldn't go back to using nuke after the experience I had, I still use drupal for some sites but for a site that you don't want to spend a great deal of time or effort customising for the end user I would say joomla is the way to go.

  6. Drupal by Slashdot+Parent · · Score: 2, Informative

    For What It's Worth, I've never used Joomla, but I do have a few Drupal sites. Druapl definitely takes the security of the platform seriously, and they fix up vulnerabilities quickly.

    Over the security mailing list, I haven't seen an SQL injection attack in as long a I can remember. Lately, it's all been XSS. Anyhow, they're good about getting the word out to Drupal admins whenever anything is discovered in Drupal core or contributed modules.

    Joomla probably has something similar, but I don't know about such things.

    --
    They don't grade fathers, but if your daughter's a stripper, you fucked up. --Chris Rock
  7. Re:Ending your product name with an explanation po by Abcd1234 · · Score: 4, Informative

    Just to make it clear to any idiot mods who might attempt to give the parent a +1 Insightful/Interesting, Saskatchewan doesn't include an exclamation point in it's name. That's merely a marketing gimmick on their provincial website (and trust me, Saskatchewan can use all the marketing gimmicks it can get ;).

  8. Re:Never used it myself. by Just+Some+Guy · · Score: 3, Informative

    How does it compare with Drupal or PHP-Nuke?

    I haven't used Joomla!, but I'm absolutely in love with Drupal. It's very easy to administer (if you're at least a little tech-savvy) and has modules available for just about anything you might ask of it.

    For example, at my personal site, I have a personalized home page with all the content I would normally have on iGoogle or My Yahoo!. If you were actually logged in as me, that page would also have my stock quotes and weather information.

    I liked it well enough to convert most sites I host to it (and it has great support for virtual hosting) because I found that I was spending more time managing the management system than the content in my old setups, where Drupal just gets out of the way and makes it easy maintain. Again, I love it.

    Oh, and there are plenty of nice themes floating around. I really don't like the ones that come with it any more than some of the other posts, but it's easy enough to drop in another.

    --
    Dewey, what part of this looks like authorities should be involved?
  9. Re:Ending your product name with an explanation po by FesterDaFelcher · · Score: 2, Informative

    Not knowing the difference between "explanation" and "exclamation" should be punishable by death.

    --
    My user number is prime. Is yours?
  10. Re:Never used it myself. by Propaganda13 · · Score: 2, Informative
    http://www.opensourcecms.com/ has live demos for around 50 CMS plus blog, e-commerce, forums, etc.

    I was going to play around with Joomla! and SMF, but the bridge had been discontinued.

    For those who wonder why we have had to come to such a decision, we have had input from both the Joomla! project and the FSF directly, and it is the stance of both Joomla! and the FSF that the use of a bridge into a GPL-licensed system constitutes the creation of a combined work. This forced us to reconsider our development of the bridge and look for ways we could accomplish the task while still respecting the licensing of both projects. Ultimately, that proved impossible. When discussing with the FSF, they stated that the bridge and SMF would fall under the GPL license, and there is no workaround.


    I didn't see it as a combined work, and I wanted the functionality to play around with so I caved and went with Mambo. (I use IceWeasel if that's any consolation)

    While it is fairly easy to use, the way the default homepage is sorta hardwired was a little bit of an issue. As stated in other posts, the differences between components, modules, and even mambots isn't obvious or explained. Templates and layouts aren't hard to adjust if you're used to using CSS, though better doc in the default css pages would be helpful.

    Sidenote: I had some issues with the bridge, but got it worked out. The instructions seemed to have left out a few things to check.
  11. Re:Vulnerabilties for all. by TechyImmigrant · · Score: 2, Informative

    >cgi-bin? hmm, not too familiar with php, are we?

    Yes, I've done my share of PHP. It can go in cgi-bin as much as it can go anywhere else.

    If computer security is your profession (as it is mine) then you might be aware that a not uncommon technique is to configure the web server to disallow the execution of any code, including PHP, outside of a specific place such as cgi-bin. Thus reducing the attackable footprint.

    --
    Evil people are out to get you.