Should I open web methods through ASP.NET MVC or WCF actions?

I want Ajax-ly to retrieve JSON data from some kind of web service. (A web service call will terminate the SQL call, process the returned DataSet, and return the JSON view.) Initially, I thought that an ASP.NET MVC project with the appropriate Controllers and Actions names that JsonResults returned would be sufficient. However, a colleague suggested WCF better approach something similar. In my experience, WCF is hard to configure; In addition, the MVC method provides actions through controllers, it seems very elegant.

Which is better for what I'm trying to do, MVC or WCF?

+6
json web-services asp.net-mvc wcf
source share
1 answer

If you are going to create services that create strictly JSON (without any other endpoints on the horizon), I find that .NET MVC is much easier to use and gives better results.

If you think that at some point in the future you will want several types of endpoints (SOAP, etc.), go to WCF.

Keep in mind that troubles arise from the WCF team that they are going to release something that will completely rework how the RESTful JSON services in WCF will execute. That should be interesting.

+7
source share

All Articles