asas 2014 - simon brown

77
Simon Brown @simonbrown Firm Foundations

Upload: avisi-bv

Post on 12-Jun-2015

412 views

Category:

Technology


2 download

DESCRIPTION

ASAS 2014 - Firm Foundations

TRANSCRIPT

Page 1: ASAS 2014 - Simon Brown

Simon Brown @simonbrown

Firm Foundations

Page 2: ASAS 2014 - Simon Brown

Jersey

Page 3: ASAS 2014 - Simon Brown
Page 4: ASAS 2014 - Simon Brown

I help software teams understand

software architecture,

technical leadership and

the balance with agility

I code too⇧ ; - ⇧ 0

Page 5: ASAS 2014 - Simon Brown

Software architecture needs to be more

accessible

Page 6: ASAS 2014 - 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 7: ASAS 2014 - Simon Brown

In previous ASAS editions…

Page 8: ASAS 2014 - Simon Brown

2012

The conflict between agile and architecture

Page 9: ASAS 2014 - Simon Brown

The conflict between agile and architecture

Myth or reality?

Page 10: ASAS 2014 - Simon Brown

Dedicated software architect

!Single point of responsibility for

the technical aspects of the software project

Everybody is a software architect

!Joint responsibility for the technical aspects of the

software project

1. A conflict in team structure

vs

Page 11: ASAS 2014 - Simon Brown

2. A conflict in process

Software Architecture

Document

Big up front design !

Requirements capture, analysis and design complete before

coding starts

Evolutionary architecture

!The architecture evolves

secondary to the value created by early regular releases of

working software

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

vs

Page 12: ASAS 2014 - Simon Brown

2013

Agility and the essence of software architecture

Page 13: ASAS 2014 - Simon Brown

A good architecture

enables agility

Page 14: ASAS 2014 - Simon Brown

Monolithic architecture

Service-based architecture

(SOA, micro-services, etc)

Something in between (components)

Page 15: ASAS 2014 - Simon Brown

2014

Firm foundations

Page 16: ASAS 2014 - Simon Brown

“Big design up front is dumb.

!

Doing no design up front is even dumber.”

!

(Dave Thomas)

Page 17: ASAS 2014 - Simon Brown

A design revival?

Page 18: ASAS 2014 - Simon Brown

Beyond Scrum

DSDM Atern Disciplined Agile Delivery (DAD) Scaled Agile Framework (SAFe)

Page 19: ASAS 2014 - Simon Brown

“The Atern lifecycle process” (from http://dsdm.org/content/6-lifecycle)

Page 20: ASAS 2014 - Simon Brown

“ ”The Foundations phase is aimed at establishing

firm and enduring foundations

for the project.

Page 21: ASAS 2014 - Simon Brown

AaaS ... architecture as a service

Software development is not a

relay sportSoftware

Architecture Document

Page 22: ASAS 2014 - Simon Brown

It’s not about creating a

perfect end-state, framework or

complete architecture

Page 23: ASAS 2014 - Simon Brown

You need a starting point

Page 24: ASAS 2014 - Simon Brown

I often need to be the process guy…

Page 25: ASAS 2014 - Simon Brown

Structure

Page 26: ASAS 2014 - Simon Brown

Whiteboards and context diagrams

Page 27: ASAS 2014 - Simon Brown
Page 28: ASAS 2014 - Simon Brown

Whiteboards and domain diagrams

Page 29: ASAS 2014 - Simon Brown
Page 30: ASAS 2014 - Simon Brown

Wireframes (e.g. Balsamiq)

Page 31: ASAS 2014 - Simon Brown

Pair* architecting

* two or more people

Page 32: ASAS 2014 - Simon Brown

We’re trying to design some software;

not create a fluffy, conceptual solution

Page 33: ASAS 2014 - Simon Brown

Should software design be

technology agnostic?

Page 34: ASAS 2014 - Simon Brown

“the solution is simple and can be built with any technology”

!

“we don't want to force a solution on developers”

!

"it's an implementation detail” !

“we follow the ‘last responsible moment’ principle”

1. Context

A global investment bank based in London, New York and Singapore trades (buys and sells)

financial products with other banks (counterparties). When share prices on the stock markets

move up or down, the bank either makes money or loses it. At the end of the working day, the

bank needs to gain a view of how much risk they are exposed to (e.g. of losing money) by

running some calculations on the data held about their trades. The bank has an existing Trade

Data System (TDS) and Reference Data System (RDS) but need a new Risk System.

Trade DataSystem

Reference DataSystem

Risk System

1.1. Trade Data SystemThe Trade Data System maintains a store of all trades made by the bank. It is already configured

to generate a file-based XML export of trade data at the close of business (5pm) in New York.

The export includes the following information for every trade made by the bank:

• Trade ID

• Date

• Current trade value in US dollars

• Counterparty ID

1.2. Reference Data SystemThe Reference Data System maintains all of the reference data needed by the bank. This

includes information about counterparties; each of which represents an individual, a bank, etc.

A file-based XML export is also available and includes basic information about each counterparty.

Risk System

Page 35: ASAS 2014 - Simon Brown

Hexagons and onions

Page 36: ASAS 2014 - Simon Brown

Significant decisions

can be moved but rarely eliminated

Relational Database

Web Application

Database Abstraction Layer (e.g. ORM)

Another abstraction layer

Page 37: ASAS 2014 - Simon Brown

Technology is

not

an “implementation detail”

Page 38: ASAS 2014 - Simon Brown

A common set of abstractions

is more important than a common notation

Page 39: ASAS 2014 - 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 40: ASAS 2014 - Simon Brown

Classes, Responsibilities, Collaborations

Components

Page 41: ASAS 2014 - Simon Brown

An initial set of components

Page 42: ASAS 2014 - Simon Brown

Abstraction is about reducing detail rather than creating a different representation

Page 43: ASAS 2014 - Simon Brown

Software architecture

vs

code

Page 44: ASAS 2014 - Simon Brown

Does your code reflect the

abstractions that you think about?

Page 45: ASAS 2014 - Simon Brown

Agree upon some

principles If you genuinely don’t know what you’re building (and therefore can’t create a component model),

agree on some principles that you will use to structure your software

Page 46: ASAS 2014 - Simon Brown

Structure Components, technologies,

principles

Page 47: ASAS 2014 - Simon Brown

Vision

Page 48: ASAS 2014 - Simon Brown

Detailed blueprints!

!

vs

setting a direction

Page 49: ASAS 2014 - Simon Brown

In my experience, software teams aren’t able to

effectively communicate the software architecture

of their systems

Page 50: ASAS 2014 - 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 51: ASAS 2014 - Simon Brown
Page 52: ASAS 2014 - Simon Brown

Context !•What are we building?

!•Who is using it?

(users, actors, roles, personas, etc)

!•How does it fit into the existing IT environment? (systems, services, etc)

Page 53: ASAS 2014 - Simon Brown

Containers !•What are the high-level technology decisions? (including responsibilities)

!•How do containers communicate with one another?

!•As a developer, where do I need to write code?

Page 54: ASAS 2014 - Simon Brown

Components !•What components/services is the container made up of?

!•Are the technology choices and responsibilities clear?

Page 55: ASAS 2014 - Simon Brown

The conversations

change

Page 56: ASAS 2014 - Simon Brown

Sketches will become out of date

Page 57: ASAS 2014 - Simon Brown

Software architecture

as

code

Page 58: ASAS 2014 - Simon Brown
Page 59: ASAS 2014 - Simon Brown

Software architecture model as code -> JSON -> diagrams

Page 60: ASAS 2014 - Simon Brown

structurizr.com

Page 61: ASAS 2014 - Simon Brown

Risks

Page 62: ASAS 2014 - Simon Brown

An example timeline from

“Beyond Retrospectives” by Linda Rising

!#gotocon Aarhus 2011

Page 63: ASAS 2014 - Simon Brown

Base your architecture on requirements, travel light

and prove your architecture with concrete experiments.

Base your architecture on requirements, travel light

and prove your architecture with concrete experiments.

Base your architecture on requirements, travel light

and prove your architecture with concrete experiments.

Scott Ambler http://www.agilemodeling.com/essays/agileArchitecture.htm

Page 64: ASAS 2014 - Simon Brown

Web tier

Concrete experiments (prototype, proof of concept or

production code)

Middle tier

Database tier

Page 65: ASAS 2014 - Simon Brown

What is architecturally

significant?

Costly to change

Complex New

Page 66: ASAS 2014 - Simon Brown

You need to

identify and mitigate

your highest priority

risks

Page 67: ASAS 2014 - Simon Brown

Security holes/breaches, data loss, network outages, server outages, poor performance, poor scalability, deployment

complexity, lack of skills, unproven technology, external

interfaces changing, users doing things they shouldn’t…

Page 68: ASAS 2014 - Simon Brown

Like estimates, risks are

subjective

Page 69: ASAS 2014 - Simon Brown

Risk-storming

A collaborative and visual technique for identifying risk

Page 70: ASAS 2014 - Simon Brown

You still need to deal with the risks

(mitigation strategies include hiring people, undertaking proof of concept

and changing your architecture)

Page 71: ASAS 2014 - Simon Brown

Does your architecture

work? (write code and test early if needed)

Page 72: ASAS 2014 - Simon Brown

For structurizr.com !

Rendering a dynamic diagram in JavaScript Exporting that diagram to PNG

Rackspace vs Pivotal Web Services

Page 73: ASAS 2014 - Simon Brown

You can still get it wrong

though!

Page 74: ASAS 2014 - Simon Brown

In summary…

Page 75: ASAS 2014 - 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 76: ASAS 2014 - Simon Brown

Requirements

Context, Containers and Components

How long?

1. Current SituationWe have an existing Internet Banking offering that allows customers to securely view

information about their bank accounts held with us via the web. Although we were one of the

first to market with such a product, the system itself is a number of years old now and a series

of problems has been identified during a consulting exercise that we recently initiated. In

summary:

• The system only provides customers with read-only access to information about their

bank accounts. This includes account balances, recent transactions and recent

statements.• The information presented to customers is slightly out-of-date, because information from

the core banking system is exported to the website on a nightly basis.

• Transactional requests are not possible through the site, with customers instead sending

a secure message to the call centre with their request instead. This process is open to

abuse and fraud.• The number of features supported by the offering is limited.

• The technology is no longer seen as “leading edge”, is hard to enhance and costly to

maintain. In addition, the technology has reached “end of life” and is no longer

proactively supported by the vendor.

• The system doesn’t meet current website accessibility standards.

In a recent survey, our Internet Banking system was perceived as poor in terms of the user

experience and the level of information available through the website. With our competitors

now offering fully transactional systems, there is a risk that we will lose business.

2. VisionThe board have given us the go-ahead to initiate a project to replace the current Internet

Banking system, which will need to coincide with the corporate rebranding that will be taking

place in 12 weeks. The replacement system should:• Provide customers with real-time access to information about their bank accounts.

• Provide customers with the ability to perform common transactions through the website.

This includes making payments, setting up standing orders, transferring money and so on.

• Provide customers with a rich user experience.

• Meet current website accessibility standards.

• Be developed using the new corporate website design guidelines.

Big Bank plcInternet Banking System

Page 77: ASAS 2014 - Simon Brown

Firm foundations Create a sufficient starting point

and set a direction,

in a minimal amount of time,

to stack the odds of success in your favour

[email protected]

@simonbrown on Twitter