移动开发中的WCF REST服务上的Web API [英] Web API over WCF REST service in mobile development

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

问题描述

嗨朋友们,

我开始从事移动开发工作,我必须创建将由客户使用的服务。



可以使用 MVC Web API WCF REST 创建这些服务,这两种服务都是非SOAP服务并使用HTTP协议。



我遇到了困惑的情况

Hi Friends,
I started working on mobile development wherein I have to create services that will be consumed by the client.

These services can be created using MVC Web API or WCF REST, both are non-SOAP services and make use of HTTP protocol.

I came across situation where in I got confused

1. Which one to use <br />
2. How MVC Web API are faster than WCF REST?





任何评论?



提前致谢:)



Any comments?

Thanks in advance :)

推荐答案

请查看这篇文章..



http://www.dotnet-tricks.com/Tutorial/webapi/JI2X050413-Difference-between-WCF-and-Web-API-and-WCF-REST-and- Web-Service.html [ ^ ]



http://msdn.microsoft.com/en-us/library/jj823172.aspx [ ^ ]
please check out this article..

http://www.dotnet-tricks.com/Tutorial/webapi/JI2X050413-Difference-between-WCF-and-Web-API-and-WCF-REST-and-Web-Service.html[^]

http://msdn.microsoft.com/en-us/library/jj823172.aspx[^]


嗯,哟你在问题标题中提到了移动开发。查看这些

ASP.Net Web API与WCF [ ^ ]

REST / Web API和WCF [ ^ ]

ASP.NET Web API与WCF - 我们从何处开始? [ ^ ]

WebAPI或WCF? [ ^ ]
Well, you have mentioned "Mobile Development" in your question title. Check these
ASP.Net Web API vs WCF[^]
REST/Web API and WCF[^]
ASP.NET Web API vs WCF – Where do we go from here?[^]
WebAPI or WCF?[^]






我不认为你应该陷入更快的陷阱。你应该看看你或你的团队可以管理哪些最快的开发。



WebAPI将是我选择纯HTTP驱动的REST服务。为什么?因为虽然webAPI是由WCF REST诞生的,但它实际上是一个HTTP REST实现,它已经为HTTP服务提供了铃声和口哨声。 WCF REST设置起来相当复杂,并且有更多的代码行。如果您正在使用MVC站点,那么使用WebAPI应该是第二天性。



WCF然而还有开发人员可以使用的许多其他好处,例如限制,扩展和并发以及不同的端点(消息队列,TCP等)。但是我觉得这对于基本的HTTP服务来说会很臃肿。



希望有所帮助。
Hi,

I don't think you should get bogged down by which is faster. You should look at what is going to be quickest to develop that is manageable by you or your team.

WebAPI would be my choice for pure HTTP driven REST services. Why? Because although the webAPI was born out of WCF REST it is in fact a HTTP REST implementation that already has the bells and whistles for HTTP services. WCF REST is fairly convoluted to set up and there are more lines of code to it. If you are doing MVC sites, then working with the WebAPI should be second nature.

WCF however has many other benefits that developers can use such as throttling, scaling and concurrency as well as different end points (Message queue, TCP etc). However I feel this would be bloat for a basic HTTP service.

Hope that helps.


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

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