Mar 28, 2012 03:41 PM|ColinBlair|LINK
To answer the original question, now that SPA is open source along with the rest of MVC I am sure there will be a public location to discuss the design of the DataController. Here is my moment-in-time thinking on the DataController, this is not fully discussed
with anyone other then the two hemispheres of my brain. I am just going to throw this out for comment, feel free to rip it apart.
For repository, I have been pointing people at
http://blogs.msdn.com/b/kylemc/archive/2011/08/18/unit-testing-a-wcf-ria-domainservice-part-1-the-idomainservicefactory.aspx which shows an example of using Repository with the DomainService. It is a great example, however the truth of the matter is that
I would never actually write a DomainService that way. The repository is a useless thing, just an extra layer of abstraction that is repeating what the DomainService is already doing for no good reason other than testability. That isn’t a problem with the
respository, that is a problem with the DomainService. One of the failings of the DomainService is that it was designed for an anemic domain model like the one that Entity Framework Database First generates. I would like to see the DataController grow beyond
that. This includes: