How to choose the right software architecture

H

Which software architecture is right for us?

This is a question I often get from fellow architects and customers.

There is indeed quite some guidance out there: Hexagonal Design, Clean Architecture, Imperative Shell, Domain Driven Design, Model View Controller, Model View ViewModel, Model View Presenter, just to name a few... and it is hard to make a choice.

But it is the wrong question to ask.

Think AND not OR

Instead of considering which guidance to rely on, consider what aspects each of these can bring to your architecture.

Each of them brings the notion of IO to the boundary as a guiding principle

  • Domain Driven Design teaches us to root the meaning of the core pattern in the business language (and bounded context).
  • Clean architecture teaches us to model and expose the domain as a use case (I prefer the term business capability) instead of an entity based model.
  • Imperative Shell teaches us to design the core pattern in a functional way
  • Hexagonal design brings the concept of explicit ports (contracts) to the table.
  • etc...

So, think AND not OR... these sets of guidance are not mutually exclusive.

None are suitable as a top level architecture

None of the architectural guidance is, ironically, suitable for use as your top level architecture.

No matter which variation you pick, when you apply it at the system level it will still result in a big ball of mud (distributed or otherwise).

The mental model that works best (in my opinion) is to base your architecture on the business capabilities that your organization posesses.

Top Level Architecture
High resolution

Splitting up a code base this way will result in a unique architecture that is aligned naturally along the same axes that make your business unique.

Once you have these natural boundaries in place as your top level architecture, you can (and should) apply the guidance that makes sense inside each of the respective capabilities.

About the author

YVES GOELEVEN

I've been a software architect for over 20 years.

My main areas of expertise are large scale distributed systems, progressive web applications, event driven architecture, domain driven design, event sourcing, messaging, and the Microsoft Azure platform.

As I've transitioned into the second half of my career, I made it my personal goal to train the next generation of software architects.

Get in touch

Want to get better at software architecture?

Sign up to my newsletter and get regular advice to improve your architecture skills.

You can unsubscribe at any time by clicking the link in the footer of your emails. I use Mailchimp as my marketing platform. By clicking subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.