Skip to main content

Learning Logs




Uncle Bob Video Series

SOLID Principles

Ep-13: Dependency Inversion 

Gist: Role reversed with example son taking care of mom.High level policy should be ignorant of the low level details. For example every IO driver in unix should confirm to the IO Driver Interface and implement the standard Open, Close, Read, Write , Seek functions.

Ep-14: SOLID Case Study

Gist: DB should be a plugin, Delivery mechanism (UI) should be a plugin

Components

Ep-15: Solid Components

Gist: 
What is a component? Component is an independently deployable software.
How to start a design? Identify the actors. Then, start with the 'S' in SOLID.
How to implement? High level policy should be ignorant of the low level details.

Ep-15: Solid Components

Gist: 
When component changes, only 1 component per layer should change.
Release Reuse Equivalent Principle: You cannot reuse a component unless the author is willing to manage it thru a release cycle (19:44?)
Responsibility (in SRP) : Corresponds to the needs of an actor
Common Closure Principle: We group together the classes that change for the same reason.  Means all serve the same actor. Means they are closed to the needs of every other actor.
Common Reuse Principle: Tells us to avoid creating a component that doesn't depend on all the classes of a dependency. Ideally group away the classes that are not dependent, so that when change happens there, you don't have to retest your component.

One cannot satisfy all 3 at the same time, eventually as a project matures it confirms to release reuse principle e.g. java.lang and java.util



Coursera - Apigee Developer Course Certifications

Done - 2020

Comments