Clean architecture

28
Clean architecture Andrzej Bednarz [email protected] https:// github.com/andbed/clean-architecture 05.07.2014

description

 

Transcript of Clean architecture

Page 1: Clean architecture

Clean architectureAndrzej Bednarz

[email protected]://github.com/andbed/clean-architecture

05.07.2014

Page 2: Clean architecture
Page 3: Clean architecture

A new project

Page 4: Clean architecture

Self testing software

Page 5: Clean architecture

Clean architecture

Page 6: Clean architecture

Demo• Basic structure• Input/output

Page 7: Clean architecture
Page 8: Clean architecture

Application Core

Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html

Page 9: Clean architecture

Controller -> Interactor

Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html

Page 10: Clean architecture

Controller <- Interactor

Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html

Page 11: Clean architecture

Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html

Page 12: Clean architecture

Traditional layered architecture

Page 13: Clean architecture

Clean architecture

Page 14: Clean architecture

Source: Uncle Bob, http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html

Page 15: Clean architecture

Hexagonal Architecture

Page 16: Clean architecture

Summary

Page 17: Clean architecture

We are still on the way...

Page 18: Clean architecture

Excellent testability

Every component and layer could be tested in isolation

Page 19: Clean architecture

Clearly defined separation of concerns

Flexibility

Page 20: Clean architecture

Gradual architecture introduction

Page 21: Clean architecture

Lots of additional classes and interfaces

Lots of DTOs and conversions

Page 22: Clean architecture

Cost

Source: David Heinemeier Hansson, https://gist.github.com/dhh/4849a20d2ba89b34b201Based on: Jim Weirich's "Decoupling from Rails"

Page 23: Clean architecture

Source: David Heinemeier Hansson, https://gist.github.com/dhh/4849a20d2ba89b34b201Based on: Jim Weirich's "Decoupling from Rails"

Page 24: Clean architecture

Source: David Heinemeier Hansson, https://gist.github.com/dhh/4849a20d2ba89b34b201Based on: Jim Weirich's "Decoupling from Rails"

Page 25: Clean architecture

Not new

Not only Java related

Not a rocket science

Not home-grown

Page 26: Clean architecture

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

Page 28: Clean architecture

Thank you!