Book Review: Symfony 1.3 Web Application Development: Sloppy, Informative
Posted by ryan in symfony
This book is available from Packt Publishing via the following url (contains a tracking key but isn't an affiliate link)
In a Nutshell
In the second sentence of the book, symfony is misspelled (symphony).
In chapter 9, view caching (and clearing) is configured and illustrated
using both the
sfMemcacheCache cache classes. Such is
the flavor off this book: mixing flashes of targeted insight with sloppy
errors, poor graphics, and out-of-date practices.
When I heard that Packt was publishing a book on symfony 1.3, I was thrilled. While I still default to books released by Sensio Labs, I'm thrilled to see other publishers beginning to see the market for symfony-related documentation.
My excitement to support symfony and Packt faded, however, as I dove into a book that disappointed at least as often as it impressed (and it did both). The authors - Tom Bowler and Wojciech Bancer - are avid supporters of symfony, and as such are part of the great symfony community that I value. At the same time, this book - in its current form - does not live up to the standards we expect (and should expect) for symfony documentation.
But the book is far from being bad. In fact, even a seasoned symfony veteran will pick up some nice tips from the book (especially in the later chapters). Specifically, I found that caching, i18n, vendor integration and symfony plugins were all covered very well in the book. The authors are also passionate about symfony and it shows up consistently in a positive way.
The Blunders Hide some the Valuable Content
Unfortunately, and despite the best of intentions, this book made too many mistakes. Some of these are straightforward errors or typos while others are a matter code standards and opinion:
Spelling errors: The word symfony should NEVER be misspelled in a symfony book, period.
Syntax errors: Especially for beginners, these can be absolute killers. Here's an actual code block from the book:
<?php foreach($milkshakeArray as $milkshake ): ?> ... <?php endfor; ?>
There are at least 2 problem with the above codeblock:
foreachblock ends with an
endfor, which would of course throw a syntax error
The Symfony coding standards call for no extra space after
$milkshake. If you really want to split hairs, an extra space should be written between the
foreachand the following parenthesis. Now, nobody's perfect - but if you're writing a book, you should be better.
The resulting project, a website for a milkshake shop, is horrendously ugly. Yes, I know this is a programming book - but few things scream "amateur" at me louder than graphics & design that look to be from the mid 1990's. Invest a little in a designer - it makes a big difference.
The template code blocks consistently containe a huge amount of inline css. This clutters the true point of the view: the PHP/symfony code. While I know that the idea is to show all the code, it's not important. Offload the styles to a css and just tell us that some sexy styling is going on behind the scenes.
The are many more mistakes that were made, but I won't labor them here (but I do have a list). For a more extensive (but fairly similar) review, see www.isolani.co.uk. I agree with its closing statement: wait for the second revision, and only if its heavily technically edited. For beginners, there is value in this book, though its rushed nature will probably confuse frequently. Also, the idea of putting beginners through a book filled with poor standards and sloppy code is concerning.
In the future, I'd like to see the editor for a symfony book be an actual known symfony user. Call me up, I'd be more than happy to help. :)