by Leon Rosenshein

Architecture vs Design

Here's a tough one. What's the difference between software architecture and software design? Both are obviously about software. Both talk about how things fit together. Both have patterns and best practices. Can you have one without the other? Can you have good architecture and bad design at the same time? What about vice-versa?

I think the difference between the two is about the difference in scope. I think a lot of things that seem similar, but aren't, are different because of scope. In this case, it's not just scope, but scale.

Software design is about how things fit together at the function/class/module level. Are your functions really functions, or a wrapper around side effects? Does the function name help the caller understand what is going to happen, or does it just collect some stuff into one line so some other function fits on one screen? Do your classes encapsulate something and provide a useful abstraction or are they just collections of stuff and global things? Do your modules do what they say they do and nothing else? Can you trust your modules not to interfere with each other? Do they have flexibility, scalability, reliability, and replaceability?

Software architecture is about how things fit together at a higher level. Are your databases coherent? Do your queues only handle one thing? Do your services/APIs/gateways do what callers think they will and nothing more or are they just collections of capabilities so you have fewer things to deploy? Can someone look at the architecture and understand which part is responsible for which functionality or are they just collections of stuff and persistent data? Can you replace one part without impacting others? Do they have flexibility, scalability, reliability, and replaceability?

Notice anything similar between those two paragraphs? They start and end the same. They use a lot of the same descriptions and requirements. It's just the scope of the things I'm talking about that are different. The same principles that go into a good function are the same things that male a good class/module are the same things that go into a good system architecture. They need to be SOLID. You need to think about the quality attributes. It's just the scope and scale that changes.