views:

14

answers:

1

I am working on a project that is going to be using RIA services. The visual studio solution file has 2 projects, one for the UI and the other for the domain logic. The initial approach was to have multiple domain service classes inside of the domain logic project (to keep it organized). After receiving a certain compile error I came across this issue with RIA.

http://forums.silverlight.net/forums/p/111058/257398.aspx

So my question is, if I have to use one service file it is going to have thousands of stubs and queries because of the magnitude of the database/project, how would I go about organizing this. An even better question would be, Is there a workaround to the problem listed in that forums post I linked.

Thanks in advance for the responses.

A: 

We ran into a similar situation. Although the design still smells a bit because the DomainService class has a lot of methods, we were able to organize a bit.

Choose a way to divide up the responsibilities of the DomainService class. We chose to do this by Entity, but it could be along some other line. You can create a separate file for each responsibility, although each file contains a partial class implementation of your DomainService. Our naming convention for each file was DomainService.Entity.cs

Another thing we did was create a separate DomainService for some cross-cutting concerns. We have one for logging messages from the Silverlight client back to the server, and one for authentication only.

Adam Roderick