Customer Review

2 of 2 people found the following review helpful
4.0 out of 5 stars Beginning PDO, for Intermediate PHP Programmers, 20 Oct. 2007
By 
This review is from: Learning PHP Data Objects (Paperback)
This book works well for the intermediate PHP programmer who has researched application structure, and is beginning to focus on improving the database layer by standardising on PDO.

Commendably it keeps a tight focus, providing the minimum context in which to show PDO features: in this case a basic library program with simple PHP methods providing HTML. However in a later chapter it provides a useful example that shows the advantage of the model, updating previous code accordingly. It also saves time by assuming you have your environment set up correctly.

Design patterns vary, I believe the idea is that the reader should research MVC separation and other patterns, decide how to use them, then incorporate the PDO features from the book; it doesn't enforce a particular methodology you may not want to use. Conversely this is a disadvantage to less experienced PHP programmers, as they won't be served by the least-common-denominator code examples, which don't enforce separation of HTML and PHP.

I would recommend the book on the subjects of security and database correctness. Using prepared statements the book provides you with a robust way to avoid SQL injection. When something goes wrong, it explains how to handle the error correctly with exceptions, without exposing potentially harmful information. Even beginners should familiarise themselves with these new features. For mission-critical database operations, it elaborates on transactions, which weren't a feature of the PHP 4 extensions, and are either handled natively or emulated with PDO. Again it doesn't let focus drift into validation, which isn't provided by PDO, so only cursory hard-coded examples are given.

If you prefer the task-oriented approach to learning, you'll like this book. It provides code and screen-shots to guide you through each step. If you're an advanced PHP programmer, there are a few things you may find interesting, such as the lesser known PDO configuration options, and BLOB support, but really I find this book aimed more at the intermediate procedural programmer. Indicative of this is the succinct "Introduction to OOP in PHP 5" appendix. If you supplement this with other application design literature and integrate the PDO techniques in the book, you'll certainly be another step towards making your systems more flexible and maintainable.
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 on 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

4.4 out of 5 stars (5 customer reviews)
5 star:
 (2)
4 star:
 (3)
3 star:    (0)
2 star:    (0)
1 star:    (0)
 
 
 
£24.99 £24.14
Add to basket Add to wishlist
Reviewer


Location: England

Top Reviewer Ranking: 829,986