Book Review: PHP Team Development

I was recently contacted by Packt Publishing asking if I would review a copy of one of their new titles – PHP Team Development. I happily agreed and the book promptly arrived in the post (just in time for me to take it on holiday and read it by the pool!).

Overall I was quite disappointed by the book – although at least half of that was due to the poor written English contained there. Some sentences didn’t even make sense, I’m not accustomed to reading anything other than clear English (“Vendor Locking” confused me for a while), and the language in this publication made reading the whole thing rather slow going. That said, for a brand new team of PHP developers with no previous experience of working in a team, there were some useful points in this book. Its clear that the author’s experience lies in a large organisation building a single product, whereas I’d say the level of this book would apply well to web development shops with a handful of developers probably working on a series of different projects for clients.

There are some solid concepts introduced – few are explained in detail though and after a couple of chapters I think a less experienced developer would have had a list of terms to look up rather than new ideas to try! Still, there are good explanations of source control, MVC, templating, and OOP elsewhere on the web and in other books so it would be possible for someone to follow up on this. I was particularly alarmed at the concept where one team writes the model, another writes the view and yet another writes the controller to tie them all together. Perhaps in big enough development teams, with a lot of up-front specifications written, this can work. My on-the-ground experience though would lead me to group tasks together by feature rather than separate them by bits of implementation – I currently work in an organisation that uses agile projects though where features are the whole point of the exercise, so perhaps that influences me.

On the whole, a perfectly nice book for beginners (available from the publishers or from Amazon)
but if you are already working in a team then you probably won’t get a lot from this experience.

Book Review: RESTful PHP

I was recently contacted by the friendly people at Packt Publishing to ask if I’d like a copy of a new addition to their catalogue – RESTful PHP Web Services
, by Samisa Abeysinghe.

When I received and unpacked the book, it was a little lighter than I had expected, however REST really isn’t rocket science and can easily be covered in a tome this size. Overall it was well-written (with only as many spelling mistakes as any other PHP book) and clearly organised. The author begins by skating over why we don’t want to use SOAP, and shows his enthusiasm for REST as a replacement. However before the true elegance and concepts of REST are brought out and revered, we skip straight along and start to look at examples. Very few services that claim to be RESTful actually are, which makes writing anything along these lines very tricky, however I did feel the author could have been clearer about why having a single URL and a parameter for which action should be performed, doesn’t fit well. We do get a sense of excitement about services as ways to “glue together” bits of data on the net, and the possibilities of exposing and consuming information in this way.

Technical Content

Several frameworks are mentioned that can be used with REST, I’ve only heard of one (Zend Framework) – and this book works through a number of examples of working with Zend Framework to provide a REST service. The examples throughout are very thorough – starting with designing the service and getting the semantics of HTTP verbs sensibly applied. We are then taken through building the service using Zend Framework, creating a library class of functionality and then setting up the server to respond to incoming requests. For anyone using this book it is also worth checking for more up to date tutorials; Zend Framework has regular releases and some of the information in the book is already out of date – the dangers of the cutting edge!

Excess Baggage

On a personal level I’m not a big fan of frameworks; Zend Framework is a favourite but the use of it in this setting means that there is a large amount of the book dedicated to Zend Framework, the MVC pattern, and other things that aren’t really anything to do with REST. Call me old-fashioned but for me RESTful services need only HTTP and a data format of some kind, JSON or XML, and a good understanding of the grammar and structure of something that “smells” RESTful. In this book I got bogged down in the cookbook-style examples and lost sight of the bigger picture. The chapter summaries and best practice pointers though were great and I hope readers do take note of these.

Overview

If you need to build a RESTful service and you don’t mind Zend Framework, then this book will attempt to guide you through the process and explain plenty of useful stuff along the way. For a mid-level PHP programmer coming in to services for the first time, I consider this book a nice entry point. However if you were hoping to pick up the concepts behind RESTful services and look to apply them in your own work, then your $40 would be better spent on the RESTful Web Services from O’Reilly – you won’t be copying and pasting working PHP code, but you will come away with some great ideas.

Posted in php