DDD + Clean Architecture: my take after 3 intense months

· Published · 1 min read

My take after three solid months of intensive DDD + Clean Architecture (trying to apply every concept as strictly as possible, as an exercise, on a production codebase, fearless!).

The pros

  • Genuinely fascinating.
  • Once everything starts falling into place, the gain on a moderately complex to complex system is huge (and sooo satisfying!).
  • Once strictly applied to a codebase that follows a strategy to the letter… it gives the AI rails, and suddenly it can build fairly big, complex features… with almost nothing to correct, since the AI does it the same way as the 50 examples next to it.
  • It makes you think a lot, and just for everything you learn by digging into the subject, it is worth it.

The cons

  • There is a huge amount of theory, but there seem to be as many ways of doing it as there are developers. So it is not always obvious whether you are getting it wrong.
  • Lots of concepts that are fairly hard to understand, and not necessarily easy to put in place.
  • Among all those concepts, it is hard at first to know which ones are essential and which ones are not.
  • You can very quickly pile up the downsides inherent to these paradigms (plumbing, for example)… without getting any of the benefits if it is done badly.
  • You really have to push it all the way to get all the gains, and be extremely rigorous and vigilant.

Verdict

All in all, after a complete refactor of a codebase, I think I would struggle to do without it on my next project.

Approved!