Skip to content

vikrambindal/hexagonal-architecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Hexagonal architecture implementation following clea architecture principles

  • The project is a typical ecommerce order-product application
  • Application architecture can be seen below:

Hexagonal Architecture

  • Modules:
    • rest-adapter:
      • Spring based REST controllers that expose API to perform e-commerce related operations
    • persistence-adapter:
      • Spring based JPA entities that govern persistence model and repositories to interact with database
    • service:
      • Mediator between adapters and domain exposing ports to various adapters and internally interacting with domain layer
    • domain:
      • Vanilla Java that contains core entity business logic
    • application:
      • Glue that configures all the service dependencies together
  • Design Decisions:
    • One-Way model mapping strategy has been followed where:
      • Adapters have their own model
      • Ports and Domain share the same model:
        • Adapting two-way approach leads to convoluted objects
        • Further, increases maintenance of the application
        • In a large scale system, can become complex very quickly to manage state of various objects

Usage (In progress)

About

Hexagonal architecture demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages