May 31, 2013

[Link] 10 Object Oriented Design Principles Java Programmer should know

http://javarevisited.blogspot.com/2012/03/10-object-oriented-design-principles.html?m=1

Nice posting on OOD for Java.

Summary:

  • Don't repeat yourself.
  • Encapsulate what changes.
  • Open closed design principle.
  • Single responsibility principle.
  • Dependency injection or inversion principle.
  • Favor composition over inheritance.
  • Liskov substitution principle.
  • Interface segregation principle.
  • Programming for interface not implementation.
  • Delegation principle.

No comments: