WCF 与 ASP.NET Web API [英] WCF vs ASP.NET Web API

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

问题描述

我花了几个月的时间试图掌握 WCF 背后的概念,最近我开发了我的第一个 WCF 服务应用程序.

I've spent a few months trying to grasp the concepts behind WCF and recently I've developed my first WCF service application.

为了理解配置文件中的所有设置,我费了很大劲.
我不相信环境,但似乎你可以用它做一些了不起的事情.

I've struggled quite a bit to understand all the settings in the config file.
I am not convinced about the environment but it seems that you can do amazing stuff with it.

前几天我发现 Microsoft 推出了一个名为 ASP.NET Web API 的新东西.

The other day I've found out that Microsoft has come out with a new thing called ASP.NET Web API.

据我所知,它是一个 RESTful 框架,非常易于使用和实施.

For what I can read it's a RESTful framework, very easy to use and implement.

现在,我想弄清楚这两个框架之间的主要区别是什么,以及我是否应该尝试使用新 API 转换我的 WCF 服务应用程序.

Now, I am trying to figure out what are the main differences between the 2 frameworks and if I should try and convert my old WCF service application with the new API.

有人可以帮助我了解每个的区别和用法吗?

Could someone, please, help me to understand the differences and usage of each?

推荐答案

新的 ASP.NET Web API 是一个延续之前的 WCF Web API 项目(尽管一些 概念已经改变).

The new ASP.NET Web API is a continuation of the previous WCF Web API project (although some of the concepts have changed).

WCF 最初是为了启用基于 SOAP 的服务而创建的.对于更简单的 RESTful 或 RPCish 服务(想想像 jQuery 这样的客户端)ASP.NET Web API 应该是不错的选择.

WCF was originally created to enable SOAP-based services. For simpler RESTful or RPCish services (think clients like jQuery) ASP.NET Web API should be good choice.

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

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