Most helpful positive review
3 of 3 people found the following review helpful
Concise, objective and confidently written. Smart ideas for advanced developers
on 30 December 2007
I lent my copy of Advanced PHP Programming to a friend last year and when I finally got it back it was dog-eared and edge-worn - a testament to how brilliant and useful the book is to any middle-weight or advanced developer.
The confident, objective writing style is immediately reassuring. Scholssnagle isn't the kind of writer who stubbornly refuses to go into detail about how to use global variables, for example, on the basis that they're evil and should be avoided at all costs. Instead, he explains how to incorporate them sensibly, acknowledges that they're a 'big mistake' and then suggests some alternative strategies. He doesn't rant about or sneer at less-robust techniques, but calmly explains the risks and suggests alternatives.
There's a lot of smart, fresh ideas in this book. The first chapter is on coding styles. There's plenty of good, simple guidelines on how to lay out, structure, and document your code to make it easier to handle and some excellent advice (and examples) of coding styles to avoid. His approach is consistent: keep it simple and use the best tool for the job.
A short chapter on object orientation and design patterns gives a concise overview of PHP object orientation and covers a few of the most useful design patterns - adaptor, template, factory and singleton are explained carefully. It describes specific situations where you'll find each pattern useful rather than just explaining the theory. A chapter on implementing templates explains the Model-View-Controller concept and goes on to show you how to use the Smarty templating engine. Several chapters on user authentication and session handling are very useful and contain some bright insights into fairly well-trodden subject area.
Some chapters have been worth their weight in gold. 'Managing the developing environment' covers use of a versioning system and 'Designing a good API' contains good, disciplined techniques worthy of incorporation into a development firm's house-style guide.
Other chapters cover topics a lot of programmers often ignore altogether, including strategies for handling errors and exceptions, advice on how to use a versioning system, a comprehensive guide to unit testing with PHPUnit and a chapter on profiling and benchmarking applications (especially useful if, like me, you've been asked to document and refactor a large unwieldy application you didn't write!)
Subject matter quickly becomes hardcore: A section on distributed applications and another on caching and performance tunings are not for the faint-hearted but surpised me with a wealth of good ideas and strategies for mid-sized projects. The last part of the book, which covers extensibility, probably won't be of much use to a middle-weight web-developer. I'm curiously lacking in hunger to find out all about ZEND opcodes, and the lengthy chapter on writing PHP extensions has yet to come in handy. Nor can I imagine I'll ever stay up late to read about 'Modifying and Introspecting the ZEND Engine'.
Each chapter ends with a helpful further reading section.
It's certainly not light reading. Most of the chapters require plenty of time and concentration to digest and understand. It isn't a tutorial book and, as the title suggests, it assumes you already have a very good understanding of the language and how to build applications with it. It's improved my coding style considerably and made my applications far easier to work with. I recommend this book to any confident and proficient developer who wants to raise their game.