Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the relationship between DDD and the “Onion Architecture”?

What is the relationship between Domain-driven design (DDD) and "The Onion Architecture" of Jeffrey Palermo?

like image 601
ulrichb Avatar asked Aug 03 '10 18:08

ulrichb


People also ask

What is infrastructure layer in onion architecture?

The Infrastructure Layer is the outermost layer of the Onion Architecture. It's responsible for implementing all the IO operations that are required for the software. This layer is also allowed to know about everything contained in the inner layers, being able to import entities from the Application and Domain layers.

What is the difference between clean architecture and onion architecture?

Clean Architecture was introduced by Robert “Uncle Bob” Martin in 2012 in this post. It builds on the concepts of Onion Architecture but with somewhat different details of the layers. Instead of “Domain Model”, it refers to the core as “Entities”, but still representing enterprise-wide business rules.

Is DDD layered architecture?

Domain-Driven Design - Layered Architecture.

What are the key concepts of DDD?

Domain-Driven Design(DDD) is a collection of principles and patterns that help developers craft elegant object systems. Properly applied it can lead to software abstractions called domain models. These models encapsulate complex business logic, closing the gap between business reality and code.


1 Answers

If you look at the image that describes the onion architecture in the link you provided, the Domain Model layer is what DDD focuses on.

Onion is an architectural pattern for a system, whereas DDD is a way to design a subset of the objects in the system. The two can exist without eachother, so neither is a subset of the other. If you were to use them together - then as a whole the part that is designed using DDD would be a subset of the entire system.

To use a (probably bad) analogy: Onion is a pattern to design a house, and DDD is a way to mill the wood that is a part of the house.

like image 55
Steven Evers Avatar answered Sep 21 '22 00:09

Steven Evers