Skip to content

Latest commit

 

History

History

dependency-rule

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Dependency Rule

The concentric circles represent different areas of software. In general, the further in you go, the higher level the software becomes.

The outer circles are mechanisms. The inner circles are policies.

The Dependency Rule is the overriding rule that makes this architecture work. This rule says that:

Source code dependencies only point inwards. Nothing in an inner circle an know anything at all about something in an outer circle.

In particular, the name of something declared in an outer circle must not be mentioned by the code in an inner circle. By the same token, data formats used in an outer circle should not be used by an inner circle, especially if those formats are generated by a framework in an outer circle. We don't want anything in an outer circle to impact the inner circles.

As you move inwards the level of abstraction increases. The outermost circle is low level concrete detail. As you move inwards the software grows more abstract, and encapsulates higher level policies. The inner most circle is the most general.