7

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?

1
  • 1
    DDD is not the pattern but a way of thinking. Read Eric Evans book. Commented Mar 9, 2009 at 20:38

4 Answers 4

3

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.

Sign up to request clarification or add additional context in comments.

Comments

2

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

Comments

1

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

Comments

0

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.

3 Comments

What do you mean by TDD vs DDD? They're not opposite things. But maybe I've understood you wrong.
I was just trying to convey that the StoreFront Series will provide a lot of the patterns but is built using TDD for the most part.
I made an edit- I was not trying to compare the 2 ideas other then from a very broad design perspective

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.