开发者

What is the best .NET API to build a REST service [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

What is the best API to build a rest service: WCF and ASP MVC. What are 开发者_如何学Cthe pros and cons of each approach?


At the moment WCF is relatively painful to build pure REST/HATEOAS api. Especially if you want to have unit tests. ASP MVC is targeted at more UI oriented projects. You may want to wait until Microsoft releases WCF Web API or use OpenRasta.


A lot of it would depend on what your team is more experience with.

You can pull it off with either one (WCF or ASP.NET MVC) but if your team is already comfortable with MVC you might find it easier to follow that route rather than start from scratch on WCF.

This is a good book on the subject: http://www.amazon.com/Effective-REST-Services-via-NET/dp/0321613252


A lot of what to use depends on what you are going to do with it, are you looking for a was to update view elements with jQuery? then using Asp.net MVC is the way to do it, for a API to be accessed by external users the it depends on your view of open source, if you group is ok with open source then I would say take a look at OpenRasta, otherwise take a look at WCF Web API, it's just not as mature are OpenRasta.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜