A common saying by software architects is “that’s an implementation detail”. All too often we treat software architecture and implementation as two separate things, where implementation is something that happens once a software architecture is defined. In fact, it’s the other way around: software architecture should be viewed as a first draft, where implementation reveals more details and refinements. In this provocative keynote Mark Richards discusses the intersection of architecture and implementation, and how the two must be in constant alignment to achieve success. Through real-world examples, he shows how implementation can get out of alignment with the architecture, causing the system to fail to achieve its desired goals. He then shows some techniques and tools to help ensure alignment between architecture and implementation.
"The Intersection of architecture and implementation", Mark Richards
1.
2. “We need an architecture that can
scale to 500,000 users with an average
response of 600ms under full load”
“No problem. I’m on it.
business
sponsor
software
architect
6. “What third-party libraries
and services should we
use?”
“Again, an implementation
detail. Architecture is my job—
implementation is yours.”
software
architect
development
team
10. isomorphism
isos (meaning “equal”) and morphe (meaning “form”, or “shape”)
how close does the shape of one thing match the
shape of the other thing?
11. how close does the shape of the architecture match the
shape of the problem domain?
architecture to domain isomorphism
29. “We have a very tight budget and timeframe
for this new venture, and we’re expecting a
significant amount of change to the underlying
data structures as we learn more about this
new line of business. We need to move fast
when those changes happen.”
30.
31. persistence layer component component component
presentation layer
business layer
component component component
component component component
services layer component component component
Layers of isolation
Separation of
concerns
Good change
control
software
architect
32. persistence layer component component component
presentation layer
business layer
component component component
component component component
services layer component component component
Better
performance
calling the
database
directly
It’s easier
having the
code and
SQL together
34. “Wait—here’s the best part—then they said ‘Sure, we’ll have those
database changes out to you right away.’ Ha ha ha ha ha ha ha…”
persistence layer component component component
presentation layer
business layer
component component component
component component component
services layer component component component
39. “The most effective way to deal with
constant database change is to leverage
closed layers in the architecture. I’ve got to
let the development team know…”
software
architect
development
team
41. short text file; 1-2 pages long, one file per decision
(markdown, textile, asciidoc, plaintext, etc.)
architecture decision records
short noun phrase describing the decision
proposed, accepted, superseded
description of the problem and alternative
solutions available (documentation)
justification (the “why”)
tradeoffs and impact of decision
42. if developers don't know why you made a
decision, they are less likely to agree with it
“Do this.”
software
architect
development
team
“No. We
don’t agree.”
51. if developers are not involved in the
decision, they will be less likely to follow it
“Do this because it
performs better.”
software
architect
development
team
“Okay.”
“We found a
better way to do
this.”
later…
52. “We’re going to use request/reply
messaging between our services because
it’s faster and more scalable.”
software
architect
“Actually, we decided to use REST
because it’s just as fast and it scales better
than messaging. Look it up on Google or
ChatGPT.”
development
team
the problem…
53. “But…but…this is my
decision…and messaging is faster
and more scalable in our
environment…”
software
architect
“Whatever. We’re
moving forward with
REST.”
development
team
the problem…
55. “I ran some benchmarks between
REST and messaging in our production
environment. Take a look at this…”
software
architect development
team
demonstration defeats discussion
57. “Based on this, I’m thinking we
should probably use messaging to
communicate between our microservices.
What do you think?”
software
architect
“We were thinking of using REST,
but you’re right—based on this data,
messaging is a better choice.”
development
team
demonstration defeats discussion
66. “I hope the development team is
complying with the architecture decisions I
communicated through the ADR”
software
architect
development
team
67. “With all these coding changes, I
hope the architecture is still meeting its
scalability requirements.”
software
architect
development
team
68. “An architectural fitness function provides
an objective integrity assessment of some
architectural characteristic(s).”
architecture fitness functions
77. @Test
public void presentation_layer_cannot_access_persistence_layer() {
noClasses().that().resideInAPackage("..presentation..")
.should().accessClassesThat().resideInAPackage("..persistence..")
.because("we have a closed-layered architecture to control changes " +
"made in the database and persistence layer. Persistence " +
"layer can only communicate with the business layer.")
.check(myClasses);
}
structural integrity
80. “Developers should never take
components designed by
architects as the last word.
Rather, the initial design should
be viewed as a first draft, where
implementation will reveal more
details and refinements.”
embrace continuous
architecture change