Simon brown archsummit2012 the-frustrated-architect

Preview:

Citation preview

大会官方网站与资料下载地址:www.archsum m it.com

感谢您参加本次ArchSummit全球架构师峰会!

郁闷的架构师The frustrated architect

Simon BrownJersey, Channel Islands

simon.brown@codingthearchitecture.com

@simonbrown (Twitter)

写作培训与咨询

leanpub.com

感知Perceptions

我是一个软件架构师

I’m a software architect

Big up front designand analysis paralysis UML

Waterfall

Ivory TowerArchitecture AstronautPowerPoint Architect

PPT架构

Enterprise Service Bus

Single Sign-On

Corporate Data Model

Buzzword Bingo

“ ”架构师是

“业务技术战略家” Architects are “business technology strategists”

“ ”微软的SharePoint

有很明确的ROI和TCOMicrosoft SharePoint has a solid ROI & TCO

“ ”MongoDB的价值主张是什么给我看看你的商业分析!

What’s the value proposition of MongoDB? Show me your business case!

热門词汇Buzzwords!

热門词汇让人们离软件架构的学问越来越远Buzzwords push people away from learning aboutthe software architecture discipline

我是团队的另一名成员我喜欢编写代码

I’m another member of the team ... I like writing code

Coding

“Architecture”

Time

UML

管理咨询Management Consulting

我们的导师升职了

救命!Our mentor has been promoted ... help!

企业职场发展阶梯Corporate career ladder

Technical

Non-technical

http://www.codingthearchitecture.com

软件架构师不是组织中的职级 “Software Architect” is not an organisational rank

软件架构师是你慢慢演化成的角色

Software architecture is a role that you evolve into

我们希望变得敏捷

We aspire to be agile

敏捷很酷,但是我们是不是忘了什么东西?Agile is cool, but are we forgetting something?

敏捷Agile

Agile

Emergent design

Retrospectives

Moving fast, embracing

change

Automated acceptance

testing

Continuous delivery

Self-organising team

Test-driven development

Lean

Kanban

Technical guidance

Non-functional requirements

Vision

Structure

Performance

Scalability

Availability

Security

Technical quality

敏捷 + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

“敏捷软件架构师”

是什么?What is an agile software architect?

我是一个

“敏捷软件架构师”I’m an agile software architect!

Evolutionary Architectureand Emergent Design

YAGNIDefer until the

last responsible moment

Refactoring Spikes, stripes and tracers

System Metaphor

这是敏捷的软件架构吗?Is this agile architecture?

即时贴Sticky notes!

敏捷Skills

Business Modelling

Requirements

Analysis & Design

Implementation

Test

Deployment

Configuration Management

Project Management

Environment

Sprint 1 Sprint 2 Sprint 3

演化的架构

愚蠢地期待最好结果?Evolutionary architecture ... foolishly hoping for the best?

Agile software team

我们不需要软件架构,我们实施测试驱动开发

We don’t need software architecture; we do TDD

测试驱动开发玩的是代码

软件架构玩的是“全景”TDD is about code ... software architecture is about the “big picture”

最后负责时刻Last responsible moment

自组织团队不一定总在工作Self-organising teams don’t always work

为什么你们要抨击敏捷?Why are you bashing agile?

让我们重新发明轮子Let’s reinvent the wheel

回顾Retrospective

我们是不是忘的比学的还多?Have we forgotten more than we’ve learnt?

UML

Class

Responsibilities Collaborators

Class

Responsibilities Collaborators

类-责任-协作 Class-Responsibility-Collaboration

Class

Responsibilities Collaborato

rs

边界、控制器和实体Boundaries, controllers and entities

基于组件的开发Component-based development

Component A

Component B

Component C

High cohesion, low coupling

design by contract,

Liskov substitution principle

Pattern-OrientedSoftware Architecture

Rational 统一过程Rational Unified Process (RUP)

TransitionConstructionElaborationSkills

Business Modelling

Requirements

Analysis & Design

Implementation

Test

Deployment

Configuration Management

Project Management

Environment

Inception

要讲求实效很多人不知道比较老的软件开发实践

Be pragmatic ... many people aren’t aware of older software development practices

谁在讲授前敏捷时代的经典?Who is teaching the classics of the pre-agile era?

UML

基于组件的开发Pattern

-Orie

nted Softw

are Arch

itectu

re

Rational 统

一过程

Test

-Driv

en D

evelop

men

t

Kanb

anCo

ntinu

ous

Deliv

ery

Syst

ems

Think

ing

Extr

eme

Prog

ramming

所以你认为你是一个软件架构师么?So you think you're a software architect?

Curriculum Vitae / Resume

Enterprise ArchitectA Big Company (2006-date)

I have been responsible for the design and implementation of an

enterprise customer solution. I drew some UML diagrams and I

wrote some Java code.

I would like a job writing more code please. :-)

大企业中的企业架构与软件架构不同

Enterprise architecture isn’t the same as software architecture in a large enterprise!

AaaS ... architecture as a service

软件开发不是接力赛Software development is not a relay sport

SoftwareArchitecture

Document

成功的软件交付不仅仅是实现细节Successful software delivery is not an implementation detail!

愚蠢地期待最好结果?

不负责任的软件架构师The irresponsible software architect

Cross-site scripting attacks possible; weak passwords allowed; HTTP sessions

didn’t timeout; ...

Basic functionality errors; little or no quality

assurance; rework required late in the project because

of assumptions; ...

No non-functional testing (e.g. penetration testing or

load testing); ...

No documentation; ...这是一个战略软件平台!

This is a strategic software platform!

我们是作者还是软件架构师?Are we authors or software architects?

你知道你在构建什么吗?Do you know what you’re building?

混乱Chaos ... does the team understand what they are building and how they are building it?

团队是否理解他们要构建什么?

应该如何构建?

混乱Chaos ... does the team understand what they are building and how they are building it?

团队是否理解他们要构建什么?

应该如何构建?

No defined structure, inconsistent approaches,

big ball of mud,spaghetti code, ...

停!Slow, insecure, unstable, unmaintainable,

hard to deploy, hard to change, over time, over budget, ...

对“太长,没看”的共同理解Shared vision of TL; DR

SoftwareArchitecture

Document

对“什么?!”的共同理解Shared vision of what!?

WCF Communications (SOAP, REST, TCP, MQ)

Service Proxy Service Proxy Service ProxyService Proxy

Presentation Layer(Service A Pages)

Presentation Layer(Service B Pages)

Presentation Layer(Service C Pages)

Service A Service B Service C

3rd Party Interface

Services Implementation

Service Proxy

Presentation Layer (Master Pages)

Services Implementation Services Implementation

Services Implementation

Services Implementation

Presentation Layer

Transport

WCF Service

Contracts Contracts

Service AServices

Service BServices

Service Interface

Business Layer

Contracts

Service CServices

Data Contracts Data Contracts Data Interface

Service AData Layer

Data Layer

Service CData Layer Data Layer

More Common ServicesCommon Services

Contracts Contracts

Data Contracts Data Contracts

Services ServicesServices

Data Layer

Data Layer

Data Layer

Services ServicesServices

Data Layer

Data Layer

Data Layer

3rd Party Interface3rd Party Interface3rd Party Interface

Common

Foundation

Data Layer

Data Contract

Data Contract

Authentication

Data Management

Logging

EmailCRM WorkflowData Access

我们可以把我们软件开发的过程可视化We can visualise our software development process

我们已经忘记了如何可视化我们构建的软件We’ve forgotten how to visualise the software that we’re building

你如何设计软件?How do you design software?

解决方案?Solutions?

软件程序猿

软件架构师软件架构师坐在象牙塔之中

Software architect sitsin an ivory tower

软件程序猿专注于底层细节

Software developers focus on the low-level detail

软件程序猿 软件程序猿 软件程序猿 软件程序猿

协作、教练、指导 Collaborating, coaching and mentoring

提升软件架构的自我意识Increased awareness of software architecture

软件架构师

软件程序猿

缩小差距

深度 ... 深厚的技术知识Depth ... deep technical knowledge

广度 ... 知道不同的方案和软件开发实践Breadth ... awareness of different options and software development practices

优秀的软件架构师是“建筑师”

Good software architects are master builders

通才化的专才

你会雇一个不会编码的架构师么?Would you hire a software architect that wouldn’t code?

软件架构师这个角色

需求和约束Requirements and constraints

软件设计的演化Evolution of software design

教练和指导Coaching and mentoring

质量保证Quality assurance

编码Coding

技术选型Technology selection

软件设计Software design

软件设计的评估Evaluation of software design

Macro (classes)

Abstract Specific

作为软件程序猿,代码是我们的主要面向对象As developers, the code is our major focus

Telephoto (components)Standard (containers)

Wide angle (contex

t)

Abstract Specific

有时你需要离代码远一点儿Sometimes you need to step back from the code

Macro (classes)Telephoto (components)Standard (containers)

Wide angle (contex

t)

Macro (classes)

1. Current Situation

We 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. Vision

The 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

Telephoto (components)

Standard (containers)

Wide angle (contex

t)

任何问题都有多种解决方案There are a number of solutions to any problem

需求

原则

约束

Macro (classes)

需求

原则

约束

1. Current Situation

We 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. Vision

The 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

Telephoto (components)

Standard (containers)

Wide angle (contex

t)

任何问题都有多种解决方案There are a number of solutions to any problem

UML工具白板和挂图

Post-it notesFlipchar

t & pens

Blu-Tack

Index cards Whiteboard & pensCollaborative de

sign协作式软件设计

Collaborative software design

1. Context 2. Containers 3. Components

按常理出牌 (thinking inside the box)

4. ClassesC4ContextContainersComponentsClasses

有效的草图Effective sketches

你会那样编码么?Would you code it that way?

这就是为什么软件架构

师必须是“建筑师”

This is why software architects must be

master builders

SoftwareArchitectureDocument

旅行手册Travel Guidebook

地图Maps

景点Sights

历史和文化History and culture

实用信息Practical information

文档应该说清楚代码没有说的东西Documentation should describe what the code doesn’t

减少浪费,增加价值

Reduce waste, add value

文档应该说明意图,并作为源代码的导引说明

Use it to explain intent and act as aguide to navigate the source code

大型前期设计?Big design up front?

你做多少前期设计?How much up front design should you do?

大型前期设计?

演化的架构?

没有?

还是二者之间?

Waterfall

刚刚够用Just enough

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 Amblerhttp://www.agilemodeling.com/essays/agileArchitecture.htm

InfrastructureServices

Foundations

Features and Services

A software system

实验 Experiments

概念原型或证明

Prototype or proof of concept

架构上的重要性Architecturally significant

你需要识别并消除优先级最高的风险You need to identify and mitigate your highest priority risks

概率 (Probability)

(Impa

ct)低 (1) 中 (2) 高 (3)

(1)

(2)

(3)

1 2

2 4

3

3 6

6

9

影响

风险风暴

“Risk-storming”

识别风险的协作与可视化技巧A collaborative and visual technique for identifying risk

风险识别出来后,你还是需要应对它们You still need to deal with the risks once they’ve been identified

An example timeline from

“Beyond Retrospectives”by Linda Rising

#gotocon Aarhus 2011

新技术的问题Problems with new technology

总结The summary

软件架构师角色和软件设计流程是不同的东西

The software architecture role and the process of designing software are different

混乱团队 ... 自组织团队

团队中的专职软件架构师Dedicated software architect

on a team

每个人都是软件架构师Everybody is a software architect

软件架构师这个角色The software architecture role

SoftwareArchitecture

Document...

软件设计流程The software design process

大型前期设计Big up front design

Requirements capture, analysis anddesign 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() { }

...

}

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

public SomeWizard() { }

...

}

刚刚够用软件架构师这个角色

The software architecture

role

软件设计流程The software design process

理解软件的重要结构元素Understand the significant structural elements

of the software

识别并消除关键风险

Identify and mitigate the key risks

为团队提供坚实基础和共同愿景Provide firm foundations anda shared vision for the team

SoftwareArchitecture

Document

需要Yes

敏捷软件开发项目需要软件架构师么?Do agile software development projects need software architecture?

是的,它可以制止大型前期设计和分析带来的瘫痪

Yes, it stops big design up front and analysis paralysis

敏捷软件开发对架构师来说是好东西吗?Is agile software development a good thing for software architecture?

定义你的团队中的软件架构师角色Define the software architecture role on your teams

向软件架构中应用一些工艺Apply some craftsmanship to software architecture

可工作的软件系统!

Software systems that work!

有效的草图和轻量级文档 Effective sketches and

lightweight documentation

积极、主动,以身作则Be proactive, take ownership and lead by example

我们需要为明天培养软件架构师We need to grow the software architects of tomorrow

适合你的就去做!Do whatever works for you!

leanpub.comsimon.brown@codingthearchitecture.com

@simonbrown on Twitter

codingthearchitecture.com

培训与咨询

杭 州 站 ·2012年 10月 25日 ~27日大会官网:www.qconhangzhou.com