Reputation: 16858
I want to write my first REST web service using the .Net framework. I've seen fairly passionate comments from various people about which is best and have even found some differing comments from Microsoft.
My web service should be fairly simple: I want to expose bus timetable information. I figure the resources I will be concerned about are
What would be the most appropriate (i.e. not necessarily the easiest, most fun or your personal preference) technology to use out of WCF, ADO.NET Data Services or ASP.Net MVC?
Upvotes: 0
Views: 204
Reputation: 76021
WCF is the Microsoft messaging bus. It aims to help with development of distributed message driven services.
WCF Data Services is an implementation of the OData protocol on top of WCF that helps with exposing your data through an automatically generated RESTful interface.
ASP.NET MVC is a framework that helps with development of web applications based on the model-view-controller pattern.
You can implement your RESTful service using any of the three technologies, however:
I would personally suggest you use the WCF Data Services to implement your service, since it seems to be mostly data-driven.
Upvotes: 2
Reputation: 35963
You can develop your own as well, creating a http handler that handles all requests, and parsing the urls yourself. It's a little bit more difficult and time consuming, but you get more control. I'm doing one in this way, so I get the URL and I parse the diferent segments and the request stream to know which data should I push to the output stream in XML.
It it's a project you have to deliver and forget, go with WCF REST, but if it's an application for yourself or your own company or simply you want to learn and have fun seeing how everything works under the hood... let aside the happy Microsoft "everything-in-one-frameworks" and do it yourself :D
Cheers.
Upvotes: 1
Reputation: 88092
If you want simple, just use generic handlers (.ashx).
If you want complicated, then WCF.
Personally, I've done a couple WCF projects and quite frankly won't willingly do another one. It's a tremendous amount of code just to get the simplest things to work.
Upvotes: 5
Reputation: 1202
ASP.NET MVC is for web applications so not that
We currently use WCF at work and I'n not over joyed at it's design although it seems easy to use the web.config file is a pain in the arse and it is to easy to put everything in one huge service.
Haven't used ADO.Net Data Services so can't say.
Honest adivce use a Java solution instead, I only work in the Microsoft ecosystem at work and would avoid a workplace that only used Microsoft if I changed jobs.
Java is much nicer, the language and api is cleaner and there is alot more third party software for enterprise level applications.
Upvotes: -2