I've spent the last couple of evenings reading over the latest Magento books from Packt Publishing - namely their Magento 1.4 Development Cookbook and their Magento 1.4 Themes Design - which they kindly sent me review copies of after discovering RocketTheme "while searching for professionals with Magento development experience". Considering I've spent the best part of the last 2 years working exclusively with Magento - both developing extensions and constructing themes - I guess I'm pretty well versed in the ways of Magento, but as Magento is such a large system, I figured I'd likely learn something new, so I took them up on their offer. So, in case anyone is considering purchasing some Magento study guides, I'm going to give you a quick review of each book. First up, it's the "Development Cookbook".
Magento 1.4 Development Cookbook
The development cookbook is good introduction to module development. The first chapter of the book is dedicated to setting up a development environment, including installing a virtual host with Apache2, PHP5, and a MySQL server. I'm guessing for most people this section will be skipped over, as installing MAMP (on a Mac) or XAMPP (on a PC) will shortcut this whole process. They then go on to explain the setting up of a subversion repository, though again I think this will be skipped by most readers, but it is useful information regardless.
For an IDE they recommend NetBeans, which I myself use, so I can definitely vouch in it's favour. It features code completion, real-time error checking, debugging, and more, so it's well equipped for the job. My only gripe with it is it's a bit of a RAM hog, so I've been trying out a few other recently (currently trying Espresso which is also great) but I have a feeling I'll end up back in the NetBeans camp.
Chapter 2 deals with "CMS and Design". Some of the topics covered are:
- Adding a home link to the menu bar
- Customizing a Magento error page
- Adding a custom CMS layout template
- Adding an RSS feed (last five tweets for example)
- Placing the contact form in a CMS page
- Integrating JW Image Rotator
They've picked a well-rounded selection of examples, as they cover a lot of different areas of Magento, and they can easily be used as "templates" for adding other things, simply by following the tutorials and replacing the code examples they give with your own. They also add a summary of what's happened, in simple terms, at the end of each section, which is a nice touch.
The third chapter deals with "Adding Extra Functionalities", including integrating Wordpress (in the simplest form) - although there's no mention of single login for both or anything - it really is just 2 separate installs with the same theme. After this they explain how to add jQuery, use Lightbox2 on the product view, and add a banner in the footer. Again, quite simple examples, but good for a lot of different applications.
Chapter 4 is all about "Customizing a store". They cover a fair bit of stuff here, so for me this was one of the meatier chapters. Topics covered are:
- Creating a custom "Twitter handle" field in a registration form
- Deleting orders in Magento
- Using Google Website Optimizer
- Creating a custom variable and using its own e-mail templates
- Using Google analytics for Magento
- Creating Catalog and Shopping Cart Price Rules
- Creating a featured product and showing it in the home page
- Creating a custom admin theme
Creating a "custom variable" is a very useful feature, but as always with Magento there's little documentation on it, so this section should prove very useful for a lot of people. Also the "featured product" section can be adapted to a lot of things, although some more explanation of how product collections are called and filtered would've been good - as it is they just opt out of this saying "We won't provide any filtering or sorting for featured products". The "Creating a custom admin theme" section is useful for people selling on store packages, as this is something that will set you apart from the general Magento mob.
Chapter 5 focuses on products, explaining how to set up your catalog, add shipping rates, add configurable products etc. This chapter is aimed more at store owners really, but they do have a section on "Adding a Facebook 'Like' button in the product page" and "Embedding a YouTube video in product details" - both of which are useful to developers, and again can be used as templates for adding other similar additions.
The sixth chapter is again more for store owners, dealing with payment options and such, but it does also deal with "Optimizing Magento store for search engines" which is a great subject, so should provide some good tips for theme developers there too.
Chapter 7 deals with database design, so I guess this can be skipped by a lot of people, but it is good to read over and get an idea of exactly how the database structure works in Magento, even if you probably won't ever need to go near it.
Chapters 8, 9 and 10 are where it gets interesting for me again, as we start dealing with modules. They take you through an introduction on the general structure and setup of modules. They then go on to give you 2 tutorials, the first on "Creating a Shipping Module" and the second on "Writing a Social Widget" - both very useful in their own right, but again more useful as exercises in how to do certain things, and should really give a good idea of how to add in some more complex custom functionality.
Chapter 11 deals with optimizing performance, so there's some good suggestions made on speeding up your store, although this section is very technical and could well go over the heads of more casual readers.
Finally, the last chapter deals with debugging, concentrating on using Xdebug and FirePHP. This is fine, and some useful tips for more complex debugging are given, but I do feel that they skipped some of the simpler options, such as enabling the Magento default error reporting, and enabling "display_errors" in index.php.
All in all, I definitely think this is a good addition to any Magento developers arsenal. I definitely learned a few things from it, and it does a good job covering all the bases. And, as I said, most of the examples given can be tweaked into something else with a bit of Googling. So, go pick it up. I was sent e-books to review, but personally I prefer to have paper versions so I can skip back and forth more easily, and scribble some doodles in pencil to remind me of certain things, but that's just me. Whatever your flavour, have fun reading :-)Buy the book: Magento 1.4 Development Cookbook