Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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 "Decouplin...
Source: David Heinemeier Hansson, https://gist.github.com/dhh/4849a20d2ba89b34b201
Based on: Jim Weirich's "Decoupling fro...
Source: David Heinemeier Hansson, https://gist.github.com/dhh/4849a20d2ba89b34b201
Based on: Jim Weirich's "Decoupling fro...
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/20...
Examples
https://github.com/andbed/clean-architecture
http://obvious.retromocha.com/
https://github.com/michelchenrich/cru...
Thank you!
Clean architecture
Clean architecture
Upcoming SlideShare
Loading in …5
×

Clean architecture

8,564 views

Published on

  • Be the first to comment

Clean architecture

  1. 1. Clean architecture Andrzej Bednarz andbedwroc@gmail.com https://github.com/andbed/clean-architecture 05.07.2014
  2. 2. A new project
  3. 3. Self testing software
  4. 4. Clean architecture
  5. 5. Demo • Basic structure • Input/output
  6. 6. Application Core Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html
  7. 7. Controller -> Interactor Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html
  8. 8. Controller <- Interactor Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html
  9. 9. Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html
  10. 10. Traditional layered architecture
  11. 11. Clean architecture
  12. 12. Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html
  13. 13. Hexagonal Architecture
  14. 14. Summary
  15. 15. We are still on the way...
  16. 16. Excellent testability Every component and layer could be tested in isolation
  17. 17. Clearly defined separation of concerns Flexibility
  18. 18. Gradual architecture introduction
  19. 19. Lots of additional classes and interfaces Lots of DTOs and conversions
  20. 20. Cost Source: David Heinemeier Hansson, https://gist.github.com/dhh/4849a20d2ba89b34b201 Based on: Jim Weirich's "Decoupling from Rails"
  21. 21. Source: David Heinemeier Hansson, https://gist.github.com/dhh/4849a20d2ba89b34b201 Based on: Jim Weirich's "Decoupling from Rails"
  22. 22. Source: David Heinemeier Hansson, https://gist.github.com/dhh/4849a20d2ba89b34b201 Based on: Jim Weirich's "Decoupling from Rails"
  23. 23. Not new Not only Java related Not a rocket science Not home-grown
  24. 24. 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
  25. 25. 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
  26. 26. Thank you!

×