Archive

Posts Tagged ‘service locator’

Simplest Java decoupling without 3rd party frameworks

March 21st, 2009 1 comment

“[...] coupling (or dependency) is the degree to which each program module relies on each one of the other modules.”

From Wikipedia

In object-oriented programming, removing dependencies is done by using interface. Thus, if class A is dependent on class B, we introduce interface C, which is implemented by B. Now A depends on C  (see below).

This first step in decoupling is called programming by interface. Read more…