News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Zend Developer Zone:
SOLID OO Principles
June 06, 2011 @ 12:06:35

On the Zend Developer Zone there's a recent post from Keith Casey about some of the basics of good OOP design, specifically in following the SOLID principles - a set of five guidelines that make code easier to manage and maintain over time.

As much as we're like to believe that "loose coupling, high cohesion" is enough, when you actually dive into the concept, you find that it's more descriptive than prescriptive. If you want to know how to actually apply these to your day to day development, you have to get into the SOLID principles which describes the five tangible aspects that "good" OO design should contain.

He goes through each of the five principles in the list, describing what they are and, for some, including a bit of sample code to make the point clearer:

  • Single Responsibility Principle (SRP)
  • Open/Closed Principle (OCP)
  • Liskov Substitution Principle (LSP)
  • Interface Segregation Principle (ISP)
  • Dependency Inversion Principle (DIP)
0 comments voice your opinion now!
oop principles solid example


blog comments powered by Disqus

Similar Posts

David Goodwin's Blog: Book Review: Object-Orientated Programming with PHP5 (Hasin Hayder, Packt)

Think Vitamin Blog: Getting Started with OOP & PHP5: Part 2

Mathias Verraes: Value Objects and User Interfaces

Benjamin Eberlei's Blog: Using Zend_Soap Server and Autodiscover in a Controller

Pádraic Brady's Blog: PHPSpec Manual (Work In Progress)


Community Events





Don't see your event here?
Let us know!


code introduction bugfix laravel release api language community interview install developer wordpress threedevsandamaybe list framework library series application configure podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework