PHP Objects, Patterns, and Practice, Second Edition and over one million other books are available for Amazon Kindle. Learn more

Buy New

or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Buy Used
Used - Good See details
$17.74 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
More Buying Choices
Have one to sell? Sell yours here
PHP Objects, Patterns, and Practice
 
 
Start reading PHP Objects, Patterns, and Practice, Second Edition on your Kindle in under a minute.

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

PHP Objects, Patterns, and Practice [Paperback]

Matt Zandstra (Author)
4.3 out of 5 stars  See all reviews (15 customer reviews)

List Price: $44.99
Price: $28.45 & this item ships for FREE with Super Saver Shipping. Details
You Save: $16.54 (37%)
  Special Offers Available
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.
Ships from and sold by Amazon.com. Gift-wrap available.
Only 18 left in stock--order soon (more on the way).
Want it delivered Monday, January 30? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for Students. Learn more

Formats

Amazon Price New from Used from
Kindle Edition $23.39  
Paperback $28.45  
There is a newer edition of this item:
PHP Objects, Patterns and Practice (Expert's Voice in Open Source) PHP Objects, Patterns and Practice (Expert's Voice in Open Source) 4.0 out of 5 stars (5)
$27.38
In Stock.

Book Description

1590599098 978-1590599099 December 20, 2007 2nd ed.

PHP is the most popular web development language in the world, used to power over 20 million websites (Source: Netcraft - http://www.php.net/usage.php). With corporate adoption on the rise, and companies such as Oracle, IBM, Zend, and even Microsoft devoting increasing resources to the language, books such as PHP Objects, Patterns, and Practice, Second Edition will be in strong demand for the foreseeable future.

PHP Objects, Patterns, and Practice, Second Edition shows you how to meld the power of PHP with the sound enterprise development techniques embraced by professional programmers. Going well beyond the basics of object-oriented development, you'll learn about advanced topics such as working with static methods and properties, abstract classes, interfaces, design patterns, exception handling, and more. You'll also be exposed to key tools such as PEAR, CVS, Phing, and phpDocumentor.

See the following resources for more on enterprise adoption/interest in PHP:

http://www.infoworld.com/article/06/10/31/HNzenphp_1.html

http://www.oracle.com/technology/tech/php/

http://www.zend.com/company/customers


Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Customers buy this book with PHP Object-Oriented Solutions $22.51

PHP Objects, Patterns, and Practice + PHP Object-Oriented Solutions
  • This item: PHP Objects, Patterns, and Practice

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • PHP Object-Oriented Solutions

    In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details



Editorial Reviews

About the Author

Matt Zandstra is a developer for Yahoo! Inc., working on a PHP-driven solutions for powering many Yahoo! products. He was previously technical director of Corrosive Web Design (and later BGZ Consultants), designing and developing database driven-online environments for a range of clients including the British Civil Service, Unilever, the BBC, The Credit Card Research Group, Islington Education Library, among very many others.


Product Details

  • Paperback: 512 pages
  • Publisher: Apress; 2nd ed. edition (December 20, 2007)
  • Language: English
  • ISBN-10: 1590599098
  • ISBN-13: 978-1590599099
  • Product Dimensions: 9.2 x 7.1 x 1 inches
  • Shipping Weight: 1.8 pounds (View shipping rates and policies)
  • Average Customer Review: 4.3 out of 5 stars  See all reviews (15 customer reviews)
  • Amazon Best Sellers Rank: #830,461 in Books (See Top 100 in Books)

More About the Author

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

 

Customer Reviews

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

33 of 33 people found the following review helpful:
4.0 out of 5 stars Very good book, despite some muddled spots, March 20, 2008
By 
Kevin D A Major (Barrington, NH United States) - See all my reviews
This review is from: PHP Objects, Patterns, and Practice (Paperback)
I've owned PHP Objects, Patterns, and Practice for over a year, and it's still one of those books I go back to. It's a well written, generally well executed book on what constitutes Object Oriented Programming in the PHP5 environment.

First, the good news:

This book is a crash course on OOP design and thought. It borrows heavily from two monumentous texts in the field - the Gang of Four's book, and Java Enterprise Patterns - and condences their essences into an easy to swallow form. The basics are all here: how to create well designed classes, how to instantiate objects, etc. There's a hidden gem in the introductory portion of the book: the Reflection API. This API is built into PHP, and gives the coder unparalleled access to the guts of the classes and objects in a given project. It definitely has its uses.

The patterns are all generally useful, with the only exception perhaps being the Interpreter pattern. I'm just not convinced that creating one's own command line interface syntax is necessary, given that PHP projects aren't usually interactive. It seems like something best left to an appendex, or extra web content.

Now, for the bad news:

Some sections of the book, especially some of the code examples, could've used a better editor. Small things, the kinds of things that can trip up inexperienced coders, crop up. Using private properties instead of protected. Using the wrong variable name between examples. That sort of thing.

There's also a lack of a satisfying conclusion, so-to-speak. Zandstra himself claims that generating objects is perhaps the hardest thing to demonstrate. Yet, most of his examples (excepting the patterns late in the book) are canned. Objects and classes exist only to drive the theory behind a pattern home. Few real world examples are given. Admittedly, some patterns are simple to transfer to a real project, but concrete examples of that nature could serve to further cement his point. For example, it's not difficult to see how the Composite pattern would work well for dealing with an XML document, but would there ever be a need for a Visitor object to act on one?

Finally, and in continuation of my last criticism, Zandstra never touches one of the things PHP is used the most for: form handling. Can forms be represented by classes? Could forms be generated by objects (perhaps using a Factory pattern)? What about form validators? Wouldn't the Strategy or Decorator pattern work? Supplementing his online Civilization game and CLI/quiz examples with this would've really put the book over the top.

Still, with that said, PHP Objects, Patterns, and Practice is still a text that gets far more right than wrong. It's definitely a must-buy for those PHP coders looking to write modular code.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


13 of 13 people found the following review helpful:
5.0 out of 5 stars Best OO book on PHP ever, March 18, 2008
This review is from: PHP Objects, Patterns, and Practice (Paperback)
This is the best book I've read on Object Orientated PHP. This book does a great job of explaining the ins and outs of OO in PHP 5. As a self taught PHP developer of 5 years, I had lots of questions about "am I doing this right", "how should this be done" and the book has answered most of those questions.

I'd recommend the book to those who already have an advanced PHP knowledge but are looking to take their code another step forward by improving it's re-usability. It's also a great read if you want to find out the power that PHP 5 has over PHP 4.

Note: this book doesn't contain code that you can use. It teaches you the principles that you should use in your own projects.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


9 of 9 people found the following review helpful:
4.0 out of 5 stars Overall a good investment, November 17, 2008
By 
Michael Ekoka (Montreal, Qc Canada) - See all my reviews
(REAL NAME)   
This review is from: PHP Objects, Patterns, and Practice (Paperback)
It's been about a year and a half since I've read this, I have the first edition, but I think most of what I write is still relevant for this second one.

At the moment, very few php books come close in trying to actually present the language as a real contender for serious and professional web development. This book attempts just that.

PHP has come a long way since its inception, but the teaching material has not really caught up and the community is still pestered with bad code, architecture and practice. This book is an eye opener as it presents php for what it can be: a convenient and flexible tool that, in the right hands, can tough up and allow a programmer to get work done efficiently. It's not to say that php can do everything, but before you blame it as the root of all evil, you should definitely understand how you, the programmer, can work at improving the quality of your code. This text offers some insight into tried and true practices, usually well established in other more mature communities.

There are 3 parts:

The Objects part is a nice introduction to many goodies in the new PHP5 object model (the whole thing is php5 centric).

Some of the topics covered in the section matter more than others imo, since in your practice you'll encounter and will definitely draw some values from them. So pay particular attention to: Autoloading, Exception handling, magic methods, namespaces, reflection.

Because PHP is still a language in search for an identity, it borrows features and coding styles from other languages. Despite the fact that the two are fundamentally very different, Java has heavily influenced PHP's OO design and syntax. However, some of the PHP reimplementation just ended up being "simili" stuff, rather than the real thing. That is, it has the Java flavor, but doesn't actually carry any caffeine. Unfortunately, the book doesn't dig into those details and just serves the Kool-Aid as is.

Another complaint is that you are shown many tools and how they work, but there is very little depth on how and when to use them. Java and Python programmers borrowing PHP for a project might have an easier time translating this knowledge into actual practice, since their community would have likely previously exposed them to the concepts these tools were meant for.

If I had to pick one particular topic that I felt was lacking from the Objects section, it would be an intro to the SPL. Look for it.

[aside]
If you would allow me some personal and opinionated advices (be forewarned that a lot of these go against the current dogma in PHP):
- private/protected/public: it's definitely useful to understand the _idea_ behind having a public and a private programming interface, but it's a bit of a fallacy to enforce this with actual language constructs in a just-in-time technology like PHP. It doesn't provide much benefits to the interpreter, who are we then "protecting" the code from exactly, the programmer? When other concepts like inheritance get involved, things get even more cumbersome. An alternative approach is to leave everything public and then follow the widely adopted _convention_ to prefix what is considered private with an underscore. Programmers using your API will get a hint that the $_purifyiedData property was probably not meant to be directly accessed, but in case they decide to transgress that rule, they can. If you still insist on enforcing visibility though, then only use the protected and public keywords, forget private altogether.
- inheritance: learn how it works, but most importantly, learn when to avoid it and remember to strive for "Composition over Inheritance" (see Patterns section).
- interfaces: Learn about type-checking and type-hinting and use interfaces for that purpose specifically. You can declare constants within your interfaces, but I'd recommend against also declaring methods in them. It will only constrain your APIs, since PHP doesn't allow method overloading. Another route altogether would be to simply stop relying on interfaces and type-hinting and adopt 'duck-typing', an approach more natural to dynamically-typed languages such as Python, Ruby and I dare to say, PHP.
[/aside]

The next section of the book is on Patterns. It's not so much about PHP than it is an attempt at making a less crappy programmer out of YOU. If you're relatively new to programming and you've chosen PHP to make your first steps, please read this section of the book, for the sake of minimizing the damage you certainly will do. This is an intro to better code organization and to the world of design patterns as they can be applied to php. If you've heard of such things as Singleton, Observer, Registry, Controller, MVC and are still scratching your head, this could apply to you to.

The Practice section was a bit of a let down. If the author cares for some suggestions:
- forget CVS: there are currently a number of popular and very good open source SCMs, Git and Mercurial currently leading the pack. At the very least, teach the increasingly outdated SVN, but this book would actually gain some value if you only just mentioned the concept of revision control, without naming CVS.
- forget PEAR: instead have a chapter on frameworks, which nicely ties up with what the book tries to teach.
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)
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
data mapper, page controller, identity map, reflection class, template method, template view, quizobjects cvs, static function instance, cvsusers group, class type hinting, client coder, public function write, function setld, interceptor methods, mapper class, static function getlnstance, resources cvs, fileset element, pear package, enterprise patterns, clone keyword, cvs tag, pear install, command cvs, database patterns
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Abstract Factory, Domain Model, Gang of Four, Martin Fowler, Factory Method, View Helper, String Figure, Unit of Work, Cost Strategy, Patterns of Enterprise Application Architecture, The Observer, Selection Factory, Framework Constraint, Sebastian Bergmann, Addison-Wesley Professional, Coldharbour Lane, Borsetshire Open License, Done Figure, Analyzing Dialekt, Domain Object Factory, Adding Channel, Equals Expression, Lazy Load, Element Attribute Required Description, The Zend Engine
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | 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.
 
(9)
(5)
(4)

Your tags: Add your first tag
 

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
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums



So You'd Like to...



Look for Similar Items by Category


Look for Similar Items by Subject