Search This Blog

Sunday, April 11, 2010

OSGi Evangelism and OO Design Principles

OSGi adds a higher layer of granularity to OO abstraction, information hiding, design by contract, etc. I like this quote  from Modular Mind: "Software development has advanced in large part by increasing the granularity of the aggregations that we have to work with.". In this presentation, Module Systems and Architectures, on OSGI, Martin Lippert also shows another evolution that can be seen in OSGi:


Good Old Design Principles
DIP SOC LSP ADP TDA DRY AIP
ISP SCP OCP IHP SRP SDP

New Design Principles
Use services ---> Separate between interface and implementation
Use extensions ---> working but extensible

Here's a breakdown of Martin's shortlist of "good old design principles":

Class Design Principle
  • Separation Of Concerns (SoC)
  • Tell, Don't Ask (TDA)
  • Don't Repeat Yourself (DRY)
  • Dependency Injection Principle (DIP)
  • Liskov Substitution Principle (LSP)
  • Open Closed Principle (OCP)
  • Single Responsibility Principle (SRP)
  • Interface Segregation Principle (ISP)

Package Design Principles
Cohesion Principles
  • Reuse/Release Equivalency Principle (REP)
  • Common Reuse Principle (CRP) 
  • Common Closure Principle (CCP)

Coupling Principles:
  • Acyclic Dependencies Principle (ADP)
  • Stable Dependencies Principle (SDP)
  • Stable Abstractions Principle (SAP)
  Object-Oriented Reengineering - Principles of OOD - Radu Marinescu,
  OO Design Principles - Stefan Kluth,

No comments:

Post a Comment