Forgot your password?
typodupeerror
Image

Joomla! 1.5 Development Cookbook 32

Posted by samzenpus
from the read-all-about-it dept.
Sparky Anduril writes "In Joomla! 1.5 Development Cookbook James Kennard has written an accessible and easy-to-read book to help anyone who is writing (or plans to write) extensions for the popular open source content management system, Joomla! (specifically for version 1.5). It is available as a paperback or PDF eBook." Read on for the rest of Jonathan's review.
Joomla! 1.5 Development Cookbook
author James Kennard
pages 360
publisher Packt Publishing
rating 9
reviewer Jonathan West
ISBN 978-1-847198-14-3
summary Recipes for developing extensions with Joomla! 1.5
This is not an introduction to writing extensions for Joomla! For example, it does not describe the architecture of extensions, nor does it suggest how you should go about designing or developing extensions. The book does not claim to do this and you will need to look elsewhere if you need introductory material on that subject.

What this book does provide however is a number of "recipes" that developers can use to solve common problems when developing extensions for Joomla! As such it is a very useful resource that can be used in two ways: the inexperienced developer will want to read through the entire book chapter by chapter, to understand the issues they will need to consider. The more experienced developer will want to use this book as a reference book, dipping in when they encounter a particular problem or face a particular task.

The first thing to say is that (perhaps unusually for a software developer) James can write! His English is clear and I cannot imagine anyone having any complaints about his grammar. This means that despite being a technical reference the book is a pleasure to read.

Each recipe is laid out in the same format (as you would expect from any good cookbook!) The title of the recipe is followed by an explanation of the problem or task. "Getting ready" lays out what you must do before getting to the body of the recipe. "How to do it..." is laid out as a set of code statements with a brief explanation. "How it works..." provides more explanation on why to do what the recipe says, often accompanied by example data. "There's more..." lays out additional things to consider, perhaps more you can do with the recipe or alternative ways of achieving the same end. Where they are alternatives, James is generally very careful to explain the pros and cons of each approach. "See also" provides a cross-reference to related recipes in the book.

The first chapter is an essential introduction to getting involved in the Joomla! open source community through JoomlaCode.org. James explains how to create a new project and manage that project. The chapter concludes by explaining the use of TortoiseSVN for managing the source code of your project. I found that the explanation of the top-level folder structure and the use of branches within SVN was particularly illuminating.

The next two chapters provide further general background: chapter two provides recipes to ensure your extensions remain secure and chapter three describes how to work with the database. While James does not explain the underlying security issues (e.g. he does not describe what SQL injection is and why it may comprise security), the recipes provided (that address keeping your SQL safe, ensuring filenames and folders are safe and that you ensure that request data does not pose a threat) are easy to follow and I was able to work out why they should be used. The chapter on Working with the Database explains how to construct and execute SQL queries and the use of the Joomla!-specific JTable object. While I am familiar with working with SQL, this chapter was an eye-opener to me as it shows very clearly how working with the database under the Joomla! framework is different from conventional approaches, and how the JTable object makes it very easy to manipulate the database.

The remaining chapters of the book each focus in on a particular area. James covers the following topics: "The Session and the User", "Multilingual Recipes", "Interaction and Styling", "Customizing the Document", "Customizing the Backend", "Keeping it Extensible and Modular", "JObjects and Arrays", "Error Handling and Reporting", "Files and Folders".

The range of topics covered is such that it will ensure you at least think about some issues that otherwise may never have crossed your mind. For example, you may not have considered it necessary to make your extension available in other languages, but in the chapter on "Multilingual Recipes" James shows that it is incredibly easy to make your extension language-aware, so even if you're not going to provide a Slovakian or Sanskrit translation you can at least ensure that your extension will support those languages (should someone out there want to do the translation work for you — which is often what happens with Joomla! extensions).

A brief summary of the content of each chapter, with a few highlights picked out, follows:

"The Session and the User": recipes cover how to use session data and how to find out information about the current user (whether guest or logged in), restricting user access based on privilege and using a user's parameters.

"Multilingual Recipes": how to ensure your extensions can support other languages, and also how to provide a translation (if you're gifted that way!)

"Interaction and Styling": applying CSS, Javascript, Ajax and MooTools to enhance your extension. This does not cover what CSS is and how to style a page, but rather how to ensure you plug CSS into your pages correctly using Joomla!

"Customizing the Document": ways of modifying the response by working with the Joomla! JDocument object. The most interesting recipes cover how to create PDF and RSS or Atom feeds from your component. This chapter is a little hard to get into as so little context is provided, but it is assumed that the reader will already have that context from a fuller knowledge of how Joomla! extensions are designed and developed.

"Customizing the Backend": provides a useful set of recipes so you can customize the backend (or administration element) of your component. James covers useful items such as disabling the menu bar (needed if the user is currently editing the configuration, so they cannot for example logout when half-way through an operation), creating a filter header (like the article filtering by section/category in the in-built content component) and how to enable tabular data to be ordered (by licking on the table header).

"Keeping it Extensible and Modular": looks at how to use Component Based Development the make it easier to develop and ensure extensions are more flexible. One very useful recipe shows you how to write a search plugin for your component; a further set of recipes describe how to manage component parameters (enabling your users to configure the behavior of your component through the backend).

"JObjects and Arrays": "Error Handling and Reporting": "Files and Folders": The final three chapters cover some fundamental concepts and provide recipes that explain how to manipulate data, manage errors and deal with files and folders.

I personally have extensive experience of building web sites using Joomla! but have no experience in developing extensions. However as a software professional I have several years experience of software development, and will find this book very useful as I start to become more involved in developing extensions for Joomla!

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

*

This discussion has been archived. No new comments can be posted.

Joomla! 1.5 Development Cookbook

Comments Filter:
  • Hmmm (Score:1, Troll)

    by Antony-Kyre (807195)

    PDF eBook? So, a book on open source is DRM laced? How ironic.

  • by gcalvin (325380) on Friday January 29, 2010 @01:52PM (#30953132) Homepage

    Don't lick on that table header! You don't know where that table header's been!

  • update soon? (Score:1, Insightful)

    by Anonymous Coward

    v1.5 book released just in time for v1.6, wheeeee

    • Re: (Score:3, Insightful)

      by creimer (824291)
      Considering how long Joomla! 1.5 has been out before this book appeared, don't expect a mad rush of books for Joomla! 1.6 when it does come out. Being a Joomla! module developer myself [cdreimer-associates.com], I'm hoping that the transition between the two versions will be relatively painless.
      • Re: (Score:3, Funny)

        by SuperCharlie (1068072)
        If Ive learned anything from the 20-30 sites Ive done with Joomla, its that nothing with Joomla is painless.
        • by creimer (824291)
          True. Since my modules don't get into the guts of Joomla, I'm hoping that it will only be a version number change in an XML file. The next project I'm working on probably won't be that painless.
          • rm -rf /var/www/

            That's pretty painless when dealing with a Joomla! install.

            That being said though, I work with Joomla! as an internal tool. It's not as painful as any number of CMS systems I've worked with, but it's certainly not the best. the API in 1.5 is surprisingly robust but has some documentation issues. Thankfully if you can fully grok PHP, and don't mind peering into the codebase every now and then, it's not a horrible experience.

    • by mfh (56)

      Joomla is good for some things, but for most things Wordpress or even Google pages is better.

      • Re: (Score:2, Insightful)

        by roadsider (970039)

        We've deployed sites using both Wordpress and Joomla, with all of the Joomla sites going out after I came on board. Since that point, I've also had to deal with all the Wordpress sites done by my predecessors, and there's nothing about those that I consider "better" than the ones we've done with Joomla. In fact, on at least one site, we really need to hire a developer to properly incorporate a feature we could easily do by installing a free Joomla extension.

        Joomla is not a great system if all you want is a

  • Don't create new websites using Joomla.
  • by Rhaban (987410) on Friday January 29, 2010 @02:45PM (#30953790)

    Everytime a developper codes a joomla module, god drops a tcp packet.

  • it is evil (Score:1, Funny)

    by Anonymous Coward

    JOOMLA FUCKING SUCKS!

  • WebGUI [webgui.org] is a much more powerful CMS than Joomla, and it's much easier to write plugins for.

The typical page layout program is nothing more than an electronic light table for cutting and pasting documents.

Working...