Adventures in Software Engineering

Design Principles

D

Design principles represent guidelines for development that help in avoiding poor quality software composition.

Uncle Bob

Robert Martin provides strong guidance as to best practice in his book Agile Software Development. He holds that good principles guide the developer away from bad design, which believes to feature three main characteristics:

  • Rigidity, which makes maintenance and extension difficult as changes to one part of the system affect others.
  • Fragility, where changes to one part of the system bring unexpected consequences to others and so increase development time and risk.
  • Immobility, where code is so entangled within its current area of use that it cannot be easily reused elsewhere.

The principles are grouped into three areas, each concerned with a different level of abstraction and represented by an acronym: SOLID; RCC; and ASS.

SOLID
RCC
ASS

General Principles

Whilst these principles are a great foundation they are not alone, sitting alongside – and sometimes against – others.

PrincipleOverview
Law of DemeterOne component should know as little as possible about others with which it interacts.
Don't Repeat YourselfDon't write code again when the original can be effectively re-used!
You Ain't Gonna Need ItWrite the least code necessary in order to get the job done.
Adventures in Software Engineering

Johnathan Meehan

Johnathan Meehan

A software engineer with more years under his belt that he would like, an odd sense of humour and a predilection for junk food, whiskey and beer. Having begun working in 68K assembly language (told you he was old), he now spends most of his time writing Java with a heavy emphasis on quality. Secretly wishes he could be just like Oscar Mike.

Recommended Host