Domain-Driven Design Library

October 21, 2019 ยท View on GitHub

This library is a collection of interfaces and abstract classes to express domain-driven design concepts in Java code. Most types in this library are pure marker interfaces and only for documentation purposes. An added benefit is that IDEs can show all implementations of an interface, thus making it easy to discover all implementations of for example Value Objects or Entities.

Pattern representations

Pattern (or Variant)Implementation in this libraryExample in Lakeside Mutual
Layered Architecturen/aTop-level packages in Lakeside Mutual backend represents the layers suggested by E. Evans in the "light blue" book
Modulen/aJava sub-packages in Domain Layer of Lakeside Mutual backends
EntityEntityCustomerProfileEntity
Value ObjectValueObjectPolicyPeriod
ServiceServiceSee layer-specific variants below:
Application ServiceApplicationServiceCustomerService
Domain ServiceDomainServiceInteractionLogService
Infrastructure ServiceInfrastructureServiceCustomerCoreService
RepositoryRepositoryCustomerRepository
FactoryFactory CustomerFactory
AggregateAggregateCustomerAggregateRoot
Bounded ContextBoundedContextCustomerCoreApplication
Context Mapn/an/a
Subdomain patternsn/an/a

More Information

This website collects pointers to DDD resources, for instance:

DDD Example(s)

This DDD library was developed for the Lakeside Mutual sample application.

The DDD Sample Application that implements the running example in Eric Evans' Domain-Driven Design is also available on GitHub. It deals with cargo booking, routing and tracking.

The agile project management sample accompanying Implementing Domain-Driven Design by Vaughn Vernon can be found on GitHub as well.