or
Sign in to turn on 1-Click ordering.
 
 
More Buying Choices
20 used & new from £18.48

Have one to sell? Sell yours here
 
   
Learning PHP Data Objects
 
See larger image
 

Learning PHP Data Objects (Paperback)

by Dennis Popel (Author)
4.0 out of 5 stars  See all reviews (2 customer reviews)
RRP: £24.99
Price: £21.24 & this item Delivered FREE in the UK with Super Saver Delivery. See details and conditions
You Save: £3.75 (15%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In stock.
Dispatched from and sold by Amazon.co.uk. Gift-wrap available.

16 new from £18.48 4 used from £18.48
12 Days of Christmas Sale in Books
Get up to 65% off some of our top titles. Shop now

Special Offers and Product Promotions


Frequently Bought Together

Learning PHP Data Objects + Pro PHP: Patterns, Frameworks, Testing & More: Patterns, Frameworks, Testing and More + PHP Objects, Patterns, & Practice 2nd Edition
Price For All Three: £63.19

Show availability and delivery details


Customers Who Bought This Item Also Bought

Pro PHP: Patterns, Frameworks, Testing & More: Patterns, Frameworks, Testing and More

Pro PHP: Patterns, Frameworks, Testing & More: Patterns, Frameworks, Testing and More

by Kevin McArthur
4.8 out of 5 stars (4)  £22.00
PHP Objects, Patterns, & Practice 2nd Edition

PHP Objects, Patterns, & Practice 2nd Edition

by Matt Zandstra
4.5 out of 5 stars (8)  £19.95
PHP 5 CMS Framework Development

PHP 5 CMS Framework Development

by Martin Brampton
2.0 out of 5 stars (1)  £26.34
Smarty PHP Template Programming and Applications

Smarty PHP Template Programming and Applications

by Hasin Hayder
3.0 out of 5 stars (2)  £21.24
Practical Web 2.0 Applications with PHP (Expert's Voice)

Practical Web 2.0 Applications with PHP (Expert's Voice)

by Quentin Zervaas
4.0 out of 5 stars (4)  £27.61
Explore similar items

Product details

  • Paperback: 188 pages
  • Publisher: Packt Publishing Limited (1 Aug 2007)
  • Language English
  • ISBN-10: 1847192661
  • ISBN-13: 978-1847192660
  • Product Dimensions: 23.4 x 19 x 1.3 cm
  • Average Customer Review: 4.0 out of 5 stars  See all reviews (2 customer reviews)
  • Amazon.co.uk Sales Rank: 901,268 in Books (See Bestsellers in Books)

    Popular in this category:

    #39 in  Books > Computing & Internet > Programming > Introduction to Programming > PHP

Customers Viewing This Page May Be Interested in These Sponsored Links

  (What is this?)
   PHP & SQL Training opens new browser window
www.symbiosis.com  -  Standard and Custom Courses London, Midlands and North 
   Learn php opens new browser window
www.Logical.co.uk/ZendPHP  -  Range of PHP Training Courses. Zend Approved. Book Now - up to £750 off 
   PHP from A to Zend opens new browser window
Zend.com/Training  -  From Beginner to Certified PHP Developer - Save over $400 
  
 

Product Description

Product Description

This book starts with an overview of PHP Data Objects (PDO), followed by getting started with PDO. Then it covers error handling, prepared statements, and handling rowsets, before covering advanced uses of PDO and an example of its use in an MVC application. Finally an appendix covers the new object-oriented features of PHP 5. This book will guide you through the data layer abstraction objects in PHP. PHP developers who need to use PDO for data abstraction.


About the Author

Dennis Popel is an experienced PHP/PHP5 developer currently working for an Australian web development company, Motive Media (www.motivemedia.com.au). Serving Sun Microsystems Australia, Luna Park Sydney, Alsco Holdings and Pine Solutions, amongst others, Dennis leads company development of proprietary, web-based, software solutions. In his spare time, he runs the onPHP5.com blog and works on an online RSS aggregator NewzMix. Dennis Popel has been developing with PHP for more than 5 years and is experienced in such fields as object-oriented design and MVC. Previously he has worked at Rapid Intelligence, another Australian-based web company, publisher of such popular titles as NationMaster.com, FactBites.com and Qwika.com. In the past, Dennis was developing proprietary Java applications. This book is devoted to all the people that introduced and guided me in this wonderful world of information technology.

Suggested Tags from Similar Products

 (What's this?)
Be the first one to add a relevant tag (keyword that's strongly related to this product)
 
php
web development

Your tags: Add your first tag
 

What Do Customers Ultimately Buy After Viewing This Item?


 

Customer Reviews

2 Reviews
5 star:    (0)
4 star:
 (2)
3 star:    (0)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.0 out of 5 stars (2 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
2 of 2 people found the following review helpful:
4.0 out of 5 stars Well written, and focussed, 7 Jun 2008
By Kae Verens (Monaghan, Ireland) - See all my reviews
(REAL NAME)   
Overview: Learning PHP Data Objects, by Dennis Popel, is an introduction to PDO, which walks through the building of a believable test example - a library manager for your home library. Each chapter introduces a new facet of PDO and shows how to rewrite the appropriate parts of the application to slot the new ideas in. Very clear and easy to read. Non-PDO subjects are appropriately kept to the appendices.

I really couldn't find very much about this book that I didn't like. Ignoring the appendices, the book is 154 pages purely devoted to teaching PDO through examples, including error handling, working with BLOBs, even the creation of the M in MVC (Models).

I mentioned MVC there. One of my gripes with most tutorials of MVC is that they introduce the concept simply, then provide pages and pages of code with the end product which is "hello world". Why I should go to all that trouble instead of simply writing to the screen usually escapes me. Dennis, however, concentrates solely on the Model and shows exactly why it's a great idea. I think some more separation of concerns would have been better (don't mix Author and Book SQL in the same object, for example), but the ideas were all good.

I think that if Dennis was going to show how the Model works, he should also have gone a little further and showed an example of an Active Record pattern as well. But I guess the point of showing MVC was more to show /an/ example of abstraction of the DB code, and that was sufficient.

The book covers a Library manager application all the way through from conception to implementation, demonstrating at all points that the code works with SQLite and MySQL (and by implication, all other DBMS's) with a change of only the connection string.

Possible problems are explained clearly and solutions are provided. For example, Dennis explains why, after you compile the query select * from books, PDO (and indeed the database itself) does not know how many rows it will return. A solution, in the form of a very smart getRowCount() function shows a query-agnostic method for counting results of an arbitrary line of SQL.

Other areas that are covered in the book include error-handling, prepared statements and transaction-handling.

PDO can handle Prepared Statements even if the underlying DBMS cannot handle it, so it is possible to write your code in a cross-platform way. Examples of why you should use this are provided. One of the examples shows an efficient way to handle insertion or updating of a table using the same parameters for both cases, with the row-handling function deciding whether to use update or insert based on whether an ID was provided.

I feel the Transactions section could have been expanded a bit further. It is not explained how PDO handles this for DBMS's that don't internally support transactions, and I wouldn't like to assume that they work all the time, only to find after deleting critical data that it's not supported.

Overall, I enjoyed reading this book. Dennis is a good writer and I think he explained his thoughts very clearly.

On an aside, my four-year-old son Jareth loves Packt Publishing's books. Sometimes when I go to read another chapter, I need to covertly steal the book I'm reading back from him. For a while, he made it a bed-time ritual to grab all the Packt books he could find around and bring them up with him to read in bed. I think he loved the screen-shots and the frequent code samples. He's high-functioning autistic and likes literary constructs, and programming books are perfect for him in that regard. Thanks Packt, you've made my son (and therefore me) happy.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
1 of 1 people found the following review helpful:
4.0 out of 5 stars Beginning PDO, for Intermediate PHP Programmers, 20 Oct 2007
By A. Biddle (Leicester, England) - See all my reviews
(REAL NAME)   
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.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Only search this product's reviews



Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

   


Listmania!


Look for similar items by category


Look for similar items by subject


Feedback

Ad

Your Recent History

 (What's this?)

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.