mp911de / CleanArchitecture

CleanArchitecture Example
228 stars 68 forks source link

This project is not a example of clean architecture #4

Closed urbandroid closed 7 years ago

urbandroid commented 7 years ago

module-dependency-diagram

As you can see dependency graph is not web -> contracts(application services) -> use cases (domain services) -> application-model(domain-model)

https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html

Either interface adapters missing or misplaced depending on your perspective.

mp911de commented 7 years ago

The linked 8thlight diagram explains the structural dependencies. The image from above shows runtime dependencies. Contracts (interfaces) must not depend on their implementation, otherwise, something went wrong. On the other side, web packages the application hence the runtime module must depend (inclusive transitive dependencies) on all application modules. The runtime module is also in charge of wiring all dependencies. Both aspects aren't covered by the blog post but require a manifestation in some place which is done in this case by the web application.

urbandroid commented 7 years ago

Ok. Can you map existing structure to clean architecture layers?

mp911de commented 7 years ago

That's already done in the readme.