Software Architecture For Developers
Software Architecture For Developers
agility
Software Architecture for Developers - Volume 1
Simon Brown
This book is for sale at http://leanpub.com/software-architecture-for-developers
This version was published on 2016-11-18
This is a Leanpub book. Leanpub empowers authors and publishers with the Lean
Publishing process. Lean Publishing is the act of publishing an in-progress ebook using
lightweight tools and many iterations to get reader feedback, pivot until you have the right
book and build traction once you do.
2012 - 2016 Simon Brown
Contents
Preface . . . . . . . . . . . . . . . . . . . . . .
Software architecture has a bad reputation
Agile aspirations . . . . . . . . . . . . . . .
So you think youre an architect? . . . . . .
The frustrated architect . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
i
i
ii
ii
iii
iv
iv
v
vi
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
. . . . . . . . . . . . . . . .
1.
What is architecture? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
As a noun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
As a verb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
3
3
2.
Types of architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
What do they all have in common? . . . . . . . . . . . . . . . . . . . . . . . . .
4
5
3.
6
6
6
7
8
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
CONTENTS
4.
Architecture vs design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Making a distinction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Understanding significance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
9
10
5.
.
.
.
.
12
12
13
13
6.
Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
II
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . 15
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
16
16
17
17
18
18
19
19
20
20
8.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
22
22
23
23
23
24
24
25
9.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
26
26
26
27
28
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
7.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
CONTENTS
29
30
31
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
32
32
33
33
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
34
34
35
35
36
37
38
39
39
40
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
41
41
41
42
42
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
43
43
43
44
45
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
46
47
47
47
49
CONTENTS
Everybody is an architect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Except when theyre not . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Does agile need architecture? . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49
49
50
52
52
53
19. Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
54
III
Designing software
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
56
56
56
56
57
57
58
61
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
62
62
62
63
23. Constraints . . . . . . . . . .
Time and budget constraints .
Technology constraints . . . .
People constraints . . . . . . .
Organisational constraints . .
Are all constraints bad? . . . .
Constraints can be prioritised .
Listen to the constraints . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
65
65
65
67
67
67
68
68
24. Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Development principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Architecture principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
69
69
69
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . 55
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
CONTENTS
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
71
.
.
.
.
.
.
72
72
73
73
73
74
75
76
76
78
78
80
80
29. Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
82
83
.
.
.
84
84
85
.
.
85
86
88
88
89
32. Risk-storming . . . . . . . . . . . . . . . .
Step 1. Draw some architecture diagrams .
Step 2. Identify the risks individually . . . .
Step 3. Converge the risks on the diagrams
90
90
90
91
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
CONTENTS
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 95
. 95
. 97
. 98
. 99
. 100
34. Agility . . . . . . . . . . . . . . .
Understanding agility . . . . . .
A good architecture enables agility
Agility as a quality attribute . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
92
93
93
94
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
102
102
103
105
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
106
106
107
108
110
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
113
113
114
114
Preface
The IT industry is either taking giant leaps ahead or its in deep turmoil. On the one
hand were pushing forward, reinventing the way that we build software and striving for
craftsmanship at every turn. On the other though, were continually forgetting the good of
the past and software teams are still screwing up on an alarmingly regular basis.
Software architecture plays a pivotal role in the delivery of successful software yet its
frustratingly neglected by many teams. Whether performed by one person or shared amongst
the team, the software architecture role exists on even the most agile of teams yet the balance
of up front and evolutionary thinking often reflects aspiration rather than reality.
Preface
ii
development, with people often being pushed into a role that they are not prepared for. These
same organisations often tend to see software architecture as a rank rather than a role too.
Agile aspirations
Agile might be over ten years old, but its still the shiny new kid in town and many software
teams have aspirations of becoming agile. Agile undoubtedly has a number of benefits
but it isnt necessarily the silver bullet that everybody wants you to believe it is. As with
everything in the IT industry, theres a large degree of evangelism and hype surrounding
it. Start a new software project today and its all about self-organising teams, automated
acceptance testing, continuous delivery, retrospectives, Kanban boards, emergent design and
a whole host of other buzzwords that youve probably heard of. This is fantastic but often
teams tend to throw the baby out with the bath water in their haste to adopt all of these cool
practices. Non-functional requirements not sounding cool isnt a reason to neglect them.
Whats all this old-fashioned software architecture stuff anyway? Many software teams
seem to think that they dont need software architects, throwing around terms like selforganising team, YAGNI (you arent going to need it), evolutionary architecture and
last responsible moment instead. If they do need an architect, theyll probably be on the
lookout for an agile architect. Im not entirely sure what this term actually means, but I
assume that it has something to do with using post-it notes instead of UML or doing TDD
(test-driven development) instead of drawing pictures. That is, assuming they get past the
notion of only using a very high level system metaphor and dont use emergent design as
an excuse for foolishly hoping for the best.
Preface
iii
testing, basic functionality problems, broken hyperlinks and a complete lack of documentation. And that was just my external view of the software, who knows what the code looked
like. If youre undertaking the software architecture role and youre delivering stuff like this,
youre doing it wrong. This isnt software architecture, its also foolishly hoping for the best.
Acknowledgements
Although this book has my name on the front, writing a book is never a solo activity. Its
really the product of a culmination of ideas that have evolved and discussions that have taken
place over a number of years. For this reason, there are a number of people to thank.
First up are Kevin Seal, Robert Annett and Sam Dalton for lots of stuff; ranging from
blog posts on Coding the Architecture and joint conference talks through to the software
architecture user group that we used to run at Skills Matter (London) and for the many tech
chats over a beer. Kevin also helped put together the first version of the training course that, I
think, we initially ran at the QCon Conference in London, which then morphed into a 2-day
training course that we have today. His classic sound-bite icon in the slide deck still gets
people talking today. :-)
Ive had discussions about software architecture with many great friends and colleagues over
the years, both at the consulting companies where Ive worked (Synamic, Concise, Evolution
and Detica) and the customers that weve built software for. There are too many people to
name, but you know who you are.
Id also like to thank everybody who has attended one of my talks or workshops over the
past few years, as those discussions also helped shape what you find in the book. Youve all
helped; from evolving ideas to simply helping me to explain them better.
Thanks also to Junilu Lacar and Pablo Guardiola for providing feedback, spotting typos, etc.
And I should finally thank my family for allowing me to do all of this, especially when a
hectic travel schedule sometimes sees me jumping from one international consulting gig,
workshop or conference to the next. Thank you.
1. What is architecture?
The word architecture means many different things to many different people and there are
many different definitions floating around the Internet. Ive asked hundreds of people over
the past few years what architecture means to them and a summary of their answers is as
follows. In no particular order
What is architecture?
No wonder its hard to find a single definition! Thankfully there are two common themes here
architecture as a noun and architecture as a verb, with both being applicable regardless of
whether were talking about constructing a physical building or a software system.
As a noun
As a noun then, architecture can be summarised as being about structure. Its about the
decomposition of a product into a collection of components/modules and interactions. This
needs to take into account the whole of the product, including the foundations and infrastructure services that deal with cross-cutting concerns such as power/water/air conditioning
(for a building) or security/configuration/error handling (for a piece of software).
As a verb
As a verb, architecture (i.e. the process, architecting) is about understanding what you need
to build, creating a vision for building it and making the appropriate design decisions. All
of this needs to be based upon requirements because requirements drive architecture.
Crucially, its also about communicating that vision and introducing technical leadership
so that everybody involved with the construction of the product understands the vision and
is able to contribute in a positive way to its success.
2. Types of architecture
There are many different types of architecture and architects within the IT industry alone.
Here, in no particular order, is a list of those that people most commonly identify when
asked
Infrastructure
Security
Technical
Solution
Network
Data
Hardware
Enterprise
Application
System
Integration
IT
Database
Information
Process
Business
Software
The unfortunate thing about this list is that some of the terms are easier to define than
others, particularly those that refer to or depend upon each other for their definition. For
example, what does solution architecture actually mean? For some organisations solution
architect is simply a synonym for software architect whereas others have a specific role
that focusses on designing an overall solution to a problem, but stopping before the level
at which implementation details are discussed. Similarly, technical architecture is vague
enough to refer to software, hardware or a combination of the two.
Interestingly, software architecture typically appears near the bottom of the list when I
ask people to list the types of IT architecture theyve come across. Perhaps this reflects the
confusion that surrounds the term.
Types of architecture
Application architecture
Application architecture is what we as software developers are probably most familiar with,
especially if you think of an application as typically being written in a single technology
(e.g. a Java web application, a desktop application on Windows, etc). It puts the application in
focus and normally includes things such as decomposing the application into its constituent
classes and components, making sure design patterns are used in the right way, building or
using frameworks, etc. In essence, application architecture is inherently about the lower-level
aspects of software design and is usually only concerned with a single technology stack (e.g.
Java, Microsoft .NET, etc).
The building blocks are predominantly software based and include things like programming
languages and constructs, libraries, frameworks, APIs, etc. Its described in terms of classes,
components, modules, functions, design patterns, etc. Application architecture is predominantly about software and the organisation of the code.
System architecture
I like to think of system architecture as one step up in scale from application architecture.
If you look at most software systems, theyre actually composed of multiple applications
across a number of different tiers and technologies. As an example, you might have a
software system comprised of a mobile app communicating via JSON/HTTPS to a Java web
application, which itself consumes data from a MySQL database. Each of these will have
their own internal application architecture.
For the overall software system to function, thought needs to be put into bringing all of
those separate applications together. In other words, you also have the overall structure of
the end-to-end software system at a high-level. Additionally, most software systems dont
live in isolation, so system architecture also includes the concerns around interoperability
and integration with other systems within the environment.
The building blocks are a mix of software and hardware, including things like programming
languages and software frameworks through to servers and infrastructure. Compared to
application architecture, system architecture is described in terms of higher levels of
abstraction; from components and services through to sub-systems. Most definitions of
system architecture include references to software and hardware. After all, you cant have a
successful software system without hardware, even if that hardware is virtualised somewhere
out there on the cloud.
Software architecture
Unlike application and system architecture, which are relatively well understood, the term
software architecture has many different meanings to many different people. Rather
than getting tied up in the complexities and nuances of the many definitions of software
architecture, I like to keep the definition as simple as possible. For me, software architecture
is simply the combination of application and system architecture.
In other words, its anything and everything related to the significant elements of a software
system; from the structure and foundations of the code through to the successful deployment
of that code into a live environment. When were thinking about software development as
software developers, most of our focus is placed on the code. Here, were thinking about
things like object oriented principles, classes, interfaces, inversion of control, refactoring,
automated unit testing, clean code and the countless other technical practices that help us
build better software. If your team consists of people who are only thinking about this, then
who is thinking about the other stuff?
Sometimes you need to step back, away from the code and away from your development
tools. This doesnt mean that the lower-level detail isnt important because working software
is ultimately about delivering working code. No, the detail is equally as important, but the
big picture is about having a holistic view across your software to ensure that your code is
working toward your overall vision rather than against it.
4. Architecture vs design
If architecture is about structure and vision, then whats design about? If youre creating a
solution to solve a problem, isnt this just design? And if this is the case, whats the difference
between design and architecture?
Making a distinction
Grady Booch has a well cited definition of the difference between architecture and design
that really helps to answer this question. In On Design, he says that
As a noun, design is the named (although sometimes unnameable) structure or
behavior of a system whose presence resolves or contributes to the resolution of
a force or forces on that system. A design thus represents one point in a potential
decision space.
If you think about any problem that youve needed to solve, there are probably a hundred
and one ways in which you could have solved it. Take your current software project for
example. There are probably a number of different technologies, deployment platforms and
design approaches that are also viable options for achieving the same goal. In designing your
software system though, your team chose just one of the many points in the potential decision
space.
Grady then goes on to say that
All architecture is design but not all design is architecture.
This makes sense because creating a solution is essentially a design exercise. However, for
some reason, theres a distinction being made about not all design being architecture, which
he clarifies with the following statement.
Architecture represents the significant design decisions that shape a system,
where significance is measured by cost of change.
Architecture vs design
10
Essentially, hes saying that the significant decisions are architecture and that everything
else is design. In the real world, the distinction between architecture and design isnt as
clear-cut, but this definition does provide us with a basis to think about what might be
significant (i.e. architectural) in our own software systems. For example, this could include:
The shape of the system (e.g. client-server, web-based, native mobile client, distributed,
asynchronous, etc)
The structure of the software system (e.g. components, layers, interactions, etc)
The choice of technologies (i.e. programming language, deployment platform, etc)
The choice of frameworks (e.g. web MVC framework, persistence/ORM framework,
etc)
The choice of design approach/patterns (e.g. the approach to performance, scalability,
availability, etc)
The architectural decisions are those that you cant reverse without some degree of effort.
Or, put simply, theyre the things that youd find hard to refactor in an afternoon.
Understanding significance
Its often worth taking a step back and considering whats significant with your own software
system. For example, many teams use a relational database, the choice of which might
be deemed as significant. In order to reduce the amount of rework required in the event
of a change in database technology, many teams use an object-relational mapping (ORM)
framework such as Hibernate or Entity Framework. Introducing this additional ORM layer
allows the database access to be decoupled from other parts of the code and, in theory, the
database can be switched out independently without a large amount of effort.
This decision to introduce additional layers is a classic technique for decoupling distinct parts
of a software system; promoting looser coupling, higher cohesion and a better separation
of concerns. Additionally, with the ORM in place, the choice of database can probably
be switched in an afternoon, so from this perspective it may no longer be deemed as
architecturally significant.
However, while the database may no longer be considered a significant decision, the choice
to decouple through the introduction of an additional layer should be. If youre wondering
why, have a think about how long it would take you to swap out your current ORM or web
MVC framework and replace it with another. Of course, you could add another layer over
the top of your chosen ORM to further isolate your business logic and provide the ability
Architecture vs design
11
to easily swap out your ORM but, again, youve made another significant decision. Youve
introduced additional layering, complexity and cost.
Although you cant necessarily make significant decisions disappear entirely, you can use
a number of different tactics such as architectural layering to change what those significant
decisions are. Part of the process of architecting a software system is about understanding
what is significant and why.
13
6. Questions
1. Do you know what architecture is all about? Does the rest of your team? What about
the rest of your organisation?
2. There are a number of different types of architecture within the IT domain. What do
they all have in common?
3. Do you and your team have a standard definition of what software architecture
means? Could you easily explain it to new members of the team? Is this definition
common across your organisation?
4. What does it mean if you describe a software architecture as being agile? How do
you design for agility?
5. Can you make a list of the architectural decisions on your current software project? Is
it obvious why they were deemed as significant?
6. If you step back from the code, what sort of things are included in your software
systems big picture?
7. What does the technical career path look like in your organisation? Is enterprise
architecture the right path for you?
8. Is software architecture important? Why and what are the benefits? Is there enough
software architecture on your software project? Is there too much?
1. Architectural Drivers
The first part of the role is about understanding the business goals and managing the
architectural drivers, which includes the requirements (both functional and non-functional)
and the constraints of the environment. Software projects often get caught up on asking users
what features they want, but rarely ask them what non-functional requirements (or quality
attributes) that they need. Sometimes the stakeholders will tell us that the system must be
fast, but thats far too subjective. Non-functional requirements and constraints often have
17
a huge influence on the software architecture, so explicitly including them as a part of the
software architecture role helps to ensure that they are considered and taken into account.
2. Designing Software
It should come as no surprise that the process of designing software is a part of the software
architecture role. This is about understanding how youre going to solve the problems posed
by the architectural drivers, creating the overall structure of the software system and a vision
for the delivery. Despite how agile you to strive to be, you probably do need some time to
explicitly think about how your architecture is going to solve the problems set out by the
stakeholders because your software system isnt going to do this itself.
A key part of designing software is technology selection, which is typically a fun exercise but
it does have its fair set of challenges. For example, some organisations have a list of approved
technologies that you are forced to choose from, while others have rules in place that dont
allow open source technology with a specific licence to be used. Then you have all of the
other factors such as cost, licensing, vendor relationships, technology strategy, compatibility,
interoperability, support, deployment, upgrade policies, end-user environments and so on.
The sum of these factors can often make a simple decision of choosing something like a
rich client technology into a complete nightmare. Somebody needs to take ownership of
the technology selection process and this falls squarely within the remit of the software
architecture role.
3. Technical Risks
What weve looked at so far will help you focus on building a good solution, but it doesnt
guarantee success. Simply throwing together the best designs and the best technologies
doesnt necessary mean that the overall architecture will be successful. Theres also the
question of whether the technology choices youve made will actually work. Many teams
have a buy over build strategy and use products (commercial or open source) because of
the potential cost savings on offer. However, many teams also get burnt because they believe
the hype from vendor websites or sales executives in expensive suits. Few people seem to ask
whether the technology actually works the way it is supposed to, and fewer prove that this
is the case.
Technology selection is all about managing risk; reducing risk where there is high complexity
or uncertainty and introducing risk where there are benefits to be had. All technology
decisions need to be made by taking all factors into account, and all technology decisions
18
need to be reviewed and evaluated. This potentially includes all of the major building blocks
for a software project right down to the libraries and frameworks being introduced during
the development.
The question that you need to ask yourself is whether your architecture works. For me,
an architecture works if it satisfies the non-functional requirements, works within the given
environmental constraints, provides the necessary foundations for the rest of the code and
works as the platform for solving the underlying business problem. One of the biggest
problems with software is that its complex and abstract. The result being that its hard to
visualise the runtime characteristics of a piece of software from diagrams or even the code
itself. Furthermore, I dont always trust myself to get it right first time. Your mileage may
vary though!
Throughout the software development life cycle, we undertake a number of different types
of testing in order to give us confidence that the system we are building will work when
delivered. So why dont we do the same for our architecture? If we can test our architecture,
we can prove that it works. And if we can do this as early as possible, we can reduce the
overall risk of project failure. Like good chefs, architects should taste what they are producing.
In a nutshell, this is about proactively identifying, mitigating and owning the high priority
technical risks so that your project doesnt get cancelled and you dont get fired.
4. Architecture Evolution
More often than not, software is designed and then the baton is passed over to a development
team, effectively treating software development as a relay sport. This is counterproductive
because the resulting software architecture needs to be taken care of. Somebody needs to
look after it, evolving it throughout the delivery in the face of changing requirements and
feedback from the team. If an architect has created an architecture, why shouldnt they own
and evolve that architecture throughout the rest of the delivery too? This is about continuous
technical leadership rather than simply being involved at the start of the life cycle and hoping
for the best.
5. Coding
Most of the best software architects I know have a software development background, but
for some reason many organisations dont see this as a part of the software architecture
role. Being a hands-on software architect doesnt necessarily mean that you need to get
involved in the day-to-day coding tasks, but it does mean that youre continuously engaged
19
in the delivery, actively helping to lead and shape it. Having said that, why shouldnt the
day-to-day coding activities be a part of the software architecture role?
Many software architects are master builders, so it makes sense to keep those skills up to date.
In addition, coding provides a way for the architect(s) to share the software development
experience with the rest of the team, which in turn helps them better understand how the
architecture is viewed from a development perspective. Many companies have policies that
prevent software architects from engaging in coding activities because their architects are
too valuable to undertake commodity coding work. Clearly this is the wrong attitude. Why
let your software architects put all that effort into designing software if youre not going to
let them contribute to its successful delivery?
Of course, there are situations where its not practical to get involved at the code level. For
example, a large project generally means a bigger big picture to take care of and there may
be times when you just dont have the time for coding. But, generally speaking, a software
architect who codes is a more effective and happier architect. You shouldnt necessarily rule
out coding just because youre an architect.
6. Quality Assurance
Even with the best architecture in the world, poor delivery can cause an otherwise successful
software project to fail. Quality assurance should be a part of the software architecture role,
but its more than just doing code reviews. You need a baseline to assure against, which could
mean the introduction of standards and working practices such as coding standards, design
principles and tools. Quality assurance also includes ensuring that the architecture is being
implemented consistently across the team. Whether you call this architectural compliance or
conformance is up to you, but the technical vision needs to be followed.
Its safe to say that most projects dont do enough quality assurance, and therefore you
need to figure out whats important and make sure that its sufficiently assured. For me,
the important parts of a project are anything that is architecturally significant, business
critical, complex or highly visible. You need to be pragmatic though and realise that you
cant necessarily assure everything.
Collaborate or fail
Its unusual for a software system to reside in isolation and there are a number of people
that probably need to contribute to the overall architecture process. This ranges from the
20
immediate development team who need to understand and buy in to the architecture, right
through to the extended team of those people who will have an interest in the architecture
from a security, database, operations, maintenance or support point of view. If youre
undertaking the software architecture role, youll need to collaborate with such people to
ensure that the resulting software system will successfully integrate with its environment. If
you dont collaborate, expect to fail.
21
Although the need for thinking about software architecture is usually acknowledged, the
responsibilities of the software architecture role often arent clear. In my experience, this
can lead to a situation where there is nobody undertaking the role, or where somebody is
assigned the role but doesnt really understand how they should undertake it. If the role
isnt understood, its not going to get done and we have little hope of growing the software
architects of tomorrow.
Regardless of what you call it (e.g. Architect, Tech Lead, Principal Designer, etc), my advice
is simple. If you dont have something that you can point at and say, this is what we expect
of our software architects, take some time to create something. Start by agreeing what is
expected of the software architecture role on your team and then move to standardise it
across your organisation if you see benefit in doing so.
Writing code
My recommendation is to make coding a part of your role as a software architect. You can do
this by simply being an integral part of the software development team. In other words, you
have a software architecture hat and a coding hat. You dont need to be the best coder on the
team, but the benefits of being hands-on and engaged in the delivery process are huge. After
all, theres a difference between knowing and doing.
Appreciating that youre going to be contributing to the coding activities often provides
enough incentive to ensure that your designs are grounded in reality. If they arent, youll
soon experience that pain once you understand the problems from a developers perspective.
In addition to the obvious benefits associated with creating a software architecture that can
actually be implemented by real people, contributing to the coding activities helps you build
rapport with the rest of the team, which in turn helps to reduce the gap between architects
and developers that you see on many software teams. To quote Rachel Davies and Liz Sedley
from their Agile Coaching book:
If you know how to program, its often tempting to make suggestions about
how developers should write the code. Be careful, because you may be wasting
your time - developers are likely to ignore your coding experience if youre not
programming on the project. They may also think that youre overstepping your
role and interfering in how they do their job, so give such advice sparingly.
23
24
play with technology. Assuming you can keep your eyes open after a hard day at work, of
course!
25
My take on this is yes, absolutely, you can continue to code. For me, its quite frustrating to
hear people say, well, I understand that Ill have to give up coding to become an architect
or to progress further up the career path. There are lots of organisations where this is the
expectation and its reassuring that Im not the only person to have been told that coding
doesnt have a place in the senior ranks of an organisation.
As a software architect, you take on a great deal of responsibility for satisfying the nonfunctional requirements, performing technical quality assurance, making sure the software
is fit for purpose, etc. Its a leadership role and coding (leading by example) is one of the very
best ways to make sure the project is successful. And besides, if software architects dont
remain technical, who is growing the software architects of tomorrow?
Back in time
If you trace the word architect back to its roots in Latin (architectus) and Greek (arkhitekton), it basically translates to chief builder and, as indicated by the name, these people were
masters of their craft. In medieval times, the term architect was used to signify those people
who were master masons, where mason refers to stonemasons because thats what the
majority of the buildings were constructed from at the time. This quote summarises the role
well:
27
28
Ivory towers?
If this is starting to sound familiar, wait until you hear how the teams used to work:
Every lesser mason followed the directions set by the master and all decisions
with regard to major structural, or aesthetic, problems were his domain.
Its certainly easy to see the parallels here in the way that many software teams have been
run traditionally, and its not surprising that many agile software development teams aspire
to adopt a different approach. Instead of a single dedicated technical leader that stays away
from the detail, many modern software development teams attempt to share the role between
a number of people. Of course, one of the key reasons that many architects stay away from
the detail is because they simply dont have the time. This typically leads to a situation where
the architect becomes removed from the real-world day-to-day reality of the team and slowly
becomes detached from them. It turns out that the master masons suffered from this problem
too:
If, as seems likely, this multiplicity of tasks was normal it is hardly surprising
that master masons took little part in the physical work (even had their status
permitted it). Testimony of this supposition is supplied by a sermon given in
1261 by Nicholas de Biard railing against the apparent sloth of the master mason
who ordains by word alone.
This quote from Agile Coaching (by Rachel Davies and Liz Sedley) highlights a common
consequence of this in the software industry:
If you know how to program, its often tempting to make suggestions about
how developers should write the code. Be careful, because you may be wasting
your time - developers are likely to ignore your coding experience if youre not
programming on the project. They may also think that youre overstepping your
role and interfering in how they do their job, so give such advice sparingly.
29
To cap this off, many people see the software architecture role as an elevated position/rank
within their organisation, which further exaggerates the disconnect between developer and
architect. It appears that the same is true of master masons too:
In order to avoid the sort of struggle late Renaissance artists had to be recognised
as more than mere artisans it would seem that master masons perpetuated a
myth (as I see it) of being the descendants of noblemen. Further to this, by
shrouding their knowledge with secrecy they created a mystique that separated
them from other less arcane or noble professions.
30
In essence, the traditional architect role has diverged into two roles. One is the structural
engineer, who ensures that the building doesnt fall over. And the other is the architect,
who interacts with the client to gather their requirements and design the building from an
aesthetic perspective. Martin Fowlers bliki has a page that talks about the purpose of and
difference between the roles.
A software architect is seen as a chief designer, someone who pulls together
everything on the project. But this is not what a building architect does. A
building architect concentrates on the interaction with client who wants the
building. He focuses his mind on issues that matter to the client, such as the
building layout and appearance. But theres more to a building than that.
Building is now seen as an engineering discipline because of the huge body of knowledge
behind it, which includes the laws of physics and being able to model/predict how materials
will behave when they are used to construct buildings. By comparison, the software
development industry is still relatively young and moves at an alarmingly fast pace. Buildings
today are mostly built using the same materials as they were hundreds of years ago, but it
seems like were inventing a new technology every twenty minutes. We live in the era of
Internet time. Until our industry reaches the point where software can be built in the same
way as a predictive engineering project, its crucial that somebody on the team keeps up to
date with technology and is able to make the right decisions about how to design software. In
other words, software architects still need to play the role of structural engineer and architect.
31
the supervision of somebody else and gradually, as I gained more experience, started to
take on larger and larger design tasks. Unlike the medieval building industry though, the
software development industry lacks an explicit way for people to progress from being junior
developers through to software architects. We dont have a common apprenticeship model.
33
Broadening the T
35
Breadth of knowledge
And that brings me onto why its important for software architects to have a breadth of
technology knowledge too. Sure, they may be specialists in Java or Oracle, but the role
demands more. For example, the people in the software architecture role should be able to
answer the following types of questions too:
Is the technology that weve chosen the most appropriate given the other options
available?
What are the other options for the design and build of this system?
Is there a common architectural pattern that we should be using?
Do we understand the trade-offs of the decisions that were making?
Have we catered for the desired quality attributes?
How can we prove that this architecture will work?
Broadening the T
36
etc
Although general design knowledge, techniques, patterns and approaches often apply to a
number of different technologies, not understanding how to apply them successfully at a
low-level of detail can cause issues. Does this mean that the software architect should be an
expert in all of the technologies that are in use on any give software system? No. Instead
collaboration is key. Find somebody that does understand the things you dont and work
with them closely. Nothing says that the software architecture role cant be shared, and often
appreciating the gaps in your own knowledge is the first step to creating a more collaborative
working environment. Pair programming has benefits, so why not pair architecting?
Soft skills
38
Political: There are always politics at play in every organisation. My mantra is to steer
clear of getting involved as far as possible, but you should at least understand whats
going on around you so that you can make more informed decisions.
Responsibility: You cant necessarily blame the rest of the software development
team for failure and its important that you have a sense of responsibility. Its your
problem if your software architecture doesnt satisfy the business goals, deliver the
non-functional requirements or the technical quality is poor.
Delegation: Delegation is an important part of any leadership role and theres a fine
line between delegating everything and doing everything yourself. You should learn
to delegate where appropriate but remember that its not the responsibility youre
delegating.
Stay positive
As a software architect, which is a leadership role however you look at it, youre likely to be
an important role model for a number of people on the development team. The reason for
this? Many of the team are probably aspiring software architects themselves. Although this
is a flattering situation to be in, there are some major downsides if you take your eye off the
ball.
Whether youve recognised it or not, youre in a very influential position and the eyes of
the development team are likely to be watching your every move. For this reason alone, you
have the power to change the whole dynamic of the team, whether you like it or not. If youre
motivated, the development team is likely to be motivated. If youre enthusiastic about the
work, the rest of the team is likely to be enthusiastic about the work. If youre optimistic that
everything will pan out, the development team will be too.
You can almost think of this as a self-supporting loop of positive energy where your
enthusiasm drives the team, and their enthusiasm drives you. This is all fantastic but its
not hard to see the damage that can be caused by a slip-up on your behalf. Any degree of
lethargy, apathy or pessimism will rub onto your team quicker than you can say but well
be okay and youll start spiralling towards a vicious circle of negativity.
We dont often talk about the softer side of being a software architect but the soft skills
are sometimes more important than being technically strong. A happy team is a team that
delivers. As a leader, its your responsibility to keep the team positive and your role in the
overall team dynamics shouldnt be underplayed.
Solution Architects
There are a lot of people out there, particularly in larger organisations, calling themselves
solution architects or technical architects, who design software and document their
solutions before throwing them over the wall to a separate development team. With the
solution done, the architect will then move on to do the same somewhere else, often not
even taking a cursory glimpse at how the development team is progressing. When you throw
not invented here syndrome into the mix, theres often a tendency for that receiving team to
not take ownership of the solution and the architecture initially created becomes detached
from reality.
Ive met a number of such architects in the past and one particular interview I held epitomises
this approach to software development. After the usual tell me about your role and recent
projects conversation, it became clear to me that this particular architect (who worked
for one of the large blue chip consulting firms) would create and document a software
architecture for a project before moving on elsewhere to repeat the process. After telling
me that he had little or no involvement in the project after he handed over the solution, I
asked him how he knew that his software architecture would work. Puzzled by this question,
he eventually made the statement that this was an implementation detail. He confidently
viewed his software architecture as correct and it was the development teams problem if
they couldnt get it to work. In my view, this was an outrageous thing to say and it made
40
him look like an ass during the interview. His approach was also AaaS Architecture as a
Service!
42
44
45
47
48
that you find many teams teaching or practicing though. With many technical mentors
disappearing thanks to the typical corporate career ladder, where do developers gain this
experience? Where are the software architects of tomorrow going to come from?
Everybody is an architect
In Extreme Programming Annealed, Glenn Vanderburg discusses the level at which the
Extreme Programming practices work, where he highlights the link between architecture
and collective ownership. When we talk about collective ownership, were usually referring
to collectively owning the code so that anybody on the team is empowered to make changes.
In order for this to work, theres an implication that everybody on the team has at least some
basic understanding of the big picture. Think about your current project; could you jump
into any part of the codebase and understand what was going on?
Imagine if you did have a team of experienced software developers that were all able to
switch in and out of the big picture. A team of genuinely hands-on architects. That team
would be amazing and all of the elements you usually associate with software architecture
(non-functional requirements, constraints, etc) would all get dealt with and nothing would
slip through the gaps. From a technical perspective, this is a self-organising team.
50
Roy categorises the maturity of teams using a simple model, with each level requiring a
different style of leadership.
1. Survival model (chaos): requires a more direct, command and control leadership style.
2. Learning: requires a coaching leadership style.
3. Self-organising: requires facilitation to ensure the balance remains intact.
As I said, a team where everybody is an experienced software developer and architect would
be amazing but this isnt something Ive seen happen. Most projects dont have anybody on
the team with experience of the big picture stuff and this is evidenced by codebases that
dont make sense (big balls of mud), designs that are unclear, systems that are slow and so on.
This type of situation is the one I see the most and, from a technical perspective, I recommend
that one person on the team takes responsibility for the software architecture role.
Roy uses the ScrumMaster role as an example. Teams in the initial stages of their maturity
will benefit from a single person undertaking the ScrumMaster role to help drive them in
the right direction. Self-organising teams, on the other hand, dont need to be told what to
do. The clue is in the name; they are self-organising by definition and can take the role upon
themselves. I would say that the same is true of the software architecture, and therefore
technical leadership, role.
51
With collective code ownership, everybody needs to be able to work at the architecture level
and so everybody is an architect to some degree. Teams that arent at the self-organising
stage will struggle if they try to run too fast though. Despite peoples aspirations to be agile,
collective code ownership and a distribution of the architecture role are likely to hinder
chaotic teams rather than help them. Chaotic teams need a more direct leadership approach
and they will benefit from a single point of responsibility for the technical aspects of the
software project. In other words, they will benefit from a single person looking after the
software architecture role. Ideally this person will coach others so that they too can help
with this role.
One software architect or many? Single point of responsibility or shared amongst the team?
Agile or not, the software architecture role exists. Only the context will tell you the right
answer.
Domain knowledge
A good working knowledge of the business domain is essential. If youre working within
the finance industry, you should know something about how your particular part of the
finance industry works (e.g. funds management, investment banking, retail banking, etc).
Most business domains are more complex than they really should be and even seemingly
simple domains can surprise you. I remember the first time that I saw the ferry and hotel
domains, which surprisingly arent simply about booking seats on boats or rooms in hotels.
Having an appreciation of the business domain helps you to better understand the goals and
create successful software products.
And this raises an interesting question. A deep knowledge of the business domain only comes
from working within that domain for an extended period of time but most consultants move
between different customers, teams and business domains on a regular basis. Is it therefore
fair to expect consultants to possess deep domain knowledge?
There are a couple of approaches that Ive seen people take. The first is to restrict yourself
to working within a single business domain as a consultant so that you do gain a deep
working knowledge of the business domain. As an example, a number of the IT consulting
organisations that Ive worked for have specialised in the investment banking industry, with
consultants moving from bank to bank within that industry. This is certainly an effective way
to ensure that consultants do understand the business domain, but its not an approach that
I particularly like. Some of the consultants who Ive worked with in the past have actually
taken offence when offered a consulting role outside of investment banking. These people
53
usually saw their deep business domain knowledge as a key differentiator or unique selling
point when compared to other consultants.
A look at my bookshelf will reveal that my interests lie far more with technology than any
business domain. If I wanted to work for a bank, Id work for a bank rather than a consulting
organisation. As a result, Im happy to regularly switch between business domains and this
provides a degree of variety that you cant necessarily get from working in a single domain. I
also find it interesting to see how other industries solve similar problems, and this itself leads
to a number of opportunities for the cross-pollination of ideas. The downside, of course, is
that my domain knowledge of any particular domain isnt as deep as somebody who works
full-time in that business domain.
To prevent this being an issue, I believe that theres a skill in being able to understand enough
about a new business domain to become proficient quickly. And thats really my approach.
If youre a undertaking the software architecture role on a consulting basis, you need razor
sharp analysis skills to understand the key parts of the business domain without getting
trapped in a cycle of analysis paralysis.
Authority
The degree of control that the software architecture role needs to introduce depends on the
type of software development team that you work with. Often the team can present another
set of challenges though, especially if youre working as a consultant software architect with
a team of your customers in-house developers.
If youre responsible for the software architecture and technical delivery of a software system,
you must have the authority to make decisions. If you have the responsibility but not the
authority, and are therefore continually seeking permission to make decisions, you could be
in for a bumpy ride.
The software architecture role is about technical leadership and part of this means that you
need to get the whole team heading in the same direction. Dictating instructions to a team
of software developers isnt likely to be very effective if youre not their immediate line
manager, which is often the case if youre supplementing a customer team. This is where the
soft skills come into play, particularly those related to building relationships, creating trust
and motivating the team. Ive found that being a hands-on, coding architect goes a long way
to getting a successful outcome too.
19. Questions
1. Whats the difference between the software architecture and software developer roles?
2. What does the software architecture role entail? Is this definition based upon your
current or ideal team? If its the latter, what can be done to change your team?
3. Why is it important for anybody undertaking the software architecture role to
understand the technologies that they are using? Would you hire a software architect
who didnt understand technology?
4. If youre the software architect on your project, how much coding are you doing? Is
this too much or too little?
5. If, as a software architect, youre unable to code, how else can you stay engaged in the
low-level aspects of the project. And how else can you keep your skills up to date?
6. Why is having a breadth and depth of technical knowledge as important?
7. Do you think you have all of the required soft skills to undertake the software
architecture role? If not, which would you improve, why and how?
8. Does your current software project have enough guidance and control from a software
architecture perspective? Does it have too much?
9. Why is collaboration an important part of the software architecture role? Does your
team do enough? If not, why?
10. Is there enough coaching and mentoring happening on your team? Are you providing
or receiving it?
11. How does the software architecture role fit into agile projects and self-organising
teams?
12. What pitfalls have you fallen into as somebody new to the software architecture role?
13. Is there a well-defined terms of reference for the software architecture in your team
or organisation? If so, does everybody understand it? If not, is there value in creating
one to make an architects role and responsibilities explicit?
1. Functional requirements
In order to design software, you need to know something about the goals that it needs to
satisfy. If this sounds obvious, its because it is. Having said that, I have seen teams designing
software (and even building it) without a high-level understanding of the features that the
software should provide to the end-users. Some might call this being agile, but I call it foolish.
Even a rough, short list of features or user stories (e.g. a Scrum product backlog) is essential.
Requirements drive architecture.
2. Quality Attributes
Quality attributes are represented by the non-functional requirements and reflect levels of
service such as performance, scalability, availability, security, etc. These are mostly technical
in nature and can have a huge influence over the resulting architecture, particularly if
youre building high performance systems or you have desires to operate at Google scale.
The technical solutions to implementing non-functional requirements are usually crosscutting and therefore need to be baked into the foundations of the system youre building.
Retrofitting high performance, scalability, security, availability, etc into an existing codebase
is usually incredibly difficult and time-consuming.
3. Constraints
We live in the real world and the real world has constraints. For example, the organisation
that you work for probably has a raft of constraints detailing what you can and cant do with
respect to technology choice, deployment platform, etc.
Architectural drivers
57
4. Principles
Where constraints are typically imposed upon you, principles are the things that you want to
adopt in order to introduce consistency and clarity into the resulting codebase. These may be
development principles (e.g. code conventions, use of automated testing, etc) or architecture
principles (e.g. layering strategies, architecture patterns, etc).
Performance
Performance is about how fast something is, usually in terms of response time or latency.
Response time: the time it takes between a request being sent and a response being
received, such as a user clicking a hyperlink on a web page or a button on a desktop
application.
Latency: the time it takes for a message to move through your system, from point A
to point B.
Even if youre not building high performance software systems, performance is applicable
to pretty much every software system that youll ever build, regardless of whether they are
web applications, desktop applications, service-oriented architectures, messaging systems,
etc. If youve ever been told that your software is too slow by your users, youll appreciate
why some notion of performance is important.
Scalability
Scalability is basically about the ability for your software to deal with more users, requests,
data, messages, etc. Scalability is inherently about concurrency and therefore dealing with
more stuff in the same period of time (e.g. requests per second).
59
Availability
Availability is about the degree to which your software is operational and, for example,
available to service requests. Youll usually see availability measured or referred to in terms
of nines, such as 99.99% (four nines) or 99.999% (five nines). These numbers refer to the
uptime in terms of a percentage. The flip side of this coin is the amount of downtime that
can be tolerated. An uptime of 99.9% (three nines) provides you with a downtime window
of just over 1 minute per day for scheduled maintenance, upgrades and unexpected failure.
Security
Security covers everything from authentication and authorisation through to the confidentiality of data in transit and storage. As with performance, theres a high probability that
security is important to you at some level. Security should be considered for even the most
basic of web applications that are deployed onto the Internet. The Open Web Application
Security Project (OWASP) is a great starting point for learning about security.
Disaster Recovery
What would happen if you lost a hard disk, server or data centre that your software was
running on? This is what disaster recovery is all about. If your software system is mission
critical, youll often hear people talking about business continuity processes too, which state
what should happen in the event of a disaster in order to retain continued operation.
Accessibility
Accessibility usually refers to things like the W3C accessibility standards, which talk about
how your software is accessible to people with disabilities such as visual impairments.
Monitoring
Some organisations have specific requirements related to how software systems should be
monitored to ensure that they are running and able to service requests. This could include
integrating your software with platform specific monitoring capabilities (e.g. JMX on the
Java platform) or sending alerts to a centralised monitoring dashboard (e.g. via SNMP) in the
event of a failure.
60
Management
Monitoring typically provides a read-only view of a software system and sometimes there
will be runtime management requirements too. For example, it might be necessary to expose
functionality that will allow operational staff to modify the runtime topology of a system,
modify configuration elements, refresh read-only caches, etc.
Audit
Theres often a need to keep a log of events (i.e. an audit log) that led to a change in data or
behaviour of a software system, particularly where money is involved. Typically such logs
need to capture information related to who made the change, when the change was made
and why the change was made. Often there is a need retain the change itself too (i.e. before
and after values).
Flexibility
Flexibility is a somewhat overused and vague term referring to the flexibility of your
software to perform more than a single task, or to do that single task in a number of different
ways. A good example of a flexibility requirement would be the ability for non-technical
people to modify the business rules used within the software.
Extensibility
Extensibility is also overused and vague, but it relates to the ability to extend the software to
do something it doesnt do now, perhaps using plugins and APIs. Some off-the-shelf products
(e.g. Microsoft Dynamics CRM) allow non-technical end-users to extend the data stored and
change how other users interact with that data.
Maintainability
Maintainability is often cited as a requirement but what does this actually mean? As software
developers we usually strive to build maintainable software but its worth thinking about
who will be maintaining the codebase in the future. Maintainability is hard to quantify, so
Id rather think about the architecture and development principles that well be following
instead because they are drivers for writing maintainable code.
61
Internationalisation (i18n)
Many software systems, particularly those deployed on the Internet, are no longer delivered
in a single language. Internationalisation refers to the ability to have user-facing elements of
the software delivered in multiple languages. This is seemingly simple until you try to retrofit
it to an existing piece of software and realise that some languages are written right-to-left.
Localisation (L10n)
Related to internationalisation is localisation, which is about presenting things like numbers,
currencies, dates, etc in the conventions that make sense to the culture of the end-user.
Sometimes internationalisation and localisation are bundled up together under the heading
of globalisation.
Capture
Ive spent most of my 15+ year career in software development working in a consulting
environment where weve been asked to build software for our customers. In that time, I
can probably count on one hand the number of times a customer has explicitly given us
information about the non-functional requirements. Ive certainly received a large number
of requirements specifications or functional wish-lists, but rarely do these include any
information about performance, scalability, security, etc. In this case, you need to be proactive
and capture them yourself.
And herein lies the challenge. If you ask a business sponsor what level of system availability
they want, youll probably get an answer similar to 100%, 24 by 7 by 365 or yes please,
we want all of it.
Refine
Once youve started asking those tricky questions related to non-functional requirements, or
youve been fortunate enough to receive some information about them, youll probably need
to refine them.
On the few occasions that Ive received a functional requirements specification that did include some information about non-functional requirements, theyve usually been unhelpfully
vague. As an example, I once received a 125 page document from a potential customer that
detailed the requirements of the software system. The majority of the pages covered the
functional requirements in quite some detail and the last half page was reserved for the nonfunctional requirements. It said things like:
Performance: The system must be fast.
63
Challenge
With this in mind, we all know what response well get if we ask people whether they need
something. Theyll undoubtedly say, yes. This is why prioritising functional requirements,
user stories, etc is hard. Regardless of the prioritisation scale that you use (MoSCoW,
High/Medium/Low, etc), everything will end up as a must have on the first attempt at
prioritisation. You could create a super-must have category, but we know that everything
will just migrate there.
64
A different approach is needed and presenting the cost implications can help focus the mind.
For example:
Architect: You need a system with 100% uptime. Building that requires lots of
redundancy to remove single points of failure and we would need two of everything
plus a lot of engineering work for all of the automatic failover. It will cost in the region
of $1,000,000. Alternatively we can build you something simpler, with the caveat that
some components would need to be monitored and restarted manually in the event of
a failure. This could cost in the region of $100,000. Which one do you need now?
Sponsor: Oh, if thats the case, I need the cheaper solution.
Anything is possible but everything has a trade-off. Explaining those trade-offs can help find
the best solution for the given context.
23. Constraints
Everything that we create as software developers lives in the real world, and the real
world has constraints. Like quality attributes, constraints can drive, shape and influence the
architecture of a software system. Theyre typically imposed upon you too, either by the
organisation that you work for or the environment that you work within. Constraints come
in many different shapes and sizes.
Technology constraints
There are a number of technology related constraints that we often come up against when
building software, particularly in large organisations:
Approved technology lists: Many large organisations have a list of the technologies
they permit software systems to be built with. The purpose of this list is to restrict
the number of different technologies that the organisation has to support, operate,
maintain and buy licenses for. Often there is a lengthy exceptions process that you
need to formally apply for if you want to use anything off list. Ive still seen teams
use Groovy or Scala on Java projects through the sneaky inclusion of an additional
JAR file though!
Existing systems and interoperability: Most organisations have existing systems that
you need to integrate your software with and youre often very limited in the number
of ways that you can achieve this. At other times, its those other systems that need
to integrate with whatever youre building. If this is the case, you may find that there
are organisation-wide constraints dictating the protocols and technologies you can
use for the integration points. A number of the investment banks Ive worked with
have had their own internal XML schemas for the exchange of trading information
between software systems. Concise and easy to use werent adjectives that we used
to describe them!
Constraints
66
Constraints
67
use, despite whether they actually work properly. I recently heard of one organisation
that built their own CORBA implementation.
People constraints
More often than not, the people around you will constrain the technologies and approaches
that are viable to use when developing software. For example:
There will be an overhead if you ask a Java team to build a Microsoft .NET solution, so you
do need to take people into account whenever youre architecting a software system.
Organisational constraints
There are sometimes other constraints that youll need to be aware of, including:
Is the software system part of a tactical or strategic implementation? The answer to
this question can either add or remove constraints.
Organisational politics can sometimes prevent you from implementing the solution
that you really want to.
Constraints
68
24. Principles
While constraints are imposed upon you, principles are the things that you want to adopt
in order to introduce standard approaches, and therefore consistency, into the way that you
build software. There are a number of common principles, some related to development and
others related to architecture.
Development principles
The principles that many software developers instantly think of relate to the way in which
software should be developed. For example:
Coding standards and conventions: We will adopt our in-house coding conventions
for [Java|C#|etc], which can be found on our corporate wiki.
Automated unit testing: Our goal is to achieve 80% code coverage for automated
unit tests across the core library, regardless of whether that code is developed using a
test-first or test-last approach.
Static analysis tools: All production and test code must pass the rules defined in
[Checkstyle|FxCop|etc] before being committed to source code control.
etc
Architecture principles
There are also some principles that relate to how the software should be structured. For
example:
Layering strategy: A layered architecture usually results in a software system that
has a high degree of flexibility because each layer is isolated from those around it.
For example, you may decompose your software system into a UI layer, a business
layer and a data access layer. Making the business layer completely independent
of the data access layer means that you can (typically) switch out the data access
implementation without affecting the business or UI layers. You can do this because the
Principles
70
data access layer presents an abstraction to the business layer rather than the business
layer directly dealing with the data storage mechanism itself. If you want to structure
your software this way, you should ensure that everybody on the development team
understands the principle. No data access logic in the UI components or domain
objects is a concrete example of this principle in action.
Placement of business logic: Sometimes you want to ensure that business logic
always resides in a single place for reasons related to performance or maintainability.
In the case of Internet-connected mobile apps, you might want to ensure that as much
processing as possible happens on the server. Or if youre integrating with a legacy
back-end system that already contains a large amount of business logic, you might
want to ensure that nobody on the team attempts to duplicate it.
High cohesion, low coupling, SOLID, etc: There are many principles related to the
separation of concerns, focussing on building small highly cohesive building blocks
that dont require too many dependencies in order to do their job.
Stateless components: If youre building software that needs to be very scalable, then
designing components to be as stateless as possible is one way to ensure that you
can horizontally scale-out your system by replicating components to share the load. If
this is your scalability strategy, everybody needs to understand that they must build
components using the same pattern. This will help to avoid any nasty surprises and
scalability bottlenecks in the future.
Stored procedures: Stored procedures in relational databases are like Marmite - you
either love them or you hate them. There are advantages and disadvantages to using
or not using stored procedures, but I do prefer it when teams just pick one approach
for data access and stick to it. There are exceptions to every principle though.
Domain model - rich vs anaemic: Some teams like having a very rich domain model
in their code, building systems that are very object-oriented in nature. Others prefer a
more anaemic domain model where objects are simply data structures that are used by
coarse-grained components and services. Again, consistency of approach goes a long
way.
Use of the HTTP session: If youre building a website, you may or may not want to
use the HTTP session for storing temporary information between requests. This can
often depend on a number of things including what your scaling strategy is, where
session-backed objects are actually stored, what happens in the event of a server failure,
whether youre using sticky sessions, the overhead of session replication, etc. Again,
everybody on the development team should understand the desired approach and stick
to it.
Always consistent vs eventually consistent: Many teams have discovered that they
often need to make trade-offs in order to meet complex non-functional requirements.
Principles
71
For example, some teams trade-off data consistency for increased performance and/or
scalability. Provided that we do see all Facebook status updates, does it really matter
if we all dont see them immediately? Your context will dictate whether immediate or
delayed consistency is appropriate, but a consistent approach is important.
the [risk system] solution is simple and can be built with any technology.
we dont want to force a solution on developers.
its an implementation detail.
we follow the last responsible moment principle.
I firmly believe that technology choices should be included on architecture diagrams but
theres a separate question here about why people dont feel comfortable making technology
decisions. Saying that it can be built with any technology doesnt mean that it should.
Heres why.
73
Deferral vs decoupling
Its worth briefly talking about deferring technology decisions and waiting until the last
responsible moment to make a decision. Lets imagine that youre designing a software system where there arent any particularly taxing non-functional requirements or constraints.
74
Does it matter which technologies you choose? And shouldnt a good architecture let you
change your mind at a later date anyway?
Many people will say, for example, that it really doesnt matter which relational database
you use, especially if you decouple the code that you write from a specific database implementation using an object-relational mapping layer such as Hibernate, Entity Framework or
ActiveRecord. If you dont have any significant non-functional requirements or constraints,
and you truly believe that all relational databases are equal, then it probably doesnt matter
which you use. So yes, you can decouple the database from your code and defer the
technology decision. But dont forget, while your choice of database is no longer a significant
decision, your choice of ORM is. You can decouple your code from your ORM by introducing
another abstraction layer, but again youve made a significant decision here in terms of the
structure of your software system.
Decoupling is a great approach for a number of reasons plus it enables technology decisions
to be deferred. Of course, this doesnt mean that you should defer decisions though, especially
for reasons related to the presence of non-functional requirements and constraints.
76
While I dont disagree that Silverlight applications arent hard to build, the vital question
the group hadnt addressed was where the data was going to come from. As always, there
are options; from accessing the database directly through to exposing some data services in
a middle-tier. The group had already considered deploying some Windows Communication
Foundation (WCF) services into the IIS web server as the mechanism for exposing the data,
but this led to yet further questions.
1. What operations do you need to expose to the Silverlight client?
2. Which technology binding and protocol would you use?
3. How do you ensure that people cant plug in their own bespoke WCF client and
consume the services?
4. How do you deploy and test it?
5. etc
Non-functional requirements
In the context of the case study, the third question is important. The data should only be
accessible by a small number of people and we really dont want to expose a web service
that anybody with access to a development tool could consume.
Most security conscious organisations have their self-hosted public facing web servers
firewalled away in a DMZ, yet Ive seen some software systems where those same secured
web servers subsequently access unsecured web services residing on servers within the
regular corporate LAN. Assuming that I can connect a laptop to the corporate LAN, theres
usually nothing to stop me firing up a development tool such as Microsoft Visual Studio,
locating the service definition (e.g. a WSDL file) and consuming the web service for my own
misuse. In this case, thought needs to be given to authentication and authorisation of the
data service as well as the Silverlight client. A holistic view of security needs to be taken.
77
more work designing, developing, testing and deploying. Despite what vendor marketing
hype might say, nothing is ever free and you need to evaluate the pros and cons of
adding additional layers into a design, particularly if they result in additional inter-process
communication.
79
its too late. One of the key reasons I prefer using a whiteboard to design software is because
it encourages a more collaborative approach than somebody sitting on their own in front of
their favourite modelling tool on a laptop. If youre collaborating, youre also communicating
and challenging each other.
Like pair programming, collaborating is an effective way to approach the software design
process, particularly if its done in a lightweight way. Collaboration increases quality plus it
allows us to discuss and challenge some of the common assumptions that we make based our
own knowledge, experience and preferences. It also paves the way for collective ownership
of the code, which again helps to break down the silos that often form within software
development teams. Everybody on the team will have different ideas and those different
ideas need to meet.
81
Current development team: The current team need to understand the architecture
and be aware of the drivers so that they produce a solution that is architecturally
consistent and works.
Future development team: Any future development/maintenance teams need to have
the same information to hand so that they understand how the solution works and are
able to modify it in a consistent way.
Other teams: Often your software needs to integrate with other systems within the
environment, from bespoke software systems through to off-the-shelf vendor products,
so its crucial that everybody agrees on how this will work.
Database administrators: Some organisations have separate database teams that need
to understand how your solution uses their database services (e.g. from design and
optimisation through to capacity planning and archiving).
Operations/support staff: Operational staff typically need to understand how to run
and support your system (e.g. configuration and deployment through to monitoring
and problem diagnostics).
Compliance, risk and audit: Some organisations have strict regulations that they need
to follow and people in your organisation may need to certify that youre following
them too.
Security team: Likewise with security; some organisations have dedicated security
teams that need to review systems before they are permitted into production environments.
These are just some of the stakeholders that may have an interest in your architecture, but
there are probably others depending on your organisation and the way that it works. If you
think you can put together a software architecture in an ivory tower on your own, youre
probably doing it wrong. Software architectures dont live in isolation and the software
design process is a platform for conversation. A five minute conversation now could help
capture those often implied architectural drivers and improve your chance of a successful
delivery.
29. Questions
1. What are the major factors that influence the resulting architecture of a software
system? Can you list those that are relevant to the software system that you are
working on?
2. What are non-functional requirements and why are they important? When should you
think about non-functional requirements?
3. Time and budget are the constraints that most people instantly relate to, but can you
identify more?
4. Is your software development team working with a well-known set of architectural
principles? What are they? Are they clearly understood by everybody on the team?
5. How do you approach the software design process? Does your team approach it in
the same way? Can it be clearly articulated? Can you help others follow the same
approach?
85
86
Constraints: The real-world usually has constraints; ranging from approved technology lists, prescribed integration standards, target deployment environment, size of
team, etc. Again, not considering these could cause you to deliver a software system
that doesnt complement your environment, adding unnecessary friction.
Principles: These are the things that you want to adopt in an attempt to provide
consistency and clarity to the software. From a design perspective, this includes
things like your decomposition strategy (e.g. layers vs components vs micro-services),
separation of concerns, architectural patterns, etc. Explicitly outlining a starting set of
principles is essential so that the team building the software starts out heading in the
same direction.
87
which provide some often needed vision and guidance for the team. My experience suggests
that a little direction can go a long way.
Probability vs impact
A good way to think about risk is to separate out the probability of that risk happening from
the negative impact of it happening.
Probability: How likely is it that the risk will happen? Do you think that the chance
is remote or would you be willing to bet cash on it?
Impact: What is the negative impact if the risk does occur? Is there general discomfort
for the team or is it back to the drawing board? Or will it cause your software project
to fail?
Both probability and impact can be quantified as low, medium, high or simply as a numeric
value. If you think about probability and impact separately, you can then plot the overall
score on a matrix by multiplying the scores together as illustrated in the following diagram.
89
Quantifying risk
Prioritising risk
Prioritising risks is then as simple as ranking them according to their score. A risk with a low
probability and a low impact can be treated as a low priority risk. Conversely, a risk with
a high probability and a high impact needs to be given a high priority. As indicated by the
colour coding
Green: a score of 1 or 2; the risk is low priority.
Amber: a score of 3 or 4; the risk is medium priority.
Red: a score of 6 or 9; the risk is high priority.
Its often difficult to prioritise which risks you should take care of and if you get it wrong,
youll put the risk mitigation effort in the wrong place. Quantifying risks provides you with
a way to focus on those risks that are most likely to cause your software project to fail or you
to be fired.
32. Risk-storming
Risk identification is a crucial part of doing just enough up front design but its something
that many software teams shy away from because its often seen as a boring chore. Riskstorming is a quick, fun, collaborative and visual technique for identifying risk that the whole
team can take part in. There are 4 steps.
Risk-storming
91
As with software development estimates, peoples perceptions of risk can be subjective based
upon their experience. If youre planning on using a new technology, hopefully somebody on
the team will identify that there is a risk associated with doing this. Also, somebody might
quantify the risk of using new technology relatively highly whereas others might not feel
the same if theyve used that same technology before. Identifying risks individually allows
everybody to contribute to the risk identification process and youll gain a better view of the
risks perceived by the team rather than only from those designing the software or leading
the team.
92
Risk-storming
This part of the technique is visual and, once complete, lets you see at a glance where the
highest areas of risk are. If several people have identified similar risks youll get a clustering
of sticky notes on top of the diagrams as peoples ideas converge.
Risk-storming
93
Mitigation strategies
Identifying the risks associated with your software architecture is an essential exercise
but you also need to come up with mitigation strategies, either to prevent the risks from
happening in the first place or to take corrective action if the risk does happen. Since the
risks are now prioritised, you can focus on the highest priority ones first.
There are a number of mitigation strategies the are applicable depending upon the type of
risk, including:
1. Education: Training the team, restructuring it or hiring new team members in areas
where you lack experience (e.g. with new technology).
2. Prototypes: Creating prototypes where they are needed to mitigate technical risks by
proving that something does or doesnt work. Since risk-storming is a visual technique,
it lets you easily see the stripes through your software system that you should perhaps
look at in more detail with prototypes.
3. Rework: Changing your software architecture to remove or reduce the probability/impact of identified risks (e.g. removing single points of failure, adding a cache to protect
from third-party system outages, etc). If you do decide to change your architecture,
you can re-run the risk-storming exercise to check whether the change has had the
desired effect.
Risk-storming
94
Collective ownership
As a final point related to risks, who owns the risks on most software projects anyway? From
my experience, the risk register (if there is one) is usually owned by the lone non-technical
project manager. Does this make sense? Do they understand the technical risks? Do they
really care about the technical risks?
A better approach is to assign ownership of technical risks to the software architecture role.
By all means keep a central risk register, but just ensure that somebody on the team is actively
looking after the technical risks, particularly those that will cause your project to be cancelled
or you to be fired. And, of course, sharing the software architecture role amongst the team
paves the way for collective ownership of the risks too.
96
At one end of the scale you have waterfall that, in its typical form, suggests big design up
front where everything must be decided, reviewed and signed-off before a line of code is
written. And at the other end you have the agile approaches that, on the face of it, shy away
from doing architecture.
At this point its worth saying that this isnt actually true. Agile methods dont say dont
do architecture, just as they dont say dont produce any documentation. Agile is about
sufficiency, moving fast, embracing change, feedback and delivering value. But since agile
approaches and their evangelists dont put much emphasis on the architectural aspects of
software development, many people have misinterpreted this to mean agile says dont do
any architecture. More commonly, agile teams choose to spread the design work out across
the project rather than doing it all up front. There are several names for this, including
evolutionary architecture and emergent design. Depending on the size and complexity
of the software system along with the experience and maturity of the team, this could
unfortunately end up as foolishly hoping for the best.
Sitting between the ends of the scale are methods like the Rational Unified Process (RUP),
Disciplined Agile Delivery (DAD) and DSDM Atern. These are flexible process frameworks
that can be implemented by taking all or part of them. Although many RUP implementations
have typically been heavyweight monsters that have more in common with waterfall
approaches, it can be scaled down to exhibit a combination of characteristics that lets it
take the centre ground on the scale. DAD is basically a trimmed down version of RUP, and
DSDM Atern is a similar iterative and incremental method that is also influenced by the agile
97
movement. All three are risk-driven methodologies that basically say, gather the majority
of the key requirements at a high level, get the risky stuff out of the way, then iterate and
increment. DSDM Atern even uses the term firm foundations to describe this. Done right,
these methods can lead to a nice balance of up front design and evolutionary architecture.
98
Significant change to the architecture during the project lifecycle that could have been
anticipated.
Too many design alternatives and options, often with team members disagreeing on
the solution or way forward.
Uncertainty over whether the design will work (e.g. no prototyping was performed as
a part of the design process).
A lack of technology choices (i.e. unnecessary deferral).
99
Back to RUP for a second, and it uses the term architecturally significant, advising that you
should figure out what might be significant to your architecture. What might be significant?
Well, its anything thats costly to change, is complex (e.g. tricky non-functional requirements
or constraints) or is new. In reality, these are the things with a higher than normal risk of
consequences if you dont get them right. Its worth bearing in mind that the significant
elements are often subjective too and can vary depending on the experience of the team.
Firm foundations
What you have here then is an approach to software development that lets you focus on
whats risky in order to build sufficient foundations to move forward with. The identification
of architecturally significant elements and their corresponding risks is something that should
be applied to all software projects, regardless of methodology. Some agile projects already
do this by introducing a sprint zero, although some agile evangelists will say that youre
doing it wrong if you need to introduce an architecture sprint. I say that you need to do
whatever works for you based upon your own context.
Although all of this provides some guidance, the answer to how much is just enough?
needs one of those it depends type answers because all software teams are different. Some
teams will be more experienced, some teams will need more guidance, some teams will
continually work together, some teams will rotate and change frequently, some software
systems will have a large amount of essential complexity, etc. How much architecture do
you need to do then? I say that you need to do just enough in order to do the following,
which applies whether the software architecture role is being performed by a single person
or shared amongst the team.
1. Structure
What: Understand the significant structural elements and how they fit together,
based upon the architectural drivers.
How: Design and decomposition down to components.
2. Vision
What: Create and communicate a vision for the team to work with.
How: Visualise your software architecture using a collection of diagrams at
varying levels of abstraction.
3. Risks
What: Identify and mitigate the highest priority risks.
How: Risk-storming and concrete experiments.
100
This minimal set of software architecture practices will provide you with firm foundations
that underpin the rest of the software delivery, both in terms of the product being built and
the team that is building it. Some architecture usually does need to be done up front, but
some doesnt and can naturally evolve. Deciding where the line sits between mandatory and
evolutionary design is the key.
Think of this exercise as an architectural kata except that you perform a review that focusses
additionally on the process you went through and the outputs rather than just the architecture
itself. Capture your findings and try to distill them into a set of guidelines for how to approach
the software design process in the future. Agree upon and include examples of how much
detail to go down into, agree on diagram notation and include examples of good diagrams,
determine the common constraints within your own environment, etc. If possible, run the
101
exercise again with the guidelines in mind to see how it changes things. One day is typically
enough time to run through this exercise with a couple of design/communicate/review cycles.
No two software teams are the same. Setting aside a day to practice the software design
process within your own environment will provide you with a consistent starting point for
tackling the process in the future and help you contextualise exactly what just enough up
front design means to you and your team. An additional benefit of practicing the software
design process is that its a great way to coach and mentor others. Are you striving for a
self-organising team where everybody is able to perform the software architecture role?
34. Agility
In my experience, people tend to use the word agile to refer to a couple of things. The first
is when talking about agile approaches to software development; moving fast, embracing
change, releasing often, getting feedback and so on. The second use of the word relates to
the agile mindset and how people work together in agile environments. This is usually about
team dynamics, systems thinking, psychology and other things you might associate with
creating high performing teams.
Leaving the latter fluffy stuff aside, for me, labelling a software architecture as being
agile means that it can react to change within its environment, adapting to the ever
changing requirements that people throw at it. This isnt necessarily the same as the software
architecture that an agile team will create. Delivering software in an agile way doesnt
guarantee that the resulting software architecture will be agile. In fact, in my experience,
the opposite typically happens because teams are more focussed on delivering functionality
rather than looking after their architecture.
Understanding agility
To understand how much agility you need from your software architecture, its worth looking
at what agility means. John Boyd, a fighter pilot in the US Air Force, came up with a concept
that he called the OODA loop - Observe, Orient, Decide and Act. In essence, this loop forms
the basis for the decision making process. Imagine that you are a fighter pilot in a dogfight
with an adversary. In order to outwit your opponent in this situation, you need to observe
whats happening, orient yourself (e.g. do some analysis), decide what to do and then act. In
the heat of the battle, this loop needs to be executed as fast as possible to avoid being shot
down by your opponent. Boyd then says that you can confuse and disorient your opponent
if you can get inside their OODA loop, by which he means execute it faster than they can. If
youre more agile than your opponent, youre the one that will come out on top.
In a paper titled What Lessons Can the Agile Community Learn from A Maverick Fighter
Pilot?, Steve Adolph, from the University of British Columbia, takes Boyds concept and
applies it to software development. The conclusion drawn is that agility is relative and
time-based. If your software team cant deliver software and keep pace with changes in the
environment, your team is not agile. If youre working in a large, slow moving organisation
Agility
103
that rarely changes, you can probably take months to deliver software and still be considered
agile by the organisation. In a lean startup, thats likely to not be the case.
104
Agility
In my view, both architectural styles have their advantages and disadvantages, with the
decision to build a monolithic system vs one composed of microservices coming back to
the trade-offs that you are willing to make. As with all things in the IT industry, theres a
middle ground between these extremes. With pragmatism in mind, you can always opt to
build a software system that consists of a number of small well-defined components, yet is
still deployed as a single unit. The Wikipedia page for Component-based development has a
good summary and a component might be something like a risk calculator, audit logger,
report generator, data importer, etc. The simplest way to think about a component is that
its a set of related behaviours behind an interface, which may be implemented using one or
more collaborating classes (assuming an OO language). Good components share a number
of characteristics with good classes and, of course, good microservices: high cohesion, low
coupling, a well-defined public interface, good encapsulation, etc. Well-defined components
provide a stepping stone to migrate to a microservice architecture more easily at a later date,
if you need the benefits given the additional cost and complexity that such an architecturalstyle provides.
Agility
105
107
view is? When we refer to the physical view, is this about the code or the physical
infrastructure? Everybody on the development team needs to understand the essence of
software architecture and the consequences of not thinking about it before we start talking
about things like architecture description languages and evaluation methods. Information
about software architecture needs to be accessible and grounded in reality.
This may seem an odd thing to say, but the people who manage software teams also need to
understand the essence of software architecture and why its a necessary discipline. Some of
the teams Ive worked with over the years have been told by their management to stop doing
software architecture and get on with the coding. In many cases, the reason behind this is a
misunderstanding that all up front design activities need to be dropped when adopting agile
approaches. Such software development teams are usually put under immense pressure to
deliver and some up front thinking usually helps rather than hinders.
1. Educate people
Simply run some workshops where people can learn about and understand what software
architecture is all about. This can be aimed at developers or non-developers, and it will help
to make sure that everybody is talking the same language. At a minimum, you should look
to cover:
What software architecture is.
Why software architecture is important.
The practices you want to adopt.
108
3. Definition of done
If you have a definition of done for work items, add software architecture to the list.
This will help ensure that you consider architectural implications of the work item and
conformance of the implementation with any desired architectural patterns/rules or nonfunctional goals.
5. Architecture katas
Words alone are not enough and the skeptics need to see that architecture is not about big
design up front. This is why I run short architecture katas where small teams collaboratively
architect a software solution for a simple set of requirements, producing one or more
diagrams to visualise and communicate their solutions to others. This allows people to
experience that up front design doesnt necessarily mean designing everything to a very low
level of abstraction and it provides a way to practice communicating software architecture.
109
Its worth asking a few questions to understand the need for actively thinking about software
architecture:
1. What problems is the lack of software architecture causing now?
2. What problems is the lack of software architecture likely to cause in the future?
3. Is there a risk that these problems will lead to more serious consequences (e.g. loss of
reputation, business, customers, money, etc)?
4. Has something already gone wrong?
One of the things that I tell people new to the architecture role is that they do need to dedicate
some time to doing architecture work (the big picture stuff) but a balance needs to be struck
between this and the regular day-to-day development activities. If youre coding all of the
time then that big picture stuff doesnt get done. On the flip-side, spending too much time
on software architecture means that you dont ever get any coding done, and we all know
that pretty diagrams are no use to end-users!
How do we introduce software architecture? is one of those questions that doesnt have a
straightforward answer because it requires changes to the way that a software team works,
and these can only really be made when you understand the full context of the team. On a
more general note though, there are two ways that teams tend to change the way that they
work.
1. Reactively: The majority of teams will only change the way that they work based
upon bad things happening. In other words, theyll change if and only if theres a
catalyst. This could be anything from a continuous string of failed system deployments
or maybe something like a serious system failure. In these cases, the team knows
something is wrong, probably because their management is giving them a hard time,
and they know that something needs to be done to fix the situation. This approach
unfortunately appears to be in the majority across the software industry.
2. Proactively: Some teams proactively seek to improve the way that they work. Nothing
bad might have happened yet, but they can see that theres room for improvement
to prevent the sort of situations mentioned previously. These teams are, ironically,
usually the better ones that dont need to change, but they do understand the benefits
associated with striving for continouous improvement.
Back to the original question and in essence the team was asking permission to spend some
time doing the architecture stuff but they werent getting buy-in from their management.
110
Perhaps their management didnt clearly understand the benefits of doing it or the consequences of not doing it. Either way, the team didnt achieve the desired result. Whenever
Ive been in this situation myself, Ive either taken one of two approaches.
1. Present in a very clear and concise way what the current situation is and what the
issues, risks and consequences are if behaviours arent changed. Typically this is
something that you present to key decision makers, project sponsors or management.
Once they understand the risks, they can decide whether mitigating those risks is
worth the effort required to change behaviours. This requires influencing skills and
it can be a hard sell sometimes, particularly if youre new to a team that you think is
dysfunctional!
2. Lead by example by finding a problem and addressing it. This could include, for example, a lack of technical documentation, inconsistent approaches to solving problems,
too many architectural layers, inconsistent component configuration, etc. Sometimes
the initial seeds of change need to be put in place before everybody understands the
benefits in return for the effort. A little like the reaction that occurs when most people
see automated unit testing for the first time.
Each approach tends to favour different situations, and again it depends on a number of
factors. Coming back to the original question, its possible that the first approach was used
but either the message was weak or the management didnt think that mitigating the risks
of not having any dedicated architecture time was worth the financial outlay. In this
particular case, I would introduce software architecture through being proactive and leading
by example. Simply find a problem (e.g. multiple approaches to dealing with configuration,
no high-level documentation, a confusing component structure, etc) and just start to fix it.
Im not talking about downing tools and taking a few weeks out because we all know that
trying to sell a three month refactoring effort to your management is a tough proposition.
Im talking about baby steps where you evolve the situation by breaking the problem down
and addressing it a piece at a time. Take a few minutes out from your day to focus on these
sort of tasks and before you know it youve probably started to make a world of difference.
Its easier to ask forgiveness than it is to get permission.
111
software architecture is just enough and only you can decide how best to lead the change
that you want to see in your team. Good luck with your journey!
36. Questions
1. Despite how agile approaches have been evangelised, are agile and architecture
really in conflict with one another?
2. If youre currently working on an agile software team, have the architectural concerns
been thought about?
3. Do you feel that you have the right amount of technical leadership in your current
software development team? If so, why? If not, why not?
4. How much up front design is enough? How do you know when you stop? Is this view
understood and shared by the whole team?
5. Many software developers undertake coding katas to hone their skills. How can you
do the same for your software architecture skills? (e.g. take some requirements plus a
blank sheet of paper and come up with the design for a software solution)
6. What is a risk? Are all risks equal?
7. Who identifies the technical risks in your team?
8. Who looks after the technical risks in your team? If its the (typically non-technical)
project manager or ScrumMaster, is this a good idea?
9. What happens if you ignore technical risks?
10. How can you proactively deal with technical risks?
11. Do you need to introduce software architecture into the way that your team works? If
so, how might you do this?
Trade ID
Date
Current trade value in US dollars
Counterparty ID
114
Functional Requirements
The high-level functional requirements for the new Risk System are as follows.
1. Import trade data from the Trade Data System.
2. Import counterparty data from the Reference Data System.
3. Join the two sets of data together, enriching the trade data with information about the
counterparty.
4. For each counterparty, calculate the risk that the bank is exposed to.
5. Generate a report that can be imported into Microsoft Excel containing the risk figures
for all counterparties known by the bank.
6. Distribute the report to the business users before the start of the next trading day (9am)
in Singapore.
7. Provide a way for a subset of the business users to configure and maintain the external
parameters used by the risk calculations.
Non-functional Requirements
The non-functional requirements for the new Risk System are as follows.
Performance
Risk reports must be generated before 9am the following business day in Singapore.
Scalability
The system must be able to cope with trade volumes for the next 5 years.
The Trade Data System export includes approximately 5000 trades now and it is
anticipated that there will be an additional 10 trades per day.
The Reference Data System counterparty export includes approximately 20,000 counterparties and growth will be negligible.
There are 40-50 business users around the world that need access to the report.
Availability
Risk reports should be available to users 24x7, but a small amount of downtime (less
than 30 minutes per day) can be tolerated.
115
Failover
Manual failover is sufficient for all system components, provided that the availability
targets can be met.
Security
This system must follow bank policy that states system access is restricted to authenticated and authorised users only.
Reports must only be distributed to authorised users.
Only a subset of the authorised users are permitted to modify the parameters used in
the risk calculations.
Although desirable, there are no single sign-on requirements (e.g. integration with
Active Directory, LDAP, etc).
All access to the system and reports will be within the confines of the banks global
network.
Audit
The following events must be recorded in the system audit logs:
Report generation.
Modification of risk calculation parameters.
It must be possible to understand the input data that was used in calculating risk.
116
Interoperability
Interfaces with existing data systems should conform to and use existing data formats.