RIA Services Vs. WCF and Shared Code

别等时光非礼了梦想. 提交于 2019-12-05 16:28:18

I have reasonable real-life experience with both technologies.

The main pros and cons in my perspective:

RIA Services

  • Pro: Development is (much) faster, even without using entity framework. You can create ViewModels, maybe mapping them with AutoMapper, and specify the attributes needed for validation / data entry / relationships. This is good practice even when using entity framework.
  • Con: A lot of overhead.
  • Con: Performance degrades when sending larger 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: Cannot use databinding as well without DomainDataSource (even when using MVVM).

Update For the data-binding part: RIA Services allows for the DomainDataSource control in Silverlight. This enables easy (async) loading with bindable properties for its state (Busy etc.) which makes it easy to do loading animations and general improvements on user experience. This can of course be done without this control, but it helps.

For the RIA services performance, I cannot seem to find the example (someone here said they lost a few months of development time rewriting domain services to conventional WCF services because of the response time that could not be met).

One more note about a Silverlight (Business Application): try zooming your browser in to 110% or 90%, some arbitrary percentage. The fonts / components will get blurred because of way the rendering works. I have confirmed this on multiple machines/configurations and have not found a fix / work around for this. Snapping to device pixels does not help here at all.

Also before you make a decision, it's probably smart to also consider MVC3, with JQuery and HTML5 as an option for your solution. The HTML layout system might not be as good as Silverlight, but there are advantages like cross platform and mobile support.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!