From the course: Software Architecture: Patterns for Developers

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Onion

Onion

- [Instructor] In this video, we'll take a look at the onion architecture and the difference with the layered architecture. In an onion architecture, you start with your domain model. This contains the classes with their properties and business logic. Around that we have domain services. These are interfaces the domain needs, but doesn't implement. Usually they're infrastructural concerns like data storage. Going further, we find the application services. These are the services containing business logic that spans over multiple domain models or domain services. They're invoked by either the user interface or automated tests. And finally, we have a layer providing the implementation of the domain services called the infrastructure layer. As you can see, we end up with the diagram that somewhat looks like the layers of an onion. Hence the name. Each outer layer knows about the inside layers. This means that our application core is ignorant of any infrastructure or user interface…

Contents