简体   繁体   English

WCF RIA和ASP.NET MVC 3

[英]WCF RIA And ASP.NET MVC 3

So I am looking into solutions for developing a Silverlight web app, and right now ASP.NET MVC and WCF RIA have caught my eye. 因此,我正在研究开发Silverlight Web应用程序的解决方案,现在ASP.NET MVC和WCF RIA引起了我的注意。

Should these two be used in conjunction with one another? 这两个应否相互结合使用? Or does the 'MC' in MVC play the role of the RIA services? 还是MVC中的“ MC”扮演RIA服务的角色?

Would it be redundant to use both in the same web application? 在同一个Web应用程序中同时使用这两种方法是否会多余?

Thanks. 谢谢。

WCF RIA Services work great with Silverlight. WCF RIA服务可与Silverlight完美配合。 So you just need to host your SL application somewhere, a static HTML page could work just great. 因此,您只需要在某个地方托管SL应用程序,静态HTML页面就可以很好地工作。 You don't really need ASP.NET MVC. 您实际上并不需要ASP.NET MVC。

Asp.net MVC is basically used for visualized applications. Asp.net MVC基本上用于可视化应用程序。 WCF RIA Services are API oriented and are supposed to be used with Silverlight. WCF RIA服务是面向API的, 应该与Silverlight一起使用。 Or even preferred . 甚至首选

You could of course write an Asp.net MVC application that would return Json results for every request but what would be the point in doing that? 您当然可以编写一个Asp.net MVC应用程序,该应用程序将为每个请求返回Json结果,但是这样做的意义何在? In that case (if you would want to write all the code manually) you'd rather go with a standard WCF service instead. 在这种情况下(如果您想手动编写所有代码),您宁愿使用标准的WCF服务。

WCF RIA Services are the fastest way to getting to your data in developer's perspective. 从开发人员的角度来看,WCF RIA服务是获取数据的最快方法。 Learn and use it. 学习和使用它。 No better way basically. 基本上没有更好的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM