Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of infrastructure & application code in domain-driven design

On the Domain-Driven Design website I see:

Concentrate all the code related to the domain model in one layer and isolate it from the user interface, application, and infrastructure code. The domain objects, free of the responsibility of displaying themselves, storing themselves, managing application tasks, and so forth, can be focused on expressing the domain model. This allows a model to evolve to be rich enough and clear enough to capture essential business knowledge and put it to work.

What "goes in" the infrastructure code? Does this mean supporting frameworks (for logging, for example)?

I presume "application code" means the domain objects (i.e. the domain model)?

like image 338
Ben Aston Avatar asked Jan 20 '10 19:01

Ben Aston


People also ask

What is infrastructure in simple words?

Infrastructure is defined as the basic physical systems of a business, region, or nation and often involves the production of public goods or production processes. Examples of infrastructure include transportation systems, communication networks, sewage, water, and school systems.

What is another word of infrastructure?

OTHER WORDS FOR infrastructure 2 basis, foundation, support.

What is infrastructure and its types?

It is the basic organisational and physical structure that is required to run a business smoothly. In an organization or for a country, a basic infrastructure includes communication and transportation, sewage, water, education system, health system, clean drinking water, and monetary system.


1 Answers

Infrastructure code would be implementations of repositories for instance. You might have in-memory or Hibernate repositories that live in the infrastructure layer, while their interfaces live in the domain layer.

Application code controls the domain objects. It defines services that take user commands and invoke business logic on domain objects, but no business logic lives in that layer.

like image 81
Christophe Herreman Avatar answered Nov 12 '22 23:11

Christophe Herreman