Code maverick ...
Monday, July 8, 2013
Hexagonal architecture comparing to layered one
People often asked about the main differences between hexagonal architecture and layered architecture. They are close to each other, but the hexagonal architecture puts Domain in its heart. The domain in the hexagonal architecture should not contain any dependencies to any other layer of application. Persistence is managed by outer "infrastructure" layer with "adapters" and some of adapters could implement interfaces defined by domain layer. Those adapters could be represented as implementations of Repository and/or UnitOfWork patterns for conventional application. So the implementation of those interfaces can be easily injected into Domain (for example injected into domain service or entity) from the Application Service layer.
Subscribe to:
Posts (Atom)