NYCPHP Meetup

NYPHP.org

[nycphp-talk] OOP Books & Resources

Michael B Allen ioplex at gmail.com
Thu Dec 13 17:15:25 EST 2007


On 12/11/07, Ben Sgro <ben at projectskyline.com> wrote:
> Hello,
>
> A while back I asked an OOP related question. Brian D suggested:
>
> If you're just starting out in the PHP5 OOP world, I highly recommend
> Zandstra's "PHP 5 Objects, Patterns, and Practice." I promise you it's
> worth the $20.
>
> Which I did and started reading it (twice) and it just assumes too much.
> I have zero OOP experience (well that's not really true) and need more
> explanation than that book provides.

Hi Ben,

If you just want the basics of how to write programs using OOP
constructs, you might look at something like the Deitel & Deitel Java
How to Program book. PHP's OOP is very close to Java's.

However, more generally, I would de-emphasize the importance of
"Design Patterns". The whole DP thing is overrated. Unfortunately it's
pretty common to see people using various patterns without really
knowing why. Most of the patterns you'll find described in those books
are only useful in a few advanced high-level scenarios like UI widget
libraries (e.g. Composite). Or they're so simple you really didn't
need a book to explain it to you (e.g. Flyweight). It is much more
common to find that you simply want to use an abstract base class so
that other parts of your code can overload some methods. That sort of
basic stuff is covered in an intro book like the Deitel & Deitel one.

I have recently been modelling my code after Zend Framework. Some of
the ZF components are a little over-designed but I think the coding
standards and organization is excellent. Just looking at some good
examples might be all that you need to get on the right track.

Mike

-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/



More information about the talk mailing list