SlideShare ist ein Scribd-Unternehmen logo
1 von 81
Design and Architecture in Industry  The agile viewpoint Ben Stopford Thoughtworks
What I’ll be covering ,[object Object],[object Object],[object Object],[object Object]
Why do we need to worry about Architecture and Design? ,[object Object],[object Object],[object Object]
So how to we avoid this?
We Architect our System
…  with UML
AND… We get to spot problems early on in the project lifecycle.  Why is that advantageous?
Because it costs less Low cost of change early in lifecycle
So we have a plan for how to build our application before we start coding.  All we need to do is follow the plan!!
Well this is what we used to do… … but problems kept cropping up…
It was really hard to get the design right up front. ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object]
Ahhh, those pesky users, why can’t they make up their minds?
So… …in summary…
We find designing up front hard…
...and a bit bureaucratic
… and when we do get it right the users generally go and change the requirements…
… and it all changes in the next release anyway.
So are we taking the right approach
Software is supposed to be soft. That means it is supposed to be easy to change.
But is it? ,[object Object],[object Object]
So is fixing the architecture and design up front the right way to do it?
Does the cost curve have to look like this?
Can we design our systems so that we CAN change them later in the lifecycle?
The Cost of Change in an agile application
How
By architecting and designing for change ** But not designing for any specific changes  *** And writing lots and lots of tests
Agile Development facilitates this Code Base Test Test Test
Dynamic Design ,[object Object],[object Object],[object Object]
This means that your system’s design is constantly evolving.
Making our key values: ,[object Object],[object Object]
So what does this imply for the Architect?
Architecture becomes about steering the application so that it remains easy to understand and easy to change.
With everyone being responsible for the design.
So the architects role becomes about steering the applications design through others.
Shepherding the team!
Shepherding the team ,[object Object],[object Object],[object Object]
Timeline Set-up Architecture Push patterns and reuse Watch for architectural breakers Amend Architecture
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1. Architecture through reuse ,[object Object],[object Object],[object Object]
The importance of a Domain Model ,[object Object],[object Object]
2. Architecture through patterns
Separation of Concerns: Layers and Services
Example GUI Data Access ,[object Object],[object Object]
Model-View-Controller
A Real SOA and Layered System Rightmove.com
Business Services Communicating Asynchronously over a Bus Persistence of Hips Client Contacting Service - Services can only communicate over the bus. No Point to point communication (why). - Communication via neutral protocol
SOA ,[object Object],[object Object]
SOA as an A rchitectural Pattern ,[object Object],[object Object],[object Object]
SOA as a  Design Pattern ,[object Object],[object Object],[object Object]
So how does SOA compare to a Component Based Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Layers and Tiers
[object Object],[object Object]
Layers vs. Services ,[object Object],[object Object]
Aside – Bob’s Website Client Application Layer DB Javascipt  Calculation Which way is best?? Client Application Layer DB Server  Calculation
Layered Architecture HIP UI HIP Service Message Bus Data Layer Transformation Layer Business Layer Application Layer Presentation Layer The presentation layer is for pixel-painting. All logic should be delegated elsewhere. The application layer is the glue between presentation and business. It is where MVC controllers live. Logic here is very light – simple field-level validation is as clever as it gets (e.g. “is it a date?”, “is it a number?”) The business layer is a simulation of the business problem. It has no dependencies on the UI or on other technologies. Most importantly, it is isolated from persistence! (Similar to the Service Layer in RM+) The transformation layer is the glue between business logic and non-UI technologies. It maps information between the business logic and some underlying tech. e.g. It maps HIPs into messages for the bus and into records for the database. The data layer is represented by infrastructural tech. The RDBMS, and code to connect to the WebMethods bus sit here. Web Pages Controllers Domain Model Technology Abstraction & Mapping Tech infrastructure HIP DB
What is the point of having layers? Separation of Technical Concerns
Example: Is a transformation layer a good idea? Application Layer Transformation Layer Persistence Layer Database Domain Object Table ORM Domain Object Record Object Table Mapper ORM
UI Layer Application Layer Technical Decomposition into layering Trade Service Data Service Pricing Service Functional Decomposition into Services Domain Model, Utilities etc Reuse across services and potentially layers Application separation and crosscutting
Questions ,[object Object],[object Object]
3. Use of  frameworks to enforce design principals
For Example ,[object Object],[object Object],[object Object]
Aside: What is wrong with the singleton pattern?
It’s very hard to test applications when singletons are around  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dependency Injection ,[object Object],[object Object],[object Object],[object Object]
Spring ,[object Object],[object Object],[object Object]
Config.xml – Define Dependencies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Spring performs construction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Look Up Service ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
But… ,[object Object]
Avoiding Architectural Breakers Course grained decisions that are hard to refactor away from. For example embedding business logic in a UI.
Summary So Far ,[object Object],[object Object],[object Object],[object Object]
How design can go wrong
The overuse of design patterns => Obtuse code
Fragile Base Class Problem ,[object Object],A B C
Solutions ,[object Object],[object Object]
Service Duplication Problem UI Layer Application Layer Technical Decomposition into layering Trade Service Data Service Pricing Service Functional Decomposition into Services Domain Model, Utilities etc
Command/Executor Problem
Solution  Be wary of functional decomposition and its tendency to push you away from reuse
In Conclusion ,[object Object],[object Object],[object Object]
And finally… Never listen to an architect who does not write code.  Conversely if you are an architect, make sure you get your hands dirty.

Weitere ähnliche Inhalte

Was ist angesagt?

NDC London 2017 - The Data Dichotomy- Rethinking Data and Services with Streams
NDC London 2017  - The Data Dichotomy- Rethinking Data and Services with StreamsNDC London 2017  - The Data Dichotomy- Rethinking Data and Services with Streams
NDC London 2017 - The Data Dichotomy- Rethinking Data and Services with Streams
Ben Stopford
 
No More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application InfrastructureNo More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application Infrastructure
ConSanFrancisco123
 
SOA Pattern Event Driven Messaging
SOA Pattern Event Driven MessagingSOA Pattern Event Driven Messaging
SOA Pattern Event Driven Messaging
WSO2
 

Was ist angesagt? (19)

Building Event Driven Services with Stateful Streams
Building Event Driven Services with Stateful StreamsBuilding Event Driven Services with Stateful Streams
Building Event Driven Services with Stateful Streams
 
Data Pipelines with Apache Kafka
Data Pipelines with Apache KafkaData Pipelines with Apache Kafka
Data Pipelines with Apache Kafka
 
The Architect's Two Hats
The Architect's Two HatsThe Architect's Two Hats
The Architect's Two Hats
 
NDC London 2017 - The Data Dichotomy- Rethinking Data and Services with Streams
NDC London 2017  - The Data Dichotomy- Rethinking Data and Services with StreamsNDC London 2017  - The Data Dichotomy- Rethinking Data and Services with Streams
NDC London 2017 - The Data Dichotomy- Rethinking Data and Services with Streams
 
Building Event Driven Services with Kafka Streams
Building Event Driven Services with Kafka StreamsBuilding Event Driven Services with Kafka Streams
Building Event Driven Services with Kafka Streams
 
10 Principals for Effective Event Driven Microservices
10 Principals for Effective Event Driven Microservices10 Principals for Effective Event Driven Microservices
10 Principals for Effective Event Driven Microservices
 
Alternative microservices - one size doesn't fit all
Alternative microservices - one size doesn't fit allAlternative microservices - one size doesn't fit all
Alternative microservices - one size doesn't fit all
 
No More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application InfrastructureNo More Hops Towards A Linearly Scalable Application Infrastructure
No More Hops Towards A Linearly Scalable Application Infrastructure
 
CQRS & EVS with MongoDb
CQRS & EVS with MongoDbCQRS & EVS with MongoDb
CQRS & EVS with MongoDb
 
The Future of Streaming: Global Apps, Event Stores and Serverless
The Future of Streaming: Global Apps, Event Stores and ServerlessThe Future of Streaming: Global Apps, Event Stores and Serverless
The Future of Streaming: Global Apps, Event Stores and Serverless
 
SOA Pattern Event Driven Messaging
SOA Pattern Event Driven MessagingSOA Pattern Event Driven Messaging
SOA Pattern Event Driven Messaging
 
Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...
Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...
Building Event Driven Services with Apache Kafka and Kafka Streams - Devoxx B...
 
BizTalk Mapping Patterns and Best Practices
BizTalk Mapping Patterns and Best PracticesBizTalk Mapping Patterns and Best Practices
BizTalk Mapping Patterns and Best Practices
 
Event Driven Architecture (Integration Tech Event 2019)
Event Driven Architecture (Integration Tech Event 2019)Event Driven Architecture (Integration Tech Event 2019)
Event Driven Architecture (Integration Tech Event 2019)
 
CQRS and Event Sourcing, An Alternative Architecture for DDD
CQRS and Event Sourcing, An Alternative Architecture for DDDCQRS and Event Sourcing, An Alternative Architecture for DDD
CQRS and Event Sourcing, An Alternative Architecture for DDD
 
Migrating to office 365
Migrating to office 365Migrating to office 365
Migrating to office 365
 
Should you be using an event driven architecture - IDA IT (short version)
Should you be using an event driven architecture - IDA IT (short version)Should you be using an event driven architecture - IDA IT (short version)
Should you be using an event driven architecture - IDA IT (short version)
 
GWAVACon - Migration into Office 365 Cloud
GWAVACon - Migration into Office 365 CloudGWAVACon - Migration into Office 365 Cloud
GWAVACon - Migration into Office 365 Cloud
 
Rethink your architecture - Marten Deinum
Rethink your architecture - Marten DeinumRethink your architecture - Marten Deinum
Rethink your architecture - Marten Deinum
 

Ähnlich wie Architecting for Change: An Agile Approach

.NET Architecture for Enterprises
.NET Architecture for Enterprises.NET Architecture for Enterprises
.NET Architecture for Enterprises
Wade Wegner
 
Secrets of going codeless - How to build enterprise apps without coding
Secrets of going codeless - How to build enterprise apps without codingSecrets of going codeless - How to build enterprise apps without coding
Secrets of going codeless - How to build enterprise apps without coding
Newton Day Uploads
 
2014_report
2014_report2014_report
2014_report
K SEZER
 

Ähnlich wie Architecting for Change: An Agile Approach (20)

L02 Architecture
L02 ArchitectureL02 Architecture
L02 Architecture
 
Ncrafts.io - Refactor your software architecture
Ncrafts.io - Refactor your software architectureNcrafts.io - Refactor your software architecture
Ncrafts.io - Refactor your software architecture
 
.NET Architecture for Enterprises
.NET Architecture for Enterprises.NET Architecture for Enterprises
.NET Architecture for Enterprises
 
Designingapplswithnet
DesigningapplswithnetDesigningapplswithnet
Designingapplswithnet
 
Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patterns
 
The Big Picture - Integrating Buzzwords
The Big Picture - Integrating BuzzwordsThe Big Picture - Integrating Buzzwords
The Big Picture - Integrating Buzzwords
 
Agile architecture upload
Agile architecture uploadAgile architecture upload
Agile architecture upload
 
From Components To Services
From Components To ServicesFrom Components To Services
From Components To Services
 
Secrets of going codeless - How to build enterprise apps without coding
Secrets of going codeless - How to build enterprise apps without codingSecrets of going codeless - How to build enterprise apps without coding
Secrets of going codeless - How to build enterprise apps without coding
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
DDD
DDDDDD
DDD
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net core
 
Microservice final final
Microservice final finalMicroservice final final
Microservice final final
 
Evolutionary Design Solid
Evolutionary Design SolidEvolutionary Design Solid
Evolutionary Design Solid
 
The Clean Architecture
The Clean ArchitectureThe Clean Architecture
The Clean Architecture
 
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
 
2014_report
2014_report2014_report
2014_report
 
Let's talk about... Microservices
Let's talk about... MicroservicesLet's talk about... Microservices
Let's talk about... Microservices
 
A Tale of Contemporary Software
A Tale of Contemporary SoftwareA Tale of Contemporary Software
A Tale of Contemporary Software
 

Mehr von Ben Stopford

A little bit of clojure
A little bit of clojureA little bit of clojure
A little bit of clojure
Ben Stopford
 
Big iron 2 (published)
Big iron 2 (published)Big iron 2 (published)
Big iron 2 (published)
Ben Stopford
 
The return of big iron?
The return of big iron?The return of big iron?
The return of big iron?
Ben Stopford
 
Where Does Big Data Meet Big Database - QCon 2012
Where Does Big Data Meet Big Database - QCon 2012Where Does Big Data Meet Big Database - QCon 2012
Where Does Big Data Meet Big Database - QCon 2012
Ben Stopford
 
Advanced databases ben stopford
Advanced databases   ben stopfordAdvanced databases   ben stopford
Advanced databases ben stopford
Ben Stopford
 

Mehr von Ben Stopford (16)

A Global Source of Truth for the Microservices Generation
A Global Source of Truth for the Microservices GenerationA Global Source of Truth for the Microservices Generation
A Global Source of Truth for the Microservices Generation
 
Event Driven Services Part 1: The Data Dichotomy
Event Driven Services Part 1: The Data Dichotomy Event Driven Services Part 1: The Data Dichotomy
Event Driven Services Part 1: The Data Dichotomy
 
Event Driven Services Part 3: Putting the Micro into Microservices with State...
Event Driven Services Part 3: Putting the Micro into Microservices with State...Event Driven Services Part 3: Putting the Micro into Microservices with State...
Event Driven Services Part 3: Putting the Micro into Microservices with State...
 
The Power of the Log
The Power of the LogThe Power of the Log
The Power of the Log
 
Microservices for a Streaming World
Microservices for a Streaming WorldMicroservices for a Streaming World
Microservices for a Streaming World
 
A little bit of clojure
A little bit of clojureA little bit of clojure
A little bit of clojure
 
Big iron 2 (published)
Big iron 2 (published)Big iron 2 (published)
Big iron 2 (published)
 
The return of big iron?
The return of big iron?The return of big iron?
The return of big iron?
 
Big Data & the Enterprise
Big Data & the EnterpriseBig Data & the Enterprise
Big Data & the Enterprise
 
Where Does Big Data Meet Big Database - QCon 2012
Where Does Big Data Meet Big Database - QCon 2012Where Does Big Data Meet Big Database - QCon 2012
Where Does Big Data Meet Big Database - QCon 2012
 
Advanced databases ben stopford
Advanced databases   ben stopfordAdvanced databases   ben stopford
Advanced databases ben stopford
 
Coherence Implementation Patterns - Sig Nov 2011
Coherence Implementation Patterns - Sig Nov 2011Coherence Implementation Patterns - Sig Nov 2011
Coherence Implementation Patterns - Sig Nov 2011
 
A Paradigm Shift: The Increasing Dominance of Memory-Oriented Solutions for H...
A Paradigm Shift: The Increasing Dominance of Memory-Oriented Solutions for H...A Paradigm Shift: The Increasing Dominance of Memory-Oriented Solutions for H...
A Paradigm Shift: The Increasing Dominance of Memory-Oriented Solutions for H...
 
Test-Oriented Languages: Is it time for a new era?
Test-Oriented Languages: Is it time for a new era?Test-Oriented Languages: Is it time for a new era?
Test-Oriented Languages: Is it time for a new era?
 
Ideas for Distributing Skills Across a Continental Divide
Ideas for Distributing Skills Across a Continental DivideIdeas for Distributing Skills Across a Continental Divide
Ideas for Distributing Skills Across a Continental Divide
 
Data Grids with Oracle Coherence
Data Grids with Oracle CoherenceData Grids with Oracle Coherence
Data Grids with Oracle Coherence
 

Architecting for Change: An Agile Approach

  • 1. Design and Architecture in Industry The agile viewpoint Ben Stopford Thoughtworks
  • 2.
  • 3.
  • 4. So how to we avoid this?
  • 6. … with UML
  • 7. AND… We get to spot problems early on in the project lifecycle. Why is that advantageous?
  • 8. Because it costs less Low cost of change early in lifecycle
  • 9. So we have a plan for how to build our application before we start coding. All we need to do is follow the plan!!
  • 10. Well this is what we used to do… … but problems kept cropping up…
  • 11.
  • 12.
  • 13. Ahhh, those pesky users, why can’t they make up their minds?
  • 15. We find designing up front hard…
  • 16. ...and a bit bureaucratic
  • 17. … and when we do get it right the users generally go and change the requirements…
  • 18. … and it all changes in the next release anyway.
  • 19. So are we taking the right approach
  • 20. Software is supposed to be soft. That means it is supposed to be easy to change.
  • 21.
  • 22. So is fixing the architecture and design up front the right way to do it?
  • 23. Does the cost curve have to look like this?
  • 24. Can we design our systems so that we CAN change them later in the lifecycle?
  • 25. The Cost of Change in an agile application
  • 26. How
  • 27. By architecting and designing for change ** But not designing for any specific changes *** And writing lots and lots of tests
  • 28. Agile Development facilitates this Code Base Test Test Test
  • 29.
  • 30. This means that your system’s design is constantly evolving.
  • 31.
  • 32. So what does this imply for the Architect?
  • 33. Architecture becomes about steering the application so that it remains easy to understand and easy to change.
  • 34. With everyone being responsible for the design.
  • 35. So the architects role becomes about steering the applications design through others.
  • 37.
  • 38. Timeline Set-up Architecture Push patterns and reuse Watch for architectural breakers Amend Architecture
  • 39.
  • 40.
  • 41.
  • 43. Separation of Concerns: Layers and Services
  • 44.
  • 46. A Real SOA and Layered System Rightmove.com
  • 47. Business Services Communicating Asynchronously over a Bus Persistence of Hips Client Contacting Service - Services can only communicate over the bus. No Point to point communication (why). - Communication via neutral protocol
  • 48.
  • 49.
  • 50.
  • 51.
  • 53.
  • 54.
  • 55. Aside – Bob’s Website Client Application Layer DB Javascipt Calculation Which way is best?? Client Application Layer DB Server Calculation
  • 56. Layered Architecture HIP UI HIP Service Message Bus Data Layer Transformation Layer Business Layer Application Layer Presentation Layer The presentation layer is for pixel-painting. All logic should be delegated elsewhere. The application layer is the glue between presentation and business. It is where MVC controllers live. Logic here is very light – simple field-level validation is as clever as it gets (e.g. “is it a date?”, “is it a number?”) The business layer is a simulation of the business problem. It has no dependencies on the UI or on other technologies. Most importantly, it is isolated from persistence! (Similar to the Service Layer in RM+) The transformation layer is the glue between business logic and non-UI technologies. It maps information between the business logic and some underlying tech. e.g. It maps HIPs into messages for the bus and into records for the database. The data layer is represented by infrastructural tech. The RDBMS, and code to connect to the WebMethods bus sit here. Web Pages Controllers Domain Model Technology Abstraction & Mapping Tech infrastructure HIP DB
  • 57. What is the point of having layers? Separation of Technical Concerns
  • 58. Example: Is a transformation layer a good idea? Application Layer Transformation Layer Persistence Layer Database Domain Object Table ORM Domain Object Record Object Table Mapper ORM
  • 59. UI Layer Application Layer Technical Decomposition into layering Trade Service Data Service Pricing Service Functional Decomposition into Services Domain Model, Utilities etc Reuse across services and potentially layers Application separation and crosscutting
  • 60.
  • 61. 3. Use of frameworks to enforce design principals
  • 62.
  • 63. Aside: What is wrong with the singleton pattern?
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71. Avoiding Architectural Breakers Course grained decisions that are hard to refactor away from. For example embedding business logic in a UI.
  • 72.
  • 73. How design can go wrong
  • 74. The overuse of design patterns => Obtuse code
  • 75.
  • 76.
  • 77. Service Duplication Problem UI Layer Application Layer Technical Decomposition into layering Trade Service Data Service Pricing Service Functional Decomposition into Services Domain Model, Utilities etc
  • 79. Solution Be wary of functional decomposition and its tendency to push you away from reuse
  • 80.
  • 81. And finally… Never listen to an architect who does not write code. Conversely if you are an architect, make sure you get your hands dirty.

Hinweis der Redaktion

  1. Your design is always tested Encapsulate different concerns so that changes can be independent of one another
  2. The subtle point here is that you must direct the applications progress through others. This
  3. (b) Is closer to the typical architect’s role.
  4. In an agile team we use stand-ups as a good opportunity to establish vision. e.g. broad patterns such as layered separation or finer grained patterns/components such as a centralised workflow engine.
  5. Services can only communicate over the bus. No Point to point communication (why)
  6. Bob build’s a website that does some funky calculations. Bob asks Fred if he thinks embedding the funky calculations in javascript on the client is a good idea?
  7. Mapper prevents the domain layer being coupled to persistence. Qu: what happens when you split
  8. What is wrong with static fields? If a class fun
  9. Because changes to the superclass can affect all subclasses This tends to arise when the superclass is not a clean abstraction. That is to say that it is not doing something common to all its children.