Joomla! 1.5 Development Cookbook 32
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.
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.
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 |
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.
Re: (Score:1)
Liar it sucks twice as much and you know it.
Hmmm (Score:1, Troll)
PDF eBook? So, a book on open source is DRM laced? How ironic.
Re: (Score:3, Insightful)
That's not ironic, that's just incongruous.
by licking on the table header? (Score:3, Funny)
Don't lick on that table header! You don't know where that table header's been!
Try Drupal (Score:4, Insightful)
Drupal is a far superior and really well thought-out PHP framework compared to Joomla.
I don't disagree that PHP makes it really easy to write horrible code, but that doesn't mean that all PHP is horrible, or that everything else is automatically better. For instance, I am currently working a large Java project that is far more of a horrible mess (and takes 10x longer to get actual work accomplished) than any PHP project I've ever worked.
Re: (Score:2)
Re: (Score:1)
Re: (Score:2)
I've been comparing both to replace 2 of my websites. While it may require some knowledge to use, for the most part it 'just works'. The hooks are simple.
And in what stunned me the most, I would download a random theme. Run it through the W3 validator... and it came back valid. With what ever document I threw at it.
Joomla was much more difficult to try and get what I wanted. And there seemed to be more "Pay us and we'll fix it" installations.
Re: (Score:2)
I have set up plenty of Drupal sites for non-technical users who have no problems updating content. It's important to create Roles carefully tailored for specific use, instead of just handing them the Admin account (which would be quite bewildering).
I will certainly admit that building your first Drupal site comes with a near vertical learning curve, but the community is fantastic at providing help, and once you get over the hump it's an incredibly powerful, flexible, and extensible platform, with thousand
update soon? (Score:1, Insightful)
v1.5 book released just in time for v1.6, wheeeee
Re: (Score:3, Insightful)
Re: (Score:3, Funny)
Re: (Score:2)
Re: (Score:2)
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.
Re: (Score:1)
Joomla is good for some things, but for most things Wordpress or even Google pages is better.
Re: (Score:2, Insightful)
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
For the sanity of all involved. (Score:2, Informative)
Joomla! is evil. (Score:4, Funny)
Everytime a developper codes a joomla module, god drops a tcp packet.
Re: (Score:2)
Re: (Score:2)
it is evil (Score:1, Funny)
JOOMLA FUCKING SUCKS!
Try WebGUI (Score:1)