Review: Object-Oriented PHP
Source: Efren J. Belizario - Posted by Efren J. Belizario   
Book Reviews PHP has grown to become one of the most popular scripting languages on the web. It offers many possibilities to its users, from building a complex and innovative content management system to forming a simplistic family photo album. PHP is also a useful programming language in that it helps eliminate redundancy while promoting time-saving and dynamic methodology. With PHP and an object-oriented approach (OO), using PHP has countless advantages. Peter Lavin highlights this and more in Object-Oriented PHP.

Date: 16 June 2006

Vitals:

Title Object-Oriented PHP
Author Peter Lavin
Pages 190
ISBN 0-59327-077-1
Publisher No Starch Press
Edition 1st Edition (2006)
Purchase Amazon

Audience:

Lavin's approach makes this book very easy to read, however, this is not meant for the novice programmer. Lavin expects that the reader has some knowledge of PHP or C, HTML, and CSS. Lavin is not shy about jumping right into the programming terminology as he warns the reader of this in the opening chapter. If you are familiar with PHP, read it. If you are familiar with OO, read it. This will get your feet wet and eventually soak you all the way through. If you plan on using PHP to create your dynamic website, have this book ready.

Summary:

Lavin begins with the cliche "What Does This Book Have to Offer?" and "Why Should I Read This Book?". Naturally, an advanced programmer would overlook these sections, but it is surprising how much OO and PHP go hand-in-hand (even without realizing it). He also gives a quick rundown of each chapter and the histories of PHP and OO.

The purpose of OO is to help simplify your work with PHP. Lavin uses the example of a global menu - instead of copying and pasting the same snippet of code for each page, use an include and, viola, your keystrokes and right mouse clicks do not have to be used in vain. Simplicity cuts down the losses in time and energy - things that programmers cannot spare.

Chapters 2 through 9 are overviews of object orientation, OO features in PHP 5, and classes. The first sightings of actual code do not appear until the fourth chapter when Lavin introduces his "DirectoryItems" class. Eventually, he offers enough code for the reader to create his/her own image navigation interface to begin a working photo album (complete with file browsing, pagination, and, of course, use of MySQL).

Later chapters dive deeper into the concepts and tools learned from the first half of the book. MySQL exceptions and trappings are covered in Chapter 10, while Lavin introduces advanced methods and techniques, such as reflection classes, using XML and CSS, in Chapters 11 through 16.

Opinion:

What I would like to see more of is AJAX and PHP. Peter Lavin admits that he is not the one to give a tutorial on such a subject, however, he does tease us with a paragraph that sets us up for building a foundation on AJAX. He also graciously provides us with a URL for further investigation.

As you continue your journey with PHP, do so with the use of OO and the inheritance of effective, time-saving methods. PHP and OO allow you to do so as Lavin clearly suggests in Object-Oriented PHP. This is not a PHP Bible, by any means, but it is a useful book to add to your library.

Reviewed by: Efren J. Belizario

Only registered users can write comments.
Please login or register.

Powered by AkoComment!