SlideShare une entreprise Scribd logo
1  sur  28
Clean architecture
Andrzej Bednarz
andbedwroc@gmail.com
https://github.com/andbed/clean-architecture
05.07.2014
A new project
Self testing software
Clean architecture
Demo
• Basic structure
• Input/output
Application Core
Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html
Controller -> Interactor
Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html
Controller <- Interactor
Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html
Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html
Traditional layered architecture
Clean architecture
Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html
Hexagonal Architecture
Summary
We are still on the way...
Excellent testability
Every component and layer could be tested in isolation
Clearly defined separation of concerns
Flexibility
Gradual architecture introduction
Lots of additional classes and interfaces
Lots of DTOs and conversions
Cost
Source: David Heinemeier Hansson, https://gist.github.com/dhh/4849a20d2ba89b34b201
Based on: Jim Weirich's "Decoupling from Rails"
Source: David Heinemeier Hansson, https://gist.github.com/dhh/4849a20d2ba89b34b201
Based on: Jim Weirich's "Decoupling from Rails"
Source: David Heinemeier Hansson, https://gist.github.com/dhh/4849a20d2ba89b34b201
Based on: Jim Weirich's "Decoupling from Rails"
Not new
Not only Java related
Not a rocket science
Not home-grown
References
http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html
http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html
http://blog.8thlight.com/uncle-bob/2011/09/30/Screaming-
Architecture.html
http://alistair.cockburn.us/Hexagonal+architecture
http://www.growing-object-oriented-software.com/
http://jeffreypalermo.com/blog/the-onion-architecture-part-1/
http://martinfowler.com/articles/is-tdd-dead/
https://groups.google.com/forum/#!forum/clean-code-discussion
http://en.wikipedia.org/wiki/Data,_context_and_interaction
http://andrzejonsoftware.blogspot.com/2013/12/the-four-architectures-that-
will.html
Object Oriented Software Engineering: A Use Case Driven Approach, Ivar
Jacobson, 1992
Examples
https://github.com/andbed/clean-architecture
http://obvious.retromocha.com/
https://github.com/michelchenrich/crudrefactorkata.git
https://github.com/lukasz-duda/ArchitectureSample
http://www.whitewashing.de/2012/08/13/oop_business_applic
ations_entity_boundary_interactor.html
Thank you!

Contenu connexe

Tendances

A Separation of Concerns: Clean Architecture on Android
A Separation of Concerns: Clean Architecture on AndroidA Separation of Concerns: Clean Architecture on Android
A Separation of Concerns: Clean Architecture on Android
Outware Mobile
 
Vertical Slicing Architectures
Vertical Slicing ArchitecturesVertical Slicing Architectures
Vertical Slicing Architectures
Victor Rentea
 

Tendances (20)

Clean architecture
Clean architectureClean architecture
Clean architecture
 
2012 the clean architecture by Uncle bob
2012 the clean architecture by Uncle bob 2012 the clean architecture by Uncle bob
2012 the clean architecture by Uncle bob
 
Clean Architecture Essentials - Stockholm Software Craftsmanship
Clean Architecture Essentials - Stockholm Software CraftsmanshipClean Architecture Essentials - Stockholm Software Craftsmanship
Clean Architecture Essentials - Stockholm Software Craftsmanship
 
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
A Separation of Concerns: Clean Architecture on Android
A Separation of Concerns: Clean Architecture on AndroidA Separation of Concerns: Clean Architecture on Android
A Separation of Concerns: Clean Architecture on Android
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net core
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootUnderstanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring Boot
 
Hexagonal architecture for java applications
Hexagonal architecture for java applicationsHexagonal architecture for java applications
Hexagonal architecture for java applications
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
 
Vertical Slicing Architectures
Vertical Slicing ArchitecturesVertical Slicing Architectures
Vertical Slicing Architectures
 
Gitlab flow solo
Gitlab flow soloGitlab flow solo
Gitlab flow solo
 
ITkonekt 2019 | Robert C. Martin (Uncle Bob), Clean Architecture and Design
ITkonekt 2019 | Robert C. Martin (Uncle Bob), Clean Architecture and DesignITkonekt 2019 | Robert C. Martin (Uncle Bob), Clean Architecture and Design
ITkonekt 2019 | Robert C. Martin (Uncle Bob), Clean Architecture and Design
 
Clean architecture - Protecting the Domain
Clean architecture - Protecting the DomainClean architecture - Protecting the Domain
Clean architecture - Protecting the Domain
 
Playwright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern WebPlaywright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern Web
 
Nestjs MasterClass Slides
Nestjs MasterClass SlidesNestjs MasterClass Slides
Nestjs MasterClass Slides
 
Getting Started With Cypress
Getting Started With CypressGetting Started With Cypress
Getting Started With Cypress
 
Hexagonal architecture: how, why and when
Hexagonal architecture: how, why and whenHexagonal architecture: how, why and when
Hexagonal architecture: how, why and when
 
twMVC#44 讓我們用 k6 來進行壓測吧
twMVC#44 讓我們用 k6 來進行壓測吧twMVC#44 讓我們用 k6 來進行壓測吧
twMVC#44 讓我們用 k6 來進行壓測吧
 
Java Interview Questions and Answers | Spring and Hibernate Interview Questio...
Java Interview Questions and Answers | Spring and Hibernate Interview Questio...Java Interview Questions and Answers | Spring and Hibernate Interview Questio...
Java Interview Questions and Answers | Spring and Hibernate Interview Questio...
 

Similaire à Clean architecture

Using Jenkins with iOS projects
Using Jenkins with iOS projectsUsing Jenkins with iOS projects
Using Jenkins with iOS projects
AppsDojo
 
Introduction to WSO2 Developer Studio
Introduction to WSO2 Developer Studio Introduction to WSO2 Developer Studio
Introduction to WSO2 Developer Studio
WSO2
 

Similaire à Clean architecture (20)

Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
 
An open-source testbed for IoT systems
An open-source testbed for IoT systemsAn open-source testbed for IoT systems
An open-source testbed for IoT systems
 
every-day-automation
every-day-automationevery-day-automation
every-day-automation
 
Clean Architecture By Jason Taylor
Clean Architecture By Jason TaylorClean Architecture By Jason Taylor
Clean Architecture By Jason Taylor
 
From basement to global
From basement to globalFrom basement to global
From basement to global
 
Bitbucket pipelines
Bitbucket pipelinesBitbucket pipelines
Bitbucket pipelines
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?
 
What's new and what's next in Electron & Chromium [2016]
What's new and what's next in Electron & Chromium [2016]What's new and what's next in Electron & Chromium [2016]
What's new and what's next in Electron & Chromium [2016]
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
 
Prepare to defend thyself with Blue/Green
Prepare to defend thyself with Blue/GreenPrepare to defend thyself with Blue/Green
Prepare to defend thyself with Blue/Green
 
All Day DevOps 2016 Fabian - Defending Thyself with Blue Green
All Day DevOps 2016 Fabian - Defending Thyself with Blue GreenAll Day DevOps 2016 Fabian - Defending Thyself with Blue Green
All Day DevOps 2016 Fabian - Defending Thyself with Blue Green
 
Evolving Operational Maturity in a Startup Environment
Evolving Operational Maturity in a Startup EnvironmentEvolving Operational Maturity in a Startup Environment
Evolving Operational Maturity in a Startup Environment
 
Web Components: The Future of Web Development is Here
Web Components: The Future of Web Development is HereWeb Components: The Future of Web Development is Here
Web Components: The Future of Web Development is Here
 
Application of code composer studio in digital signal processing
Application of code composer studio in digital signal processingApplication of code composer studio in digital signal processing
Application of code composer studio in digital signal processing
 
Integration Group - Lithium test strategy
Integration Group - Lithium test strategyIntegration Group - Lithium test strategy
Integration Group - Lithium test strategy
 
Using Jenkins with iOS projects
Using Jenkins with iOS projectsUsing Jenkins with iOS projects
Using Jenkins with iOS projects
 
Laying the Foundation for Ionic Platform Insights on Spark
Laying the Foundation for Ionic Platform Insights on SparkLaying the Foundation for Ionic Platform Insights on Spark
Laying the Foundation for Ionic Platform Insights on Spark
 
Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e...
 Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e... Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e...
Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e...
 
C Programming Compilation Process.pdf
C Programming Compilation Process.pdfC Programming Compilation Process.pdf
C Programming Compilation Process.pdf
 
Introduction to WSO2 Developer Studio
Introduction to WSO2 Developer Studio Introduction to WSO2 Developer Studio
Introduction to WSO2 Developer Studio
 

Dernier

Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Dernier (20)

NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 

Clean architecture