views:

579

answers:

5

So far my options are ADO.Net data services, WCF REST Starter Kit(not sure if I can use it, as their EULA is hard to comprehend and confusing), ASP.NET MVC.

There are quite a few posts, but I want to see if there are anymore frameworks that I am missing. Also please post your experiences if you already used any of the above options.

The scenario I am looking to use is for saving and retreiving some data from a SQL Server database. I am looking for something that already had some infrastructure built into it. I read the other questions but I did not get any concrete experiences that people had with the above mentioned options, so wondering if things changed over time.

Thanks in advance.

Clarification # 1: I am currently limiting my options to MS Stack

A: 

ASP.NET MVC isn't really like the other things. It is a web development model, an alternative to WebForms.

As to implementing a REST based Web Service, WCF is probably the way to go. Its is pretty much a matter of setting a few extra attributes, configuring a single xml file and thats about it. So far as infrastructure goes, WCF is about as complete as any choices out there, as it has bandwidth and concurrency built in and should you decide to switch transports ( to say, named pipes or TCP ) or wish to switch to using SOAP instead, its a trivial switch. Additionally, tracing is built in, which can be handy when things go wrong.

One final option might be Web Methods. If you are just trying to Ajax enable a website, Web Methods would probably do the trick.

As to if you are missing any frameworks... if you are dealing with MS dev stack, no, thats pretty much it, except perhaps classic web services which are still supported.

If you are talking non-MS languages, there are half a hundred different web service standards for all the various languages ( Java, Python, Ruby, etc... ). If you aren't confined to MS technologies, you should make that clear as it opens up the options a ton.

EDIT: That is not to say you can't do REST based viewless interfaces with ASP.NET MVC. If just means you have zero built in infrastructure and will basically be rolling your own. Thus, no load handling, no DDOS protection, no fault tolerance, etc...

Serapth
To infer that converting a WCF SOAP based interface to REST can be done by setting a few attributes demonstrates a lack of understanding of the properties of a RESTful interface. REST is not just about delivering XML/json using an URL and a HTTP GET.
Darrel Miller
I disagree. With the amount of services/abstraction WCF provides, switching *YOUR DATA LAYER* from REST to SOAP should be a matter of a few attributes/config changes.
Serapth
Yeah, that's the problem. REST isn't intended to expose a data layer. It is supposed to expose a machine consumable presentation layer.
Darrel Miller
@Darrel: REST is for presentation layer only? What gave you that impression?@Serapth: You can't switch the style of an architecture by changing a few attributes and configs. You may be able to get POX with http verbs (what WCF REST provides), but it won't be RESTful without applying the other REST constraints, the core one being following (and generating!) links...
serialseb
@serialseb Yeah, presentation layer is too restrictive a term. What I really want to say is "expose a content layer". It sits between the presentation and data layer. It contains what you want to display to the user-agent, but not how to display it. I don't believe that REST is the best approach for exposing data to a business process or workflow process.
Darrel Miller
A: 

If you are using .asmx wed services you can tag the class with ScriptService and then request Json in the AJAX call to get Json back.

ecoffey
A: 

If you website is already running MVC and it's just easier add an extra view and dump xml/json instead of HTML content. (Stack Overflow does this for their RSS feeds)

If your wanting to add custom headers like Basic Http Authentication, X-HTTP-Method-Override for support for put/delete (as browsers pipeline only supports get/post), its easy to do in the Rest Starter Kit, and almost impossible to do currently in WCF 3.5 (possible with asp.net modules with attributes set allowing httpcontext)

Rest Starter Kit fills in all the gaps that WCF 3.5 left out!

The REST Starter Kit has a ASP.NET Pre-Release Components, as in "The software is licensed "as-is." You bear the risk of using it. It may never get released as a stable release " View Licence

To get you started PluralSight have some awesome video tutorials about REST and the REST Starter Kit.

Elijah Glover
+3  A: 

Actually I think that ADO.NET for Data Services (previously called Astoria) is what you want.

http://msdn.microsoft.com/en-us/data/bb931106.aspx

Tim Jarvis
+2  A: 

WCF is certainly not the way to go as far as v1 is concerned. It prevents you from implementing many of the constraints of ReST architectures.

If you want to do ReST over http, why not give a look at OpenRasta, that has been built from the ground-up to support REST scenarios:

http://trac.caffeine-it.com/openrasta

Seb

serialseb