SlideShare a Scribd company logo
Top Legacy Sins
Eberhard Wolff
Fellow
@ewolff
http://microservices-buch.de/ http://microservices-book.com/
What should a
Software Architect do?
Create a Proper
Architecture.
Create a Proper
Architecture.
Agree??
I’m a Software
Architect.
But I’m not doing
architecture. !
How important is
Software
Architecture?
Why would we care
about Software
Architecture?
Software
Architecture
=Structure
Architecture Goals:
Quality
> All kinds of quality
> Performance
> Security
> …
> Focus of this presentation: Changeability
> Architects must understand customers & priority
Architects must
understand customer
Software Architecture
Set of
structures
comprise
software elements,
relations among them, and
properties of both.
Why?
> Can work on modules in isolation
> Can work on collaboration of modules
> Fits in my head
Dan North
Does He Care?
Why?
Great
Architecture
Software
Easy to change
High
productivity
Low
Cost
He Cares
€
Why?
Great
Architecture
Software
Easy to change
High
productivity
Low
Cost
What He Cares About
Great
Architecture
Software
Easy to change
High
productivity
Low
Cost
Is architecture the
only factor for
changeability?
What is the best thing
we can have in a
legacy code?
Great architecture
or
automated tests?
No Automated Tests
> No way to find bugs
> Changes almost impossible
> Legacy code = code without tests
> Michael Feathers
Working Effectively with Legacy Code
Let’s add some
automated UI tests
Automated UI Tests
> Easy to implement
> Exactly what testers do manually
> Easy to understand for customers
> Test business processes
> Safety net
Unit Tests
or automated UI
tests?
Many UI Tests Worse
> Fragile: Changes to UI break test
> Business meaning of tests easily lost
> Takes long
> Often not reproducible
Automated
UI Tests
Automated
Integration
Tests
Unit
Tests
Manual Tests
Automated
UI Tests
Automated
Integration
Tests
Unit
Tests
Manual Tests
Slow
Unreliable
Expensive
Alternatives to
automated UI tests?
Textueller
Akzeptanztest
Szenario
> Möglicher Ablauf in einer Story
> Standardisierte Bestandteile:
> Gegeben... (Kontext)
> Wenn... (Ereignis)
> Dann... (erwartetes Ergebnis)
Szenario: Beispiel
Szenario: Kunde registriert sich erfolgreich
Kontext
Ereignis
Erwartetes
Ergebnis
Erwartetes
Ergebnis
Gegeben ein neuer Kunde mit EMail
eberhard.wolff@gmail.com Vorname Eberhard Name
Wolff
Wenn der Kunde sich registriert
Dann sollte ein Kunde mit der EMail
eberhard.wolff@gmail.com existieren
Und es sollte kein Fehler gemeldet werden
RegistrationService registrationService;
// Initialisierung RegistrationService
// ausgelassen
private User kunde;
private boolean fehler = false;
@Given("ein neuer Kunde mit "+
"EMail $email Vorname $vorname"+
" Name $name")
public void gegebenKunde(String email,
String vorname, String name) {
kunde = new User(vorname, name,
email);
}
@When("der Kunde sich registriert")
public void registerKunde() {
try {
registrationService.register(kunde);
} catch (IllegalArgumentException ex) {
fehler = true;
}
}
@Then("sollte ein Kunde mit der EMail $email existieren")
public void existiert(String email) {
assertNotNull(registrationService.getByEMail(email));
}
@Then("es sollte kein Fehler gemeldet werden")
public void keinFehler() {
assertFalse(fehler);
} }
Test is about handling
risk
Tests for Risks
> Algorithm / calculation wrong:
Unit test
> System failures:
Unit tests
> Wiring / collaboration:
Integration tests
> Business process:
Integration test
> UI: UI test
Example: User
Registration
> Unit test
Validations
Database failure
> Integration test
Process
> UI test
Everything shown?
Not Tested
> UI won’t test validation
> …or algorithms
> …or the process
> Risks handled elsewhere
Automated
UI Tests
Automated
Integration
Tests
Unit
Tests
Manual Tests
Automated
UI Tests.
Automated
Integration
Tests
Unit
Tests
Manual
Tests
Test Pyramid
Test Pyramid instead
of Automated UI Tests
Great architecture
or fast & easy
deployment?
Deployment
> Manual deployment is error prone
> Slow deployment
> Lots of code developed but not deployed
> i.e. more lean waste
> Slow feedback
> Slow time to recovery
Leseprobe:
http://bit.ly/CD-Buch
Continuous Delivery:
Build Pipeline
Commit
Stage
Automated
Acceptance
Testing
Automated
Capacity
Testing
Manual
Explorative
Testing
Release
Continuous Delivery
> Testing
> + automated deployment
> Testing: reduce probability of errors
> Automated deployment: better mean time
to repair
Continuous Delivery
> Make software easier to change
> & deploy
> Reliable and reproducible tests
> Automated deployed
> Fast & reliable
What is a great
architecture?
UI
Logic
Database
Is Three Tier a great
architecture?
Three Tier
> Actually layer: no distribution
> By technology
> Layers can be replaced
> Layers can be developed independently
Do you replace e.g.
the persistence layer?
Is it really simple to
add e.g. mobile
clients?
A better reason:
Fits in my head.
Redo the
order
processing!
Add feature
to the
registration!
Can we
change the
persistence
technology
instead?
Please?
What is a
persistence
technology??
Registration Order Billing
UI
Logic
Architecture
> Should support changes
> …with business value
> Needs to model the domain
> Hard to get right
> Architect needs to understand the domain
Is a great architecture
free of cyclic
dependencies?
A B
A depends on B
Changes to B influence A
A B
A depends on B
Changes to B influence A
B depends on A
Changes to A influence B
In fact one component
Should be two components
Is a great architecture
free of cyclic
dependencies?
Cyclic dependencies:
Architects’ Mortal Sin
A B
A B
42
2
200
Other Architecture
Metrics
> High cohesion
> Elements of a module should belong
together
> Low coupling
> Modules should not depend on each other
Great Architecture
> Don’t overrate cyclic dependencies!
> Consider other metrics
> Architecture by domain
The worst legacy
problems?
The project has
a lot of cyclic
dependencies!
I know.
…but that doesn’t
cause a lot of trouble
Architects must
understand customer
& his quality demands
Quality
> Changeability
> Performance
> Security
> …
No two projects are
alike.
No general rules.
Sorry!
Software
Easy to change
Automated
tests
Test
pyramid
Fast & easy
deployment
Great
Architecture
No cyclic
dependencies
Low
coupling
High
cohesion
What should a
Software Architect do?
Create a Proper
Architecture.
Create a Proper
Architecture.
I’m a Software
Architect.
But I’m not doing
architecture.
There is more
to changeable
software than
architecture.
Thank You!
@ewolff

More Related Content

PDF
Infrastructure for Continuous Delivery & Microservices: PaaS or Docker?
PDF
Deployment - Done Right!
PDF
Software Architecture for Innovation
PDF
Architectures and Alternatives
PDF
Four Times Microservices - REST, Kubernetes, UI Integration, Async
PDF
Data Architecturen Not Just for Microservices
PDF
Continuous Delivery, DevOps, Cloud - New Requirements for New Architectures
PDF
Beyond Microservices
Infrastructure for Continuous Delivery & Microservices: PaaS or Docker?
Deployment - Done Right!
Software Architecture for Innovation
Architectures and Alternatives
Four Times Microservices - REST, Kubernetes, UI Integration, Async
Data Architecturen Not Just for Microservices
Continuous Delivery, DevOps, Cloud - New Requirements for New Architectures
Beyond Microservices

What's hot (20)

PDF
Microservices: Redundancy=Maintainability
PDF
Five (easy?) Steps Towards Continuous Delivery
PDF
Microservices Technology Stack
PDF
The Frontiers of Continuous Delivery
PDF
How to Split Your System into Microservices
PDF
Microservices: Architecture for Agile Software Development
PPTX
Building microservices sample application
PPTX
Architecting Microservices in .Net
PDF
SCUGBE_Lowlands_Unite_2017_Servicing your new Windows workplace like a boss.
PPTX
The Microservices world in. NET Core and. NET framework
PPTX
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
PPTX
Microservices architecture
PPTX
Microservices with .Net - NDC Sydney, 2016
PDF
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
PPTX
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
PDF
#JaxLondon keynote: Developing applications with a microservice architecture
PPTX
Tokyo azure meetup #12 service fabric internals
PPTX
DOs and DONTs on the way to 10M users
PPTX
Scaling wix to over 50 m users
PDF
Docker 101
Microservices: Redundancy=Maintainability
Five (easy?) Steps Towards Continuous Delivery
Microservices Technology Stack
The Frontiers of Continuous Delivery
How to Split Your System into Microservices
Microservices: Architecture for Agile Software Development
Building microservices sample application
Architecting Microservices in .Net
SCUGBE_Lowlands_Unite_2017_Servicing your new Windows workplace like a boss.
The Microservices world in. NET Core and. NET framework
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
Microservices architecture
Microservices with .Net - NDC Sydney, 2016
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
DDD Sydney 2011 - Getting out of Sync with IIS and Riding a Comet
#JaxLondon keynote: Developing applications with a microservice architecture
Tokyo azure meetup #12 service fabric internals
DOs and DONTs on the way to 10M users
Scaling wix to over 50 m users
Docker 101
Ad

Similar to Top Legacy Sins (20)

PDF
Legacy Sins
PDF
Brilliant Software Architecture or How to Build Good Software
PDF
Programming practises and project management for professionnal software devel...
PDF
Programming practises and project management for professionnal software devel...
PDF
What a Good Software Architect Does
PPT
Boek Presentatie
PDF
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
PDF
An outline of my c
PDF
Mainframes agile2012
PPTX
Software Quality via Unit Testing
PDF
Key points of good software programming
ODP
Dealing With Legacy: The Real-World Experience
PDF
Picking the right architecture and sticking to it
PDF
Software Architecture and Architectors: useless VS valuable
PDF
DS_Upsourcing
ODP
Path dependent-development (PyCon India)
PPTX
Reusability-Oriented Software Engineering
PPT
Evolutionary Architecture And Design
PPTX
The art of architecture
PDF
Deep Dive into the Idea of Software Architecture
Legacy Sins
Brilliant Software Architecture or How to Build Good Software
Programming practises and project management for professionnal software devel...
Programming practises and project management for professionnal software devel...
What a Good Software Architect Does
Boek Presentatie
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
An outline of my c
Mainframes agile2012
Software Quality via Unit Testing
Key points of good software programming
Dealing With Legacy: The Real-World Experience
Picking the right architecture and sticking to it
Software Architecture and Architectors: useless VS valuable
DS_Upsourcing
Path dependent-development (PyCon India)
Reusability-Oriented Software Engineering
Evolutionary Architecture And Design
The art of architecture
Deep Dive into the Idea of Software Architecture
Ad

More from Eberhard Wolff (15)

PDF
Microservices - not just with Java
PDF
Data Architecture not Just for Microservices
PDF
Microservices and Self-contained System to Scale Agile
PDF
How Small Can Java Microservices Be?
PDF
Self-contained Systems: A Different Approach to Microservices
PDF
Nanoservices and Microservices with Java
PDF
Microservices: Architecture to Support Agile
PDF
Microservices: Architecture to scale Agile
PDF
Microservices, DevOps, Continuous Delivery – More Than Three Buzzwords
PDF
REST vs. Messaging For Microservices
PDF
Microservices with Java, Spring Boot and Spring Cloud
PDF
Microservice - All is Small, All is Well?
PDF
Microservice With Spring Boot and Spring Cloud
PDF
NoSQL Riak MongoDB Elasticsearch - All The Same?
PDF
Micro Service – The New Architecture Paradigm
Microservices - not just with Java
Data Architecture not Just for Microservices
Microservices and Self-contained System to Scale Agile
How Small Can Java Microservices Be?
Self-contained Systems: A Different Approach to Microservices
Nanoservices and Microservices with Java
Microservices: Architecture to Support Agile
Microservices: Architecture to scale Agile
Microservices, DevOps, Continuous Delivery – More Than Three Buzzwords
REST vs. Messaging For Microservices
Microservices with Java, Spring Boot and Spring Cloud
Microservice - All is Small, All is Well?
Microservice With Spring Boot and Spring Cloud
NoSQL Riak MongoDB Elasticsearch - All The Same?
Micro Service – The New Architecture Paradigm

Recently uploaded (20)

PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
ai tools demonstartion for schools and inter college
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
top salesforce developer skills in 2025.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Introduction to Artificial Intelligence
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Understanding Forklifts - TECH EHS Solution
Odoo Companies in India – Driving Business Transformation.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
CHAPTER 2 - PM Management and IT Context
Design an Analysis of Algorithms II-SECS-1021-03
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
ManageIQ - Sprint 268 Review - Slide Deck
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Softaken Excel to vCard Converter Software.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
ai tools demonstartion for schools and inter college
How to Migrate SBCGlobal Email to Yahoo Easily
top salesforce developer skills in 2025.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
How Creative Agencies Leverage Project Management Software.pdf
Odoo POS Development Services by CandidRoot Solutions
Introduction to Artificial Intelligence
Design an Analysis of Algorithms I-SECS-1021-03
Understanding Forklifts - TECH EHS Solution

Top Legacy Sins