![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Bev Wigney | profile | all galleries >> Galleries >> Wasp, Hornets & Sawflies | tree view | thumbnails | slideshow |
The domain remains completely unaware of the underlying database technology. Implementing Hexagonal Architecture in Java
package ports.inbound; import domain.Order; import java.util.UUID; public interface CreateOrderUseCase UUID createOrder(String product, double price); Use code with caution. The domain remains completely unaware of the underlying
public AuthenticationApplicationService(AuthenticationService authenticationService, UserRepository userRepository) this.authenticationService = authenticationService; this.userRepository = userRepository; this.userRepository = userRepository
┌───────────────────────────────────────────────────────────────┐ │ OUTSIDE WORLD (Adapters) │ │ │ │ ┌───────────────┐ ┌───────────────┐ │ │ │ Web Controller│ ───> │ Inbound Port │ │ │ └───────────────┘ └───────────────┘ │ │ │ │ │ ▼ ▼ │ │ ┌───────────────────────┐ │ │ │ APPLICATION │ │ │ │ CORE │ │ │ │ (Business Logic / │ │ │ │ Domain Models) │ │ │ └───────────────────────┘ │ │ │ │ │ ▼ ▼ │ │ ┌───────────────┐ ┌───────────────┐ │ │ │ Database Impl │ <─── │ Outbound Port │ │ │ └───────────────┘ └───────────────┘ │ └───────────────────────────────────────────────────────────────┘ Pillar 1: The Core (Domain & Application Service) The domain remains completely unaware of the underlying