WCF VS ASP的.NET Web API [英] WCF vs ASP .Net Web API

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

问题描述

什么是使用每种技术的优点和缺点是什么?

What are the pros and cons of using each technology?

WCF的Web API现在已合并到Asp.net
Asp.net网页API现在支持自托管。

WCF Web Api is now merged into Asp.net Asp.net web api now supports self hosting.

我还是想象如果我要揭露多协议架构进行同样的操作,我仍然偏向WCF还是可以的mvc终点做到这一点呢?

I still imagine if I want to expose multiple protocol schemas for the same operation I would still lean towards WCF or can Mvc end point do this too?

也做了新的Asp.Net网页API暴露WSDL?如果不是怎么会在客户端弄清楚什么操作提供给他们?

Also does the new Asp.Net web api expose Wsdl? If not how would the client figure out what operation is available to them?

可以说了MVC的最大特点是ModelBinder的。如何强大的是WCF相同呢?

Arguably the best feature of Mvc is the modelbinder. How robust is the WCF equivalent?

所以,有人可以告诉我,请问Asp.net网页API带来什么好处表? WCF似乎压倒了更强大的/可扩展的选择,海事组织。关于唯一的的MVC Web API已经在WCF模型可能缓解的发展,但是这意味着,如果蹲下它最终是一个严重的设计限制的道路。

So can someone tell me what advantage does the Asp.net web api bring to the table? WCF seems overwhelmingly the more powerful/scalable choice, imo. About the only thing the Mvc Web Api has over the WCF model is probably ease of development, but that means squat if it ends up being a serious design limitation down the road.

推荐答案

首先,我建议你阅读我关于这个问题的帖子:
<一href=\"http://blogs.microsoft.co.il/blogs/idof/archive/2012/03/05/wcf-or-asp-net-web-apis-my-two-cents-on-the-subject.aspx\">http://blogs.microsoft.co.il/blogs/idof/archive/2012/03/05/wcf-or-asp-net-web-apis-my-two-cents-on-the-subject.aspx

First, I suggest you read my post on the subject: http://blogs.microsoft.co.il/blogs/idof/archive/2012/03/05/wcf-or-asp-net-web-apis-my-two-cents-on-the-subject.aspx

关于您的WSDL的问题 - 因为的WebAPI不使用SOAP,它不需要一个WSDL,并且不出口的。您可以使用超媒体与可能的活动网址列表中返回的资源(认为它是一个自我描述的资源)

Regarding your WSDL question - since the WebApi does not use SOAP, it does not require a WSDL, and does not export one. You can use Hypermedia to return resources with a list of possible activity URLs (think of it as a self-describing resource)

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

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