Wednesday, 8 July 2015

How to abstract dependency in OOPS


Below rules should be followed in OOPS to implement Dependency Inversion Principle.

·         All member variables in a class must be interfaces or abstracts.
·         All concrete class packages must connect only through interface/abstract class’s packages.
·         No class should derive from a concrete class.
·         No method should override an implemented method.
·         All variable instantiation requires the implementation of a Creational pattern as the Factory Method or the Factory pattern, or the more complex use of an Injection framework.




No comments:

Post a Comment