休息与 Wcf 的优缺点 [英] Rest vs Wcf pros and cons

查看:55
本文介绍了休息与 Wcf 的优缺点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用休息服务与 wcf 服务的优缺点是什么?

What are the pros and cons of using a rest service vs a wcf service?

我想知道使用哪种类型,我很想找到某种比较.

I am wondering which type to use and I was interested to find some sort of comparision.

推荐答案

Rest 是一种通过互联网进行交流的方式.选择地址作为方法位置并返回 HTML 标准数据(当然是 javascript、css、html)是一个非常基本的过程.

Rest is a way of doing communication over the internet. It is a very basic process of picking addresses to serve as method locations and returning HTML standard data (javascript, css, html of course).

WCF 是一个 .net 库,用于让两个程序使用 SOAP 相互通信.其中包含两个非常熟悉的程序交易类信息.

WCF is a .net library used to have two programs talk to each other using SOAP. Which consists of two very familiar programs trading class info.

既然 Rest 是一个过程,而 WCF 是一个类库,那么更好的问题可能是Rest vs Soap".

Seeing as Rest is a process, and WCF is a class library, a better question might be "Rest vs Soap".

最重要的是,如果您需要两个应用程序进行通话,您可能需要使用 WCF.即使应用程序不是都用 .net 编写的.但是,如果您需要通过网络技术访问信息(通常通过这种方式访问​​ javascript),您将需要使用 Rest.

The bottom line is, if you need two apps to talk, you might want to use WCF. Even if the apps are not both written in .net. However if you need information to be accessed by web tech(usualy javascript access is done this way) you'll want to use Rest.

不过,只是一个快速的旁注,WCF 的 Rest 也很好,所以你真的不会出错.

Just a quick side note though, WCF does Rest well too, so you realy can't go wrong there.

这篇关于休息与 Wcf 的优缺点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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