WCF RIA Services 6.0 Planning

What is it

The 6 branch is targeted to be released along with Visual Studio v.Next and the Roslyn compiler. The focus of the 6 branch will be on integrating Roslyn into WCF RIA Services where it makes sense. For example, Roslyn will enable client side POCO object to be used as entities instead of the current code generated entities which inherit from Entity. Since this branch is pretty far in the future, I am going to include items on this page that would be moved to the experimental branch for the other two branches.

Features

Support client side POCO objects

All of the reasons why people want POCO objects on the server also applies to the client, however until Roslyn support client side POCO objects just isn't going to work very well. That will change with Roslyn.

Populating DomainService CRUD with Roslyn (Experimental)

Imagine this. In Visual Studio you create a new class.

public MyDomainService : DbDomainService<MyContext>
{
    protected override OnSetupDomainService //Note: This doesn't actually exist
     {
        this.Crud.Add<Entity1>();
        this.Crud.Add<Entity2>();
        this.Crud.Add<Entity3>();
    }
}

What we are looking at is a possible design for adding automatic CRUD generation to the DomainService. This would be useful when first getting an application setup but you wouldn't want to go to production this way. So, using Roslyn, we would write a Code Issue that would find these, generate a warning at compilation, and then put a squiggly line under each line. Here is the really interesting bit though, if you right click on the squiggly then using Roslyn we can automate the deletion of the autogenerate line and add the real CRUD code into the DomainService. Considering that you could have a this.Crud.AddAll() that generates CRUD for the entire DbContext I think something like this would be a good way to create DomainServices while getting rid of the current Domain Service Wizard which over time has turned out to be very brittle.

blog comments powered by Disqus

Month List