A Place to Hang Your Hat
A few years back, I posed this question to my software team at the time: What is software architecture? People answered this in a variety of ways. The answers ranged from the very dry “software architecture is the set of objects in a system and the relationships between them” to the very vague “software architecture is the shape of the software”. I was disappointed that we weren’t able to come up with anything better than that. I had hoped that we’d find a principle that could guide our day-to-day work.
Maybe I was asking the wrong question
Thinking back on this now, I think a better question would have been What is good software architecture? I imagine that we’d come up with things like “it runs efficiently” or “it minimizes the amount of required code”. I think this is part of it, but, it doesn’t really capture the essence of good software architecture.
My Answer Is…
I suppose you can already guess: “Good software architecture has a place to hang your hat”. When you’re working in software that’s well architected, you always know where things go. There’s a place for everything, even when it doesn’t exist yet. When software is well architected, you can even move the place where you hang hats, and everything works fine. In fact, if you need to move things around, you’ll often fix things that weren’t even problems yet. The software stays tidy. You don’t have a bunch of stuff lying around or on top of things or sticking out of places—there’s a place for everything.
When software is poorly architected, you’re not sure where things go. In fact, no one’s really sure where things go. People start doing the same things in different ways. Everything mostly works, but you’re scared to change anything. When you need to do something new, it can take a long time, because everything is a mess. You’ll see hats all over the place.
Getting to Good Software Architecture
There’s something subjective about good software architecture, something almost autocratic. Because there are so many ways to do things in software, there are so many decisions to make. It goes combinatorial really fast. Unless you find some way to narrow the field of choices, you’ll waste a lot of time arguing about options, and your group will spin its wheels.
The best way to winnow down options and get good software architecture is to have a good software architect, someone who’s worn a lot of hats, and who’s tried hanging them in lots of places. Someone who’s opinionated, but not overly so. Ideally, you build a good team around a good architect. The best way to do this is to have a good software manager, someone who’s worn a lot of hats, and who’s tried hanging them in lots of places 🙂