zsharp
zsharp

Reputation: 13766

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?

Upvotes: 7

Views: 6707

Answers (4)

cgreeno
cgreeno

Reputation: 32411

There will be a bunch of learning evolved to answer all those questions.

I would start with the ASP.NET MVC Storefront Starter Kit it uses TDD and not DDD but it is a good place to start. If you really interested in DDD I would suggest reading Eric Evans Book, it is considered the DDD bible by most. Ayende Rahien has also written a book called Building Domain Specific Languages with BOO which may also give some insight into DDD.

Upvotes: 0

terjetyl
terjetyl

Reputation: 9565

In an MVC application all you domain specific logic should go in the M of MVC, your Model.

Upvotes: 1

Chris Conway
Chris Conway

Reputation: 16529

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".

Upvotes: 2

Chad Moran
Chad Moran

Reputation: 12854

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.

Upvotes: 3

Related Questions