Buy Used
Used - Good See details
$10.99 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Have one to sell? Sell yours here
Object-Oriented PHP: Concepts, Techniques, and Code
 
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Object-Oriented PHP: Concepts, Techniques, and Code [Paperback]

Peter Lavin (Author)
4.1 out of 5 stars  See all reviews (19 customer reviews)


Available from these sellers.



Book Description

June 20, 2006

Object-Oriented PHP shows developers how to take advantage of the new object-oriented features of PHP. Working within the context of concrete examples, the book begins with code compatible with PHP 4 and 5, and then focuses on object-orientation in PHP 5. The author's practical approach uses numerous code examples, which will help developers get up to speed with object oriented PHP quickly, and show them how to apply what they learn to everyday situations. All code samples are available for download on the book's companion site.



Editorial Reviews

Review

"An interesting and challenging book . . . Lavin has focused on a highly useful area of knowledge for web developers and has done an excellent job. Recommended." -- Kickstart News, August 2006

"Lavin's approach makes this book very easy to read . . . a useful book to add to your library." -- Linux Security, June 16, 2006

From the Back Cover

It can be tough to learn the concepts of object-oriented programming with a language like C++. Fortunately, PHP's simple object model makes it an ideal language for learning about object-oriented programming.

For the uninitiated, this guide to the latest version of PHP offers a speedy introduction to object-oriented programming, including a thorough explanation of classes as well as coverage of constructors, destructors, inheritance, polymorphism, and interfaces. You’ll learn to:
• Promote code reuse by creating your own classes and using built-in classes
• Customize and improve classes through inheritance
• Simplify database access by developing MySQL database and result set classes
• Incorporate an RSS reader into your site using only four lines of code
• Use XML easily with an object-oriented approach
• Employ PHP to autogenerate documentation for your code
• Make thumbnail images on the fly
• Replace clumsy error trapping with exception handling
• Take full advantage of advanced OO features in PHP
• Incorporate AJAX into your OO PHP code

Object-Oriented PHP will show you how to maximize PHP’s features, with much less work than you might think. With Object-Oriented PHP, you can master the basics of object-oriented programming and get up to speed on PHP in one fell swoop.


Product Details

  • Paperback: 216 pages
  • Publisher: No Starch Press; 1 edition (June 20, 2006)
  • Language: English
  • ISBN-10: 1593270771
  • ISBN-13: 978-1593270773
  • Product Dimensions: 9.2 x 7 x 0.6 inches
  • Shipping Weight: 14.4 ounces
  • Average Customer Review: 4.1 out of 5 stars  See all reviews (19 customer reviews)
  • Amazon Best Sellers Rank: #333,484 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

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

45 of 46 people found the following review helpful:
3.0 out of 5 stars A Knowledge-Transfer Brief for PHP Programmers, August 27, 2006
This review is from: Object-Oriented PHP: Concepts, Techniques, and Code (Paperback)
Object-Oriented PHP is really a technical brief that seems to fall short of its own ambitions. It covers PHP 5, most notably the radical switch from prior versions to a full OOP model. Lavin summarizes the reasons for the changes and reviews basic concepts of OOP. He then develops some classes for an application that draws images from a database and displays thumbnail images. In some places the PHP 4 equivalent code is provided for study. Notes on MySQL and PHP Data Objects (PDO) are also included.

It is a terse and sometimes bumpy ride. The book's conversational tone is appropriate for fellow geeks, but I found it more distracting than reassuring. There are some summary apologies, for example, that make the chapters seem like they were transcribed from tape. Rather than go back and match the introductory objectives to the text, a summary or two admits things didn't quite work out as planned. Ok, let's say there was no time to fix it. How does calling attention to it help?

Because the book is so short, the author glosses many concepts, frequently referring to web sites for technical details and tutorials. Once or twice he refers to a well-known author (e.g., Bruce Eckel) to support a complex point. Again while this is appropriate for a peer audience, it also needlessly puts the book out of reach for some readers.

It seems to me the book once had a too-ambitious outline. The back cover states you'll learn to "Incorporate AJAX into your OO PHP code." The coverage on this topic is trivial: an eight-line paragraph that names a website from which to retrieve example code, followed by indicators in subsequent to show where the AJAX reference is. The reader would be right to feel misled.

This book should be useful to the author's PHP peers, but those same readers should understand OOP well beforehand. I doubt a skeptical or demanding reader will like this book. Beginners will almost certainly get lost early and often.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


12 of 12 people found the following review helpful:
3.0 out of 5 stars Generally Disappointing, December 31, 2007
By 
John R. Cornell II (Jersey City, NJ USA) - See all my reviews
(REAL NAME)   
This review is from: Object-Oriented PHP: Concepts, Techniques, and Code (Paperback)
From the perspective of a an experienced procedural PHP programmer learning OO, having read both this book and "PHP 5 Objects, Patterns, and Practice" by Matt Zandstra, I would definately recommend the latter to this book.

Just because Zandstra's book doesn't have a cartoon on the front, doesn't make it less accessible. In fact I found it both more advanced and easier to understand at the same time. I imagine Lavin writing this book one chapter at a time, writing each successive chapter based on what he forgot in the previous. Zandstra's order of explanation on the other hand I found invaluable and thoughtful. When you're trying to make sense of a system by reading about it in a linear (book) explanation, the order in which the information is introduced and its context is very important.

Zandstra's book is also more thorough, and seems to approach implementation from an enterprise (read proper) perspective.

Lavin spends a lot of time on an example of using OO to build a system to display images in a directory. In hindsight, it turns out the design of his code is flawed in some places. Introduction material is no place to be teaching bad habits of any kind.

This book is $10 cheaper than Objects, Patterns, and Practice, but I think if you're serious about learning OO in PHP the extra $10 is worth it for a higher quality book.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


12 of 15 people found the following review helpful:
5.0 out of 5 stars What Object-Oriented PHP Programmers Are So Excited About, July 21, 2006
By 
Diane Cipollo (Editor at BellaOnline.com) - See all my reviews
This review is from: Object-Oriented PHP: Concepts, Techniques, and Code (Paperback)
Object-Oriented PHP by Peter Lavin is a good book for any traditional/procedural PHP programmer who would like to know what those object-oriented PHP programmers are so excited about. If you are considering adding object-oriented PHP to your toolbox and want a step-by-step, example based guide for the beginner, this is a good book to start with. This book is also for programmers who want to switch from PHP 4 to PHP 5.

Lavin starts with an overview of object-oriented PHP and discusses several of its advantages. He then discusses the basics of object-oriented programming such as classes and inheritance and the specifics for this type of programming in PHP. Next, he teaches you how to write your first class. One of the nice things about this book is that the author starts with this simple example and, as you progress through the book, shows how to build upon, extend and reuse that simple class to do more advanced programming.

The first step is to extend this class into a directory item class that will list all the files in a directory or list just certain files as needed. Next, you will write a thumbnail class that will create thumbnail images on-the-fly that are reduce in dimensions and quality thus reducing the download time. The third class you write is a page navigation class, similar to that used by Google, that will control the number of items listed on a page and also the number of page links in the navigation. Finally, he shows you how these three classes work together and with CSS.

Next, Lavin discusses the MySQL database class and how it works with the MySQL database. He also covers inheritance and how that can be applied to simplify error handling. He then moves on to abstract classes, magic methods and how dynamic websites can benefit from the SimpleXML extension to work with RSS feeds and the SOAP extension for a website search engine. We all hate to document our programs and Lavin shows you how to use the reflection class to self-document your code.

Peter Lavin has a web development firm and writes for several publications including PHP Hacks. There is a companion website that contains downloads of all the code and working examples.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews











Only search this product's reviews



Inside This Book (learn more)
First Sentence:
Creating a web page ain't what it used to be. Read the first page
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Move First, Player Object
New!
Concordance | Text Stats
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:

What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(12)
(12)
(4)
(4)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

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
 

Search Customer Discussions
Search all Amazon discussions
   



So You'd Like to...


Create a guide


Look for Similar Items by Category


Look for Similar Items by Subject