Build Seven Good Object-Oriented Habits in PHP

June 14, 2011

I just StumbledUpon a pretty good article titled “Build Seven Good Object-Oriented Habits in PHP“. As the name states, the article presents seven key qualities of good OOP programming, specifically in PHP (although the principles apply to most OOP languages). The best quality of the article is that it demonstrates each point using both bad and good code, clearly making the case for each recommended habit. And the article begins with some basic and specific OOP—namely, not making properties public—and moves on to more advanced and abstract OOP theory, such as cohesion and design patterns.

All in all, well worth the read if you’re doing OOP in general and OOP in PHP more specifically.