我应该选择什么框架来构建 WCF Restful API
我想使用 WCF 构建一个 Restful API,但是我正在努力决定如何实现这一目标。
WCF Rest Starter Kit 是为 .Net 3.5 开发的,尚未超越预览版 2。虽然它可以在当前的 .NET Framework 和 Visual Studio 2010 中使用,但从我的研究来看,它似乎已经停滞不前,并被新的 WCF Web API 目前处于预览版 5。
另一方面,WCF Web API 仅处于预览阶段,不应该真正在生产应用程序中使用,因为在发布之前许多事情可能会发生变化。也没有迹象表明它是否即将完成、是否会出现在下一个 .NET Framework 版本中以及计划何时出现。
我发现自己进退两难,希望更广泛的社区能够在可能的情况下为我提供一些指导。
I am wanting to build a Restful API using WCF however I am struggling to make a decision on how to accomplish this.
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.
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. 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.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您应该关注 Glenn Block 的这条推文。
You should regard this tweet from Glenn Block.
使用 ASP.NET MVC 构建 Restful API 应该是直接且简单的方法。
不过,我在生产中使用了 WCF Web Api 和 WCF Rest Contrib ,没有任何问题。
请参阅
Using ASP.NET MVC for building a Restful API should be straight forward and easy way to do it.
However I've used WCF Web Api with WCF Rest Contrib in production without any problems.
See
也许 OpenRasta 就是您正在寻找的?
参见
Maybe OpenRasta is what you are looking for?
See also
我取决于你的申请。如果它是一个使用 ASP.NET MVC 提供 REST API 的网站(也有视图),那么技术、工作量、专业知识都会更少。
如果它只是一个 REST API,请选择您更喜欢的开发风格:ASP。 NET MVC 或 WCF Web API
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.
If its JUST an REST API choose what you like more from development style: ASP.NET MVC or WCF Web API