Saved searches

Use saved searches to filter your results more quickly

Cancel Create saved search Sign up Reseting focus

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Domain Driven Design. Examples focuses on key concept of ddd like Entities, Aggregate root, Repository, Value Objects & ACL.

Notifications You must be signed in to change notification settings

ketan-gote/ddd-example

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Go to file

Folders and files

Last commit message Last commit date

Latest commit

History

View all files

Repository files navigation

Domain Driven Design

DDD

Entities

Entities are objects in the domain model that have a unique identity that does not change throughout the state changes of the software. Entities encapsulate both state and behavior. An example of entity could be a Order object that represents and maintains state about a specific order, and implements different operations (add items, add shipping address, add payment details etc) that can be carried out on that order.

Aggregates

A cluster of associated objects that are treated as a unit for the purpose of data changes. External references are restricted to one member of the AGGREGATE, designated as the root. A set of consistency rules applies within the AGGREGATE’S boundaries.

Repository

Repositories are responsible for retrieving and storing aggregate roots, typically using an Object/Relational Mapping (O/RM) framework.

Value objects

Value objects are objects in the domain model that are used to describe certain aspects of a domain. They do not have a unique identity and are immutable. An example of value object could be a Order Monetory Value.

Properties of value objects:

ACL(Anti Corruption Layer)

Implement a façade or adapter layer between different subsystems that don't share the same semantics. This layer translates requests that one subsystem makes to the other subsystem. Use this pattern to ensure that an application's design is not limited by dependencies on outside subsystems.

Issues and considerations

Order Example focus on some of the key aspects of DDD such as. Aggregate, Entities, Value Object, Repository

License

Licensed under the Apache 2.0 License.