Simon Brown

55
Simon Brown @simonbrown Agility and the essence of software architecture

Transcript of Simon Brown

Page 1: Simon Brown

Simon Brown @simonbrown

Agility and the essence of

software architecture

Page 2: Simon Brown
Page 3: Simon Brown

I help software teams understand

software architecture,

technical leadership and

the balance with agility

I code too⇧ ; - ⇧ 0

Page 4: Simon Brown

There’s a common misconception that software architecture should be

conceptual and

exclude technology

Page 5: Simon Brown

A developer-friendly guide to software

architecture, technical leadership

and the balance with agility

10 out of 10 “Highly recommended reading”

!Junilu Lacar, JavaRanch

http://leanpub.com/software-architecture-for-developers

Page 6: Simon Brown

Agility

Page 7: Simon Brown

Agile is about

!

moving fast, embracing change, releasing often,

getting feedback, etc

plus some

fluffy stuff

Page 8: Simon Brown

What is

agile software architecture?

Page 9: Simon Brown

Is agile software architecture about using sticky notes and index cards?

Page 10: Simon Brown

Delivering software in an agile way

doesn’t guarantee that the resulting

software architecture is agile

Page 11: Simon Brown

Agile teams don’t necessarily

create agile software

architectures

Page 12: Simon Brown

An agile software architecture

easily reacts to change

within its environment

Page 13: Simon Brown

Are monolithic architectures agile?

Page 14: Simon Brown

Are “big ball of mud” architectures agile?

Page 15: Simon Brown

Are service-based architectures agile?

Page 16: Simon Brown

A good architecture

enables agility

Page 17: Simon Brown

Nothing is free!

Page 18: Simon Brown

Monolithic architecture

Service-based architecture (SOA, micro-services, etc)

Something in between (components)

Page 19: Simon Brown

What does

“agility” mean?

Page 20: Simon Brown

John Boyd, US Air Force

Observe Orient

Act Decide

Page 21: Simon Brown

Agility is relative and time-based

Page 22: Simon Brown

Inspect !

and !

Adapt

Page 23: Simon Brown

How do we inspect

an existing software architecture?

Page 24: Simon Brown

Who here uses UML

on a regular basis?

Page 25: Simon Brown

9 out of 10 people

don’t use UML (in my experience)

Page 26: Simon Brown

NoUML!diagrams?

Page 27: Simon Brown

In my experience, software teams aren’t able to

effectively visualise the

software architecture

of their systems

Page 28: Simon Brown

It’s usually difficult to show the entire design on

a single diagram

Different views of the design can be used to manage complexity and

highlight different aspects of the solution

Page 29: Simon Brown

Do the names of those views make sense?

Development vs PhysicalProcess vs FunctionalConceptual vs Logical

Development vs ImplementationPhysical vs Implementation

Physical vs Deployment

Page 30: Simon Brown

Did you

code it that way?

Page 31: Simon Brown

A common set of abstractions

is more important than a common notation

Page 32: Simon Brown

Agree on a simple set of abstractions that the whole team can use to communicate

Class Class Class

Component Component Component

Container (e.g. web server, application server, standalone application,

browser, database, file system, etc)

Container (e.g. web server, application server, standalone

application, database, file system, etc)

Container (e.g. web server, application server, standalone

application, database, file system, etc)

Software System

Page 33: Simon Brown

The C4 model

Classes Component or pattern implementation details

System Context The system plus users and system dependencies

Containers The overall shape of the architecture and technology choices

Components Logical components and their interactions within a container

Page 34: Simon Brown

Static structure (C4)

Sequence & collaboration

Process & workflow

Infrastructure Deployment

Page 35: Simon Brown

Sketches are maps that help a team navigate a complex codebase

Page 36: Simon Brown

How do we adapt

an existing software architecture?

Page 37: Simon Brown

Is architectural

refactoring hard?

Page 38: Simon Brown

Abstraction is about reducing detail rather than creating a different representation

Page 39: Simon Brown

Does your code reflect the

abstractions that you think about?

Page 40: Simon Brown

We often think

in components

but write classes

Page 41: Simon Brown

Just Enough Software Architecture A Risk-Driven Approach

!George Fairbanks

“the model-code gap” and an

“architecturally-evident coding style”

(subclassing, naming conventions, module dependencies, package structure, …)

Page 42: Simon Brown

techtribes.je

bit.ly/sa4d-techtribesje

Page 43: Simon Brown

https://github.com/techtribesje/techtribesje

Page 44: Simon Brown

What’s a “component”?

Page 45: Simon Brown

What’s a “component”?

Page 46: Simon Brown

Diagramming tools see

packages and classes

rather than components

Page 47: Simon Brown

Think about how to align the

software architecture

and the

code

Page 48: Simon Brown

The essence of software architecture

Page 49: Simon Brown

Just enough up front design to

understand the structure

of the software and

create a shared vision

for the team

Page 50: Simon Brown

Plus you need to

identify and mitigate

your highest priority

risks

Page 51: Simon Brown

Risk-storming

A collaborative and visual technique for identifying risk

Page 52: Simon Brown

Risks !

Identify and mitigate the highest priority

risks. !!!!!!

Risk-storming and concrete experiments.

Vision !

Create and communicate a

vision for the team to work with.

!!!!!

Context, container and component diagrams.

Structure !

Understand the significant structural

elements and how they fit together, based upon

the architectural drivers.

!!!

Design and decomposition down

to containers and components.

Just enough up front design

to create firm foundations

for the software product and its delivery

Page 53: Simon Brown

/// <summary> /// Represents the behaviour behind the ... /// </summary> public class SomeWizard : AbstractWizard { private DomainObject _object; private WizardPage _page; private WizardController _controller; ! public SomeWizard() { } ! ... !}

Just enough up front design to create firm foundations

for the software product and its delivery

!

(structure, risks, vision)

The role

The processSoftware

Architecture Document

Page 54: Simon Brown

So what? !

“the subject of agile and architecture have been written about and discussed at length,

and in fact now it is almost old news”

Page 55: Simon Brown

We have a duty to educate and

bring software architecture back to developers

[email protected]

@simonbrown on Twitter