Clean architecture
-
Upload
andbed -
Category
Engineering
-
view
497 -
download
12
description
Transcript of Clean architecture
Clean architectureAndrzej Bednarz
[email protected]://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/4849a20d2ba89b34b201Based on: Jim Weirich's "Decoupling from Rails"
Source: David Heinemeier Hansson, https://gist.github.com/dhh/4849a20d2ba89b34b201Based on: Jim Weirich's "Decoupling from Rails"
Source: David Heinemeier Hansson, https://gist.github.com/dhh/4849a20d2ba89b34b201Based on: Jim Weirich's "Decoupling from Rails"
Not new
Not only Java related
Not a rocket science
Not home-grown
Referenceshttp://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.htmlhttp://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.htmlhttp://blog.8thlight.com/uncle-bob/2011/09/30/Screaming-Architecture.htmlhttp://alistair.cockburn.us/Hexagonal+architecturehttp://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-discussionhttp://en.wikipedia.org/wiki/Data,_context_and_interactionhttp://andrzejonsoftware.blogspot.com/2013/12/the-four-architectures-that-will.htmlObject Oriented Software Engineering: A Use Case Driven Approach, Ivar Jacobson, 1992
Examples
https://github.com/andbed/clean-architecturehttp://obvious.retromocha.com/https://github.com/michelchenrich/crudrefactorkata.githttps://github.com/lukasz-duda/ArchitectureSamplehttp://www.whitewashing.de/2012/08/13/oop_business_applications_entity_boundary_interactor.html
Thank you!