||New Reviews| |Software Methodologies| |Popular Science| |AI/Machine Learning| |Programming| |Java| |Linux/Open Source| |XML| |Software Tools| |Other| |Web| |Tutorials| |All By Date| |All By Title| |Resources| |About||
Keywords: PHP, web development, object oriented programming
Title: PHP 5 Power Programming
Authors: Andi Gutmans, Stig Bakken and Derick Rethans
Publisher: Prentice Hall PTR
Verdict: A key text for the seasoned PHP developer looking to get to grips with the new features of PHP 5
With version 5 the inexorable rise of PHP as one of the dominant web development environments continues apace. With a major re-engineering of the object-oriented part of the Zend engine, the improved XML support and the addition of key extensions, such as SOAP and the MySQLi interface to MySQL 4.1+, PHP 5 is a major step forward. And who better to introduce the new language features and extensions than Andi Gutmans, co-designer of PHP since version 3.0, and leading developers Stig Bakken and Derick Rethans. Note that this is the key aim for the book, it's designed for the PHP developer wanting to move to PHP 5 rather than as a tutorial or introduction to PHP for the novice, (though it should be mentioned that the book does include a single chapter introduction to PHP, but this is more of a refresher and is no substitute for something more general, such as Core PHP).
After a couple of opening chapters, the book moves into gear in chapter 3. This focuses on the new object-oriented features of PHP. It begins with the basics of classes, properties, methods and so on before looking at more fundamental issues, such as polymorphism, interfaces, the exception object and so on. Any Java or C# programmers looking in will find that the PHP implementation of objects to be completely intuitive and natural. PHP feels like an object oriented language rather than a scripting language with some OO bolted-on.
The following chapter consolidates things with a very useful look at common design patterns in PHP. This is a very hands-on look at design patterns, which makes it immediately useful. Additionally the topic of reflection is covered, which is interesting even if it's something that might be of limited use for many developers.
Once the new language features have been covered the book moves on quickly to look at how these can be best exploited. Chapter five covers the writing of web applications, which starts with the absolute basics of embedding PHP into HTML and then moves on to cover security, sessions, cookies and so on.
The practical focus continues in the next chapter, which covers databases. Here there's major coverage of MySQL, using the aforementioned MySQLi extension, the SQLite embedded database and the PEAR DB interface (which effectively provides a data access object to enable the swapping in or out of databases without requiring major surgery to an application).
Error handling gets a chapter, as does the topic of XML. The latter ranges from a standard high-level intro to XML to a look at SAX and DOM and then SimpleXML. Other topics include RSS, XSLT, SOAP and XML-RPC.
Major extensions are covered in chapter 9, with an emphasis on those extensions with the widest application: files and streams I/O, date and time handling, graphics, character sets and locales. It's solid material and written in a down-to-earth style that sticks with the practical theme of the book.
The next three chapters deal with PEAR - from installation to usage to a tour of major components to building and releasing your own packages. This is a very thorough section of the book, which is what one would expect given that Stig Bakken, who started PEAR, is a co-author.
The remaining chapters cover migrating to PHP 5 from previous versions, performance issues, more on objects, writing PHP extensions, shell scripting and a whole lot more. This is after all a book on advance topics, and the coverage is wide-ranging and in-depth.
As has been mentioned before, this is a book that is firmly directed towards the experienced PHP developer rather than the beginner. If you are looking for a first introduction to PHP then look elsewhere, (Core PHP is a good place to start). But if you're looking for something more advanced then this is recommended.