Software Architecture Guide (2019)
41 points
2 hours ago
| 5 comments
| martinfowler.com
| HN
YZF
1 hour ago
[-]
The problem is that bad architecture can be carried forward for a very long time at increasing cost.

The ability to differentiate good and bad architectures seems to be a lost art because to build this ability you need to have enough experience (e.g. the discussion in "The Mythical Man-Month"). Most software developers today have had no experience designing even a single system and many systems are often a random assortment of stuff thrown together by people without enough experience. What I call the "sort of works" architecture. It has big gaps but it sort of works and so there is continuous investment in trying to make it good, which is often a waste of time. You've lumped a bunch of stuff together to build something and now you're stuck with it.

AI as it is right now is probably a driver to make this worse because it makes it so much easier to throw random stuff together.

reply
cjfd
42 minutes ago
[-]
So what would be a good architecture? How would I recognize it if I stumbled against it?

My own inclinations here are that it would be good to have as few different technologies as possible. To run things on as few different machines as possible and to have automated tests for everything. The thing is that as soon as there are multiple technologies you get to have different people specializing in them and it is always the communications between those that becomes painful. The automated tests are there to prevent fear of change setting in. I think I am kind of advocating what is called a 'big ball of mud' but that I want it to be a transparent ball of mud because of automated testing. I guess what I am saying is that I distrust most developments in so-called application architecture of the last few decades except automated tests. In particular, I think frameworks and microservices are mostly just bad.

reply
YZF
30 minutes ago
[-]
In an existing system some combination of these attributes:

- High quality (e.g. low number of issues hit by customers, resilient to failures, efficient, secure etc.)

- Easy to maintain (well organized, broken down in a sensible way into components or layers)

- Easy to extend/adapt to future requirements (i.e. the designer was able to anticipate the likely direction of the system and account for that in the design)

Automated testing feels a bit orthogonal to me but a system that is easy to test is likely one with a better architecture. It's not strictly part of what I'd call architecture.

Less different technologies - YES!

Runs on fewer machines is a sign of an efficient/performant design. Less well designed systems exhibit bloat that is often made up for by running on more machines.

reply
bluefirebrand
20 minutes ago
[-]
I've been doing this stuff for about 15 years now. Longer than many, not as long as some.

In my opinion, good architecture should be easy to extend, easy to scale (up and down), easy to reproduce. Microservice architectures are easy to scale, but usually hard to reproduce (any amount of config per service adds up a lot) and can be very hard to extend too (any changes to one service might ripple to many others, with knock-on effects)

One of my biggest red flags for a bad architecture is if you cannot easily create a (preferably localhost) development environment for it. I think this is where a lot of microservice based projects stumble. It leads to a lot of brittleness and a very siloed development team in my experience. Replacing what should be a library call or DB query with a network request to another service (which then has to query the DB for you) is a certain kind of lunacy.

Frameworks that are very opinionated are also very bad in my opinion. Depending how strict they are if you're doing anything even remotely unexpected you will butt up against the limitations of the framework often. That's annoying to me, I prefer to build my own stuff.

reply
ManuelKiessling
44 minutes ago
[-]
Well it can go in both directions I guess. How to design a system well for the long term is definitely in the training data, and I‘m regularly very content with the suggestions that SOTA coding agents make when asked for it.
reply
sroerick
47 minutes ago
[-]
> AI as it is right now is probably a driver to make this worse because it makes it so much easier to throw random stuff together.

My experience has been the opposite: affordable slop makes me way more conscious about architecture because bad patterns become useless exponentially quicker.

reply
aljgz
21 minutes ago
[-]
"We create products and services that we are proud of"

This was one of the 3 core values in the best company I ever worked for. One I would never leave, if the region was not heading for a disaster.

Good architecture transcends the software: enables people to be their best, evolve the software to better match the reality of its reason for existence.

In an effective organization, people constantly exceed their own expectations. They debate alternatives, understanding the reality of momentum, but aiming for an infinitely long living product.

They identify the "main problem", find ways to best solve that.

A good architecture does not do much more than what's needed, but avoid unnecessary assumptions that would block future development.

It is vague, philosophical, pragmatic, challenging, rewarding.

reply
Schiendelman
2 minutes ago
[-]
What was the region?
reply
csbartus
39 minutes ago
[-]
In my 30+ years of SWE/SWA career this is the first time I can harvest the benefits of a well defined and exactly implemented architecture.

Thanks to LLMs.

Before LLMs even if the architecture principles were simple and clear, distilled into templates + codegens added for boilerplate / skeleton generation ... It was impossible to follow them on the long run. Devs tried their best, but on the long run everything eroded and there were no resources for refactoring.

Now, with coding agents, I was able to create a production grade app following a similar architecture to Presentation Domain Data Layering, from this article.

Now the codebase is 100% uniform both in content (code) and structure (files and folders). It's like being written by a single person. Finding a specific file takes a second with no cognitive load. Editing a file is straightforward since every file follows a specific template.

LLMs have benefits and drawbacks, and in this case their help is enormous.

reply
simonw
33 minutes ago
[-]
Something I recently realized is that the fastest and easiest way to use coding agents is if you apply them to problems where there is just one, obvious solution.

This absolutely relates to architecture. If your system is designed such that any given feature fits in an obvious place, using obvious patterns, with obvious ways to test it... 90% of the time a coding agent will be able to do exactly the right thing from a single, short prompt.

This also makes code review so much less taxing - if the solution is obvious, reviewing and checking that the agent followed that obvious path takes much less time than if you're trying to untangle something a lot more complicated.

reply
csbartus
28 minutes ago
[-]
Exactly! What I use is a main workflow document where I embed at every step pointers to architecture and templates.

My prompt is ... "We are implementing the X feature. We are at step 6. Plan first"

Then the agent spits out identical plans then identical code for every feature.

reply
aleksiy123
34 minutes ago
[-]
If writing code is tactics and the end goal is strategy.

Is architecture operations?

reply
gurjeet
56 minutes ago
[-]
Needs the [2019] suffix.
reply
abkolan
13 minutes ago
[-]
Yes, please.
reply