简体   繁体   English

我应该选择什么框架来构建WCF Restful API

[英]What framework should I choose to build a WCF Restful API

I am wanting to build a Restful API using WCF however I am struggling to make a decision on how to accomplish this. 我想使用WCF构建Restful API但是我正在努力决定如何实现这一点。

The WCF Rest Starter Kit was developed for .Net 3.5 and has not progressed past Preview 2. Although it can be used within the current .NET Framework and within Visual Studio 2010 it seems from my research to be dead in the water and superseded by the new WCF Web API which is currently in Preview 5. WCF Rest Starter Kit是为.Net 3.5开发的,并没有超越预览2.尽管它可以在当前的.NET Framework和Visual Studio 2010中使用,但从我的研究中可以看出它已经死在了水中并被它取代了新的WCF Web API,目前处于预览版5。

On the other hand the WCF Web API is only at preview stage and should not really be used in a production application as many things could possibly change before its release. 另一方面,WCF Web API仅处于预览阶段,不应该在生产应用程序中使用,因为许多事情在发布之前可能会发生变化。 There is also no indication if its nearing completion and if it's going to be in the next .NET Framework release and when that is intended to be. 也没有任何迹象表明它是否接近完成,以及它是否将在下一个.NET Framework版本中以及何时打算发布。

I find myself between rock and a hard place and look to the wider community to provide me with some guidance on this if at all possible. 我发现自己处在摇滚和艰难的地方之间,并且希望更广泛的社区能够为我提供一些指导,如果可能的话。

你应该看看 Glenn Block的这条推文

Using ASP.NET MVC for building a Restful API should be straight forward and easy way to do it. 使用ASP.NET MVC构建Restful API应该是直接且简单的方法。

However I've used WCF Web Api with WCF Rest Contrib in production without any problems. 但是我在生产中使用WCF Web Api和WCF Rest Contrib没有任何问题。

See 看到

Maybe OpenRasta is what you are looking for? 也许OpenRasta正是您在寻找的?

See also 也可以看看

RESTful framework alternatives to WCF WCF的RESTful框架替代方案

I depends on your application. 我取决于你的申请。 If its a Website (also has views) that offers the REST API using ASP.NET MVC would be less technology, less effort, less know-how etc. 如果它使用ASP.NET MVC提供REST API的网站(也有视图)将减少技术,减少工作量,减少技术诀窍等。

If its JUST an REST API choose what you like more from development style: ASP.NET MVC or WCF Web API 如果它只是一个REST API,那么从开发风格中选择你更喜欢的东西:ASP.NET MVC或WCF Web API

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM