What is meant by "Domain Services"?

iti picture iti · Apr 26, 2011 · Viewed 9.6k times · Source

I am unable to get clear picture of Domain Services when studying about WCF RIA services.

Can anyone explain to me what the role of domain services is?

Answer

razlebe picture razlebe · Apr 27, 2011

Quoting MSDN:

Domain services are Windows Communication Foundation (WCF) services that encapsulate the business logic of a WCF RIA Services application. A domain service exposes a set of related operations in the form of a service layer. When you define a domain service, you specify the data operations that are permitted through the domain service.

When designing a domain service, you should think of the domain service as a set of related tasks that you expect users to perform in your application. Typically, such tasks involve a small group of closely-related entities. For example, in an expense reporting application, you might expose entities for expense reports, line items, and details. You might, then, place entities for accounts and payments in a separate domain service.

This related SO question may also be of some use.