Customer Review

19 of 19 people found the following review helpful
1.0 out of 5 stars Unclear, fails to communicate OO principles, December 22, 2007
This review is from: Object-Oriented Programming with PHP5: Learn to leverage PHP5's OOP features to write manageable applications with ease (Paperback)
With PHP 5.3 looking very close to release, bringing with it significant changes such as namespaces, this is an awkward time to release a PHP book of any generality. Within a few months it will be clearer how well the new features are taking hold and there is almost certainly going to be a clamour for books that show how new features affect development practices and how to make use of them. Even without that, it is hard to recommend this book as it fails to live up to its promise and provides a poor introduction to Object-Oriented programming.

The book's first problem is the poor quality of the English contained. The author does not appear to be a native English speaker and the publisher has apparently done little to clean up the language. For the most part that simply makes for some curious rhythm and phrasing but there are a number of places where it contributes to inaccuracies, such as constant confusion between objects and classes. Finding such inaccuracies alongside mistakes such as confusing polymorphism and inheritance I'm left wondering how well the authors really know their subject. Packt would do well to employ another reviewer to clean up the syntax and definitions before any reprints.

The structure of the book is curious. Rather than approaching topics through the use of an example project or projects, the author gives disconnected samples, often offering little beyond that which can be found in the online PHP documentation and generally failing to explain how techniques would be useful. While he insists that PHP5's Reflection API is an important tool, there is little to back up that assertion. There's a large code sample and a list of the methods and attributes of a reflection object, but no real substance. The database section covers some key examples, such as PDO, ADODB and MDB2, and touches on the ActiveRecord pattern, but uses four pages to list the RDBMSs that ADODB supports and then only spends a page and a half on ActiveRecord, failing to explain either its concepts or advantages in any detail.

The high point of the book is the half chapter on unit testing. A few well chosen examples provide a demonstration of how code can be tested and how that allows for refactoring without fear of regressions. The reasons for unit testing are clear as is basic usage of PHPUnit. I'd have liked to see further examples rather than several pages listing all the default assertions PHPUnit provides, and I disagree with the claim that there should never be more than one assertion per test (individual tests should focus on a single concern, but can use multiple assertions to do so) but by that point in the book it was good just to see a section that made its point clearly.

Fundamentally, I came away from this book feeling it had failed to communicate clearly the core principles or reasons for object oriented programming. By trying to cram in too much reference material, not offering clear contexts for each technique, and not lingering on ideas like encapsulation the book fails to instill OO techniques.

Disclaimer: I was sent a free copy of this book to review
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Be the first person to comment on this review.

[Add comment]
Post a comment
To insert a product link use the format: [[ASIN:ASIN product-title]] (What's this?)
Amazon will display this name with all your submissions, including reviews and discussion posts. (Learn more)
Name:
Badge:
This badge will be assigned to you and will appear along with your name.
There was an error. Please try again.
Please see the full guidelines here.

Official Comment

As a representative of this product you can post one Official Comment on this review. It will appear immediately below the review wherever it is displayed.   Learn more
The following name and badge will be shown with this comment:
 (edit name)
After clicking the Post button you will be asked to create your public name, which will be shown with all your contributions.

Is this your product?

If you are the author, artist, manufacturer or an official representative of this product, you can post an Official Comment on this review. It will appear immediately below the review wherever it is displayed.  Learn more
Otherwise, you can still post a regular comment on this review.

Is this your product?

If you are the author, artist, manufacturer or an official representative of this product, you can post an Official Comment on this review. It will appear immediately below the review wherever it is displayed.   Learn more
 
System timed out

We were unable to verify whether you represent the product. Please try again later, or retry now. Otherwise you can post a regular comment.

Since you previously posted an Official Comment, this comment will appear in the comment section below. You also have the option to edit your Official Comment.   Learn more
The maximum number of Official Comments have been posted. This comment will appear in the comment section below.   Learn more
Prompts for sign-in
 


Review Details

Item

Reviewer


Location: Grand Rapids, MI, USA

Top Reviewer Ranking: 3,366,727