Web服务VS WCF [英] Webservices vs WCF

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

问题描述

我工作的一个asp.net应用程序(.NET 4框架)的设计,并想知道什么样的利弊和最佳实践使用web服务VS WCF张婷婷?此应用程序将最终被用于外部客户端来使用数据。

I am working on an asp.net application (.net 4 framework) design and was wanting to know what are the pros and cons and best practices for using webservices vs WCF techology? This application will eventually be used by outside clients to consume data.

当你会用Web服务时,你会使用WCF? 是其中一个比另一个更具可扩展性?

When would you use WebServices and when would you use WCF? Is one more scalable than the other?

推荐答案

我会使用WCF,因为它可以做一切web服务(ASMX)所做的;同时也让您可以灵活得多进一步扩大。

I would use WCF because it can do everything webservices (asmx) does; while giving you the flexibility to extend much further.

您可以设置一个简单的WCF服务一样容易,通过Visual Studio中的ASMX服务。所以,如果你在这两种技术新鲜,我会花时间学习WCF。

You can setup a simple WCF Service just as easily as an ASMX service through Visual Studio. So if you're "Fresh" on both technologies, I'd spend time learning WCF.

根据您的具体使用情况,您可能会也可能考虑WCF数据服务(.NET4)和实体框架。它基本上给你一个很好的API,你可以用它来消耗你的数据库,通过HTTP / HTTPS。 WCF数据服务的优点,就是你写出来非常少code让你的数据,你可以专注于消费它。

Depending on your specific use-case, you might might also look into WCF Data Services (.NET4) and Entity Framework. It basically gives you a nice API that you can use to consume your database over http/https. The beauty of WCF Data Services, is that you end up writing very little code to get at your data, and you can focus on consuming it.

WCF入门 - http://msdn.microsoft.com/en -us /库/ ms734712.aspx

WCF Getting Started -- http://msdn.microsoft.com/en-us/library/ms734712.aspx

WCF数据服务 - http://msdn.microsoft.com/en -us /数据/ ee720180.aspx

WCF Data Services -- http://msdn.microsoft.com/en-us/data/ee720180.aspx

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

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