A Upcoming Pandemic of Domain Anaemia

There’s a well-known anti-pattern called the anaemic domain model[1][2].  This anti-pattern basically says domain entities, chronically, have little or no behaviour (remember, object-oriented design is about attributes and behaviour). It should be obvious that a domain model that isn’t truly object oriented is a domain model with a problem.  But, let’s look at other reasons why the Anaemic Domain Model is an anti-pattern.  Your Domain is the nexus, the essence, of your system. An anaemic domain model is basically a reporting system.  Each “Entity” becomes, essentially, a query.  This is fine, reporting systems are necessary and prevalent.  But, to shoe-horn … Continue reading A Upcoming Pandemic of Domain Anaemia

It’s More Than Syntax

Writing good software is not just about adhering to a programming language’s syntax.  No programming language syntax enforces good design nor does it enforce good programming in all circumstances. I’ve seen many systems that compiled perfectly fine; but they weren’t good systems.  Some exhibited reliability problems.  Some exhibited maintainability problems.  Some exhibited performance issues.  Some exhibited resistance to change.  All eventually failed at some point; either the system could not change at the required pace, or could never attain an acceptable reliability, etc. What was wrong with these systems?  The programmers didn’t look beyond the syntax of the language.  They … Continue reading It’s More Than Syntax

House of Cards Design Anti-pattern

I’ve had this anti-pattern in my head for years.  It’s an observance of some projects and methodologies that I’ve witnessed over the years.  I believe it’s a form of Voodoo Programming, Programming by coincidence, and is often a side effect of Cargo Cult Programming. Anti-Pattern Name House of Cards Anti-pattern Problem A problem occurs when software is written that works in a specific observed scenario but no one knows why it works in that scenario.  Observation of "working" is taken as enough evidence of completeness.  It is very often not enough to observe something working in one scenario for the … Continue reading House of Cards Design Anti-pattern