I should state that I started investigating frameworks over a year ago and looked into symfony (around v0.6 at the time) , but now use the CakePHP framework for my current development projects. That said, I think symfony provides the most complete set of features of any PHP framework I’m familiar with- but at the same time, it has a bit of a steeper learning curve due to its flexibility and, some would say, wordy syntax. On balance though, what attracted me to symfony initially, was the excellent documentation, of which this book is part. Since learning a framework involves understanding how many parts fit together, good documentation can’t be understated.

The first chapter introduces symfony’s features and requirements (symfony is, like Zend’s framework, PHP5-only) as well as interesting bits like like the origin of the name and how it evolved. The next chapter then goes into the the MVC design pattern that symfony is build around as well as how symfony extends the strict definition (e.g. breaking models and controllers down further into two parts for each).

This is then followed by a chapter covering the file structure and how projects and layout interact (basically they break controllers down into different sections, for instance, a blog application might have a both a front-end and back-end controller for handling comments (projects), while other frameworks like Cake or Zend combine into one controller). Like many frameworks, symfony uses the idea of convention over configuration, that is, rather than massive multiple configuration files, symfony relies on files being in pre-determined places. This is not to say there are no configuration files, but as they say early on, you only have to “configure the unconventional”, i.e. most of the time, just put things in the right places an symfony will take care of it.

Chapter three then looks at installing symfony, using the PEAR install (suitable for production environments) and the sandbox install, ideal of trying out symfony. The install process was one of the areas I had a whole host of problems when I first tried symfony out. I’m happy to say, this time round, the PEAR install went off without a hitch the first time- I think symfony has added some helpful features along the way, but the book too does a good job walking you through the process. After the install, the book covers setting up an application to show how few files (4 or so) need to be edited for a basic application. The chapter then finishes off with a section on configuring the sever and common problems you might encounter.

Chapter five then covers the main configuration files and the YAML language that is the default language used for configuration. YAML files are often brought up as why symfony to too complicated, however the book covers how you can substitute anothere , or even just edit the php that these files are parsed into.

The second part of the book takes a look at each part of the MVC as it’s implemented in symfony: the front controller (Controller), View and Model layers. For those familiar with frameworks, there are not a lot of surprises here, though symfony has a number of ways (and sometimes an extra section) of doing things that other frameworks have maybe only one common way of performing. A case in point would be the slots (components, slots and component slots) covered in the view module, or the separating of controllers into front and back end- again, something useful, but that doesn’t have an equivalent in other frameworks. So, there’s a few more things to learn, but the chapters do a good job at it. The next section then looks at the special features of symfony in regards to forms, links, Ajax, caching and i18n/l10n. This is followed by coverage of the development tools including generators, unit and functional testing, logging, management tools and how to extend symfony.

Finally, part five is labelled “symfony Expert” and looks at performance issues and masting config files and notes that, as at least one benchmark has pointed out- symfony runs best when it’s on it’s own server. On finishing this book, I think most readers will find symfony a whole lot less mysterious, it’s still a heavy-duty framework (I’d probably encourage those new to PHP to look at something a bit less involved) and then move up to symfony as their needs grow. On the other hand, symfony is, right now, one of, if not the, most full-featured frameworks, so serious developers should at least know its strengths and features. Overall, for those who have heard horror-stories about how complicated symfony is, this book makes it clear that is really isn’t much more complicated that others. This book does a good job explaining symfony and the underlying design patterns and terminology that is needed to understand these frameworks (this is applicable to many frameworks, not just symfony).