The 5C Model for Software Design

Learn how to create a sustainable Software Architecture!

Motivation

Why you should modularize the software you write?

CUT

cut

Cut components to make them as self-contained as possible...

CONCEAL

cut

Hide as much from the component as possible...

CONTRACT

cut

Define an explicit interface for interaction...

CONNECT

cut

Connect the components that need to be connected...

CONSTRUCT

cut

For larger systems build hierarchical components...

Why modularize software?

Your software can be changed in the long term by breaking it down into individual modules. It will be less prone to mistakes and teams remain efficient in maintenance.


The individual building blocks:

  • ... can be changed without unwanted side effects.
  • ... can be independently documented and understood.
  • ... can be tested at their in- and outgoing interfaces, independent from each other.
  • ... are individually exchangeable if required.
cut
cut

Cut

The more independent a building block is, the easier it will be to handle. Cut building blocks in such a way that they are as distinct from each other as possible.

  • A building block only fulfils one specific task, which means there is only one reason to change it (Separationof-Concerns/Single-Responsibility).
  • The internal cohesion is as high as possible, which leads to a lower coupling (see Connect step).

conceal
cut

Conceal

Hide as much of the internal structure of a building block and the way it is implemented from the outside world as possible.

  • The inner workings of a building block can be adjusted without the need for coordination and without the risk of unwanted side effects.

conceal
cut

Contract

Design interfaces so that the interaction between the building block and its consumers is as smooth as possible.

  • The interface is easy for the consumer to understand and use.
  • Misuse of the interface is hardly possible.
  • The interface is sufficiently specified and documented.
  • The interface is small and appropriate for the respective use case.

conceal
cut

Connect

By using an interface of another module, these two are dependent on each other. Plan explicitly between which modules there should be which kind of dependencies.

  • There is loose coupling and there is little restrictive effect of the connections.
  • Risks and problems do not propagate through cascading dependencies.
  • There is a balance because there are no centralized building blocks with many dependencies

conceal
cut

Construct

A modular structure can itself become confusing on one level of abstraction. Build systems of higher complexity by combining blocks of one level to a new block of a next higher level. The same maxims of action are still to be applied.

  • More complex system landscapes become more maintainable as a result.
  • Complexity that has gotten out of control cannot endanger the success of a company.
  • Reduction of coordination costs and bureaucracy.