A compilation of best practice solutions to common Web Development problems in PHP, focusing on the achievement of practical goals by applying well-structured, object orientated software design principles.
Volume 2 covers the applications of PHP in the real world including authentication & access control, XML, stats & tracking, caching data to improve performance, design techniques and design patterns. The chapter on Design Patterns is particularly unique as it teaches readers about common object architectures which can be used to solve common (though unique) problems.
In addition to being an excellent reference with over 60 customizable solutions, the book acts as an excellent primer for Object Orientated Programming. PHP 5 has now been released and has been given significant OOP features, which are a must-learn for PHP Developers.
All code in the book is backwards compatible with earlier versions of PHP.
If I had one goal in mind while writing The PHP Anthology, it was to demonstrate just how easy it is to create intricate and powerful Web applications with an object oriented approach. In many cases, the more common procedural approach would result in unmanageable and bug-ridden “spaghetti code.”
In The PHP Anthology, Volume I: Foundations, I laid the groundwork by introducing that approach and demonstrating its application to some relatively simple issues in Web development. With Volume II, I hope to blow your socks off by tackling some traditionally complex problems with those same principles—to great effect. In examining the solutions here, you’ll see how putting together your application with well designed classes is much like stacking building blocks, each fitting perfectly atop the other. Thanks to the principles of object oriented programming (OOP), different “blocks” of code needn’t be concerned with the specifics of the other blocks in the structure.
One particular example in Chapter 3 looks at converting HTML content to Adobe’s Portable Document Format (PDF), using no less than eight separate classes in conjunction to fetch content from a database, parse the HTML, and, finally, output the PDF. The solution involves a number of steps, but, by breaking it down into manageable components in the form of classes, the complexity is reduced to the simple interactions between them.