Alex Burtsev
Alex Burtsev

Reputation: 12678

Where should Model reside in case of 3-tier Domain Driven designed application?

In a typical business oriented thin client application (in my case Silverlight) where should Domain Model reside on server side or client side or both in respect to Domain Driven Design. Should I operate with my Domain Entities or DTO's on client side?

What if my application supports "server-less" mode, when it doesn't communicate with server except for downloading application. Currently my server-less mode is transparent to application, I'm still using same service interfaces but provide local implementation of them.

Upvotes: 3

Views: 298

Answers (2)

Alexandre Roba
Alexandre Roba

Reputation: 107

Well they can stay in both places. You could have:

1) Rich fat client with a full domain and having repository accessing the back end through ODATA or something. 2) Thin client making access to the server through command and DTO and only implementing couple of validation 3) and a mix of both.

There is no single response, unfortunately, one project is not the other. It is a question of context.

If you provided more information we could try to help you choose.

Upvotes: 2

Svarog
Svarog

Reputation: 2218

You should create your model in a separate Assembly, and reference it from both Client and Server.
This way you will be able to access the model from both parts of your program easily, while separating it from your graphic and business logic.

Upvotes: 0

Related Questions