DEV Community

Discussion on: Hexagonal Architecture and Clean Architecture (with examples)

Collapse
 
amirensit profile image
choubani amir

Nice blog, but I have some questions:
1- I think application layer come after infrastructure layer, not the inverse as you mentioned, Am I wrong ?

2- controllers and ui interfaces ect should only use use case implementations, which in their turn should use adapters implementations, Am I wrong ?

Collapse
 
boscodomingo profile image
Bosco Domingo
  1. Domain > Application > Infrastructure. He said it right. Infrastructure is what we want to be the most abstracted from (think DB, other APIs, etc).

  2. You're correct, you should be working directly with the implementations in the infrastructure layer, as the abstractions (ports) in the Domain and Application layers have to be implemented somewhere (adapters)