RESTful服务:WCF与ASP.NET MVC [英] RESTful services: WCF versus ASP.NET MVC

查看:224
本文介绍了RESTful服务:WCF与ASP.NET MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实施RESTful服务一个非常常见的做法是利用ASP​​.NET MVC在WCF这样做。

A very common approach to implementing RESTful services is by utilizing ASP.NET MVC to do so over WCF.

ASP.NET MVC有通过灵活的通过URL路由,灵活的HTTP方法映射优秀的RESTful支持控制器动作。

ASP.NET MVC has excellent RESTful support by via flexible URL routing and flexible HTTP Method mapping to controller actions.

WCF 4.0现在已经实现RESTful服务也使用相同的ASP.NET路由机制,ASP.NET MVC出色的支持。

WCF 4.0 now has excellent support for implementing RESTful service also using the same ASP.NET routing mechanism as ASP.NET MVC.


你有什么经验与2办法努力创造RESTful服务和利弊遇到过吗?

Question What are your experiences working with either of the 2 approaches to create RESTful services and pros and cons encountered?

推荐答案

WCF服务可以自承载。无需IIS。 ASP.NET MVC致力于提供HTML,而现有的.NET 4的WCF堆栈更多的集中于XML和JSON。

WCF services can be self-hosted. No IIS required. ASP.NET MVC is focused on delivering HTML, whereas the existing .net 4 WCF stack is focused more on XML and JSON.

新的的http://wcf.$c$cplex.com 是对WCF下一代REST,并会是显著比现有的堆栈能力更强。

The new http://wcf.codeplex.com is the next generation of REST on WCF and will be significantly more capable than the existing stack.

新的堆栈将在支持所有不同的媒体类型要好得多。它提供了底层的HTTP协议更好的访问。这将是更加可测试的,将使其更容易在可重复使用的处理程序插件添加标准的行为。

The new stack will be much better at supporting all different media types. It provides much better access to the underlying HTTP protocol. It will be much more testable and will make it easier to plug in reusable handlers to add standard behaviours.

这篇关于RESTful服务:WCF与ASP.NET MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆