WCF RIA Services Experimental

What is it

These are ideas I have that I want to work on but may not turn out to be a good idea.

Features

DomainController

One thing I am considering is moving WCF RIA Services away from WCF and over to Web API with a new server side class I am calling the DomainController. Many of the ideas that were used to create the Web API were pioneered within WCF RIA Services, so it only seems natural to turn around and return the favor. The result would be similar to the Web API DataController that was created for SPA but it would be have the same behavior as the DomainService. For example, the DomainController would still require IncludeAttribute and the data transfer format would not send duplicate objects across the wire. I will not know until I do some proof of concept testing if the DomainController will be in the 5 branch, the 6 branch, or simply abandoned as a bad idea. 

Automatic DomainService CRUD generation

It is possible to have a DbDomainService or LinqToEntitiesDomainService automatically generate CRUD methods for all entities at compile time and run time. This isn't a practice I would encourage, you really should be writing your own CRUD methods and take business rules into account, but as an option it is probably a good one.

Composable Queries

What if you had a DomainService that had methods like this:

public IQueryable<Foo> GetFoos()
{
    return Context.Foos;
}
public IQueryable<FooPM> GetFooPMs(IQueryable<Foo> fooQuery)
{
    return fooQuery.Select(f => new fooPM() {...});
}
And then on your client you did something like this:
Context.Load(Context.GetFooPMsQuery(Context.GetFoosQuery().Where(f=>f.Something == Something));

 

I think something like that should be possible, and it would certainly solve a lot of problems.

Transaction support from client

I have some ideas here on how to package multiple SaveChanges calls from multiple DomainContexs.

Modular DomainService

There are many situations where it would be useful to share CRUD logic between DomainServices. I want to explore the idea of creating classes when contain the logic for a single Entity and then shared by multiple DomainServices.

blog comments powered by Disqus

Month List