Skip to content

CityShare

This project demonstrates possible decomposition of the vehicle sharing domain into sub-domains. For sake of the DDD principles explanation, contexts are isolated on Java package level, however the real world project can use multi-module approach as part of the Microservices architecture for instance.

Presentation layer

The presentation layer handles interactions with external systems as clients (Web application, Mobile application, another module, or external system) that send input data to the application module (via REST API calls for example).

Application layer

The application layer coordinates any subsequent processing. The application layer, in fact, is where business workflows are launched and monitored. The application layer is responsible for the implementation of the various use cases. It consists of the application services.

Domain Model layer

Includes domain model which consists of classes that contains the definitions of all business entities plus any value objects, aggregates, factories, repositories, services, and whatever else is helpful to provide a representation of the business model.

Infrastructure layer

Consists of concrete technology implementation for persistence, messaging and any other required technology. It can include the technology aware persistence model of the domain entities (If you want to keep the domain model fully agnostic of database concerns, then you should aim at having two distinct models—a domain model and a persistence model).

Dependencies between layers

layers