WCF RIA Services organization
I'm fairly new to the world of breaking down software problems using design patterns. The composition and organization of these patterns are, for the most part, understandable. Where I am running into problems however is the breakdown of service level code when using WCF RIA Services.
From all of the examples I have looked at so far, there seems to be only one service class in which all CRUD code placed. For example the Silverlight Patterns 4.0 solution has a the ActionDomainService.cs, which contains all the methods for Customers, Categories and Orders.
In the example above, should Customers, Categories and Orders be placed into their own service classes? And if not, why? and if so, How can we prevent duplication if when, for instance, Orders needs Customer information.
Lastly, I was wondering if anyone has any good examples, ideas or other references of how the service layer should be organized.
My apologies if this has been asked before. Regards,
Chris Nickel, Jan 16, 2011
You're in a right way. Break down the work with each entity in isolated business service.
Never mix work with all entities in one service!
If you need to work with Order from Customer service call OrderService with need method.
Rinat Mergenbaev, Jan 17, 2011