Software engineering design principles

Fundamentals

Abstraction Information Hiding (IH) Cohesion, how well everything works with each other.

  • signs that there’s strong cohesion
    • easy to understand what other components are doing, how to interact with them
    • easy to name things
    • small tests, small classes, small methods
    • conceptual
      • what is the component responsible for?
    • spec
      • how is the component used by others
    • impl
      • how to impl functionality Coupling
  • how one part of a system affects another
  • should be intentional.

Principles

  • SoC separation of concerns
  • SRP single responsibility principle
  • IS Interface segregation
  • DI Dependency Inversion
  • LSP Liskov Substitution principle
    • sub objects should be able to substitute parent without any issues.
  • OCP open close principle
    • easy to extend, prevents modification.
    • Can change behaviour via interface, without going into internals.
  • DRY
  • Design to interface (d2i) Make it easy for people to understand and use your interface. that should be primary concern.

Techniques

  • decomposition, modularization, layering
  • inheritance
  • parameterization
  • tabulation