RIA Vs. Services WCF and common code

We are starting development of a new Silverlight LOB application in which DataAccess will not be based on EF, but not on our own DAL code (for legacy and other non-related reasons).

We are currently discussing whether to use RIA services or simple WCF services as a layer of the Silverlight facade.

Options:

RIA Services and Generated Code: RIA Services will automatically create proxy classes for our domain model and DomainServices in our Silverlight project.
This will mean that our services will have to inherit from the DomainService class and require a lot of work and workarounds so that our normal model is serialized in normal mode (since we do not use EF)

WCF and shared libraries:. We will create a DomainModel library that will be shared by both Silverlight and our server code ( as suggested here ), giving us more control over how our domain classes look and how they are visible in Silverlight, and our services will remain clean. since WCF does not require us to use any base class and gives us much more authority as to how our services are exposed.

So the question is that we are not using EF, what is pro for RIA services, and what are the benefits of using WCF and a common domain?

+4
source share
1 answer

I have a reasonable real experience with both technologies.

The main pros and cons in my perspective:

RIA Services

  • Pro: Development is (much) faster, even without using an entity. You can create ViewModels, possibly match them using AutoMapper and specify the attributes needed to validate / enter data / relationships. This is good practice even when using the framework entity.
  • Con: A lot of overhead.
  • Con: Performance degrades when sending large amounts of data (something like> 100 objects).

WCF and shared libraries

  • Pro: performance is relatively excellent
  • Con: development time / maintainability is not as good as RIA services.
  • Con: It is not possible to use data binding also without a DomainDataSource (even when using MVVM).

Update For the data-binding part: RIA Services enables DomainDataSource management in Silverlight. This allows you to easily (asynchronously) load with binding properties for your state (Busy, etc.), which simplifies loading animations and general improvements in the user interface. Of course, this can be done without this control, but it helps.

For the performance of RIA services, I can’t find an example (someone here said that they lost several months of rebuilding domain services for regular WCF services due to response times that could not be completed).

One more note about Silverlight (Business Application): try increasing the browser scale to 110% or 90%, some arbitrary percentage. Fonts / components will be blurred due to the way the rendering works. I confirmed this on several machines / configurations and did not find a fix / work for this. Snap to the device’s pixels does not help at all.

Also, before you make a decision, it might be wise to also consider MVC3 with JQuery and HTML5 as an option for your solution. The HTML layout system may not be as good as Silverlight, but there are benefits such as support for cross-platform and mobile support.

+3
source

All Articles