Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC pattern + DDD pattern

In an MVC application, how is DDD implemented. What are the domain objects? If I map entities to custom objects, where does this mapping logic go, in the methods of the repositories or in the service layer?

like image 954
zsharp Avatar asked Mar 09 '09 00:03

zsharp


People also ask

What is the difference between MVC and DDD?

mvc is best which helps you design your backend, frontend and control part independently... ddd is specifically useful for particular domain. and MDD is as the name says useful if you want to design using particular model. each of them affect the system architecture and it's performance...

What is DDD pattern?

DDD patterns help you understand the complexity in the domain. For the domain model for each Bounded Context, you identify and define the entities, value objects, and aggregates that model your domain. You build and refine a domain model that is contained within a boundary that defines your context.

Is DDD an architectural pattern?

Domain-Driven Design is a concept introduced by a programmer Eric Evans in 2004 in his book Domain-Driven Design: Tackling Complexity in Heart of Software. It is an approach for architecting software design by looking at software in top-down approach.

What is DDD example?

An aggregate is a domain-driven design pattern. It's a cluster of domain objects (e.g. entity, value object), treated as one single unit. A car is a good example. It consists of wheels, lights and an engine.


2 Answers

Take a look at S#arpArchitecture. It is a really great way to get started with MVC and DDD at the same time. Domain objects (Models) are stored in different project from the Controllers and presentation. It has a pretty sweet installation and solution template and great documentation.

It makes good use of the repository pattern which is part of the core of DDD. It also employs several modern "best practices".

like image 20
Chris Conway Avatar answered Oct 02 '22 23:10

Chris Conway


There's a great new post series going on over at http://nathan.whiteboard-it.com/archive/2009/03/01/asp.net-mvc-domain-driven-design.aspx that actually is describing from the get go how to go about designing an application with DDD in mind.

like image 111
Chad Moran Avatar answered Oct 02 '22 21:10

Chad Moran