4

I wanted to get some thoughts about API access either through WCF or MVC. Either works, but I like the idea of using MVC to build custom routes. I know this is possible with WCF (maintaining the request routes), but aside form the security disadvantages of not using WCF (which are not deal breakers) what other thoughts does the community have regarding this.

I have a project where we have been discussion using MVC or WCF and we are comfortable with both, but we are swaying towards MVC.

1
  • 1
    Have you considered using the new Web API present in MVC4? Commented Aug 9, 2012 at 22:13

2 Answers 2

2

You should use the new ASP.Net MVC Web API framework, new to MVC 4.0.

Sign up to request clarification or add additional context in comments.

2 Comments

This. I've been wanting to use it, it looks so so simple to quickly build an API.
I was reading about this and that is why I commented on MVC3. Since everything is still in RC I am hesitant to put anything in production. I know I should, but I want to wait until the full release.
1

I think MVC makes a great web API. I did this not too long ago for an android app that uses a RESTful web API using MVC 3. Here's a good tutorial:

http://msdn.microsoft.com/en-us/magazine/dd943053.aspx

If you're feeling adventurous check out the Web API framework included in MVC 4. NOTE: I have not experimented with this yet but plan to in the near future. See here: http://www.asp.net/web-api

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.