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

I'm a software engineer with more years and stomach under my belt than I would like. I have an odd sense of humour and a predilection for junk food, whiskey and beer. My first job was in 68K on God's computer, the Commodore Amiga. Since then I've worked here, there and everywhere being paid to play with all kinds of fun things and once even nibbled around the edges of being an Apache committer. Most time now is spent with Java, and I put a heavy emphasis on quality. When I grow up, I want to be just like Oscar Mike.

Recommended Host