Stable Abstractions Principle | iface thoughts
Applying the class design principles, especially the Dependency Inversion Principle (DIP), flexibility is built into a design by introducing abstract classes. Concrete classes depend on the abstract classes for reusability and extensibility. This directly drives that
Packages that are maximally stable should be maximally abstract. Instable packages should be concrete. The abstraction of a package should be in proportion to its stability.
An abstract class tends to be more stable, as it does not depend on concrete classes. The concrete classes, which are instable, and are expected to change, depend on the concrete abstract classes. This ultimately means, that dependencies in packages are in the direction of abstraction.
Read full article from Stable Abstractions Principle | iface thoughts
No comments:
Post a Comment