Modular Design

Modular design emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality.

Separation of concerns is a design principle for separating a computer program into distinct sections.

Separation of Concerns

The separation of concerns, which, even if not perfectly possible, is yet the only available technique for effective ordering of one’s thoughts, that I know of.

Edsger Dijkstra

Boundaries

Architectural boundaries should be separated so that changing one part of the system has no effect on any other part of the system.

Bob Martin

Examples

Bank Application

Rock Paper Scissors

  • Get user input
  • Select a computer input
  • Determine a winner
  • Display the results