7

I see in this question that WCF Web API is still in preview and I've just started looking at OpenRasta.

Though OpenRasta looks more mature than WCF Web API, I'm still a bit confused. Or please suggest if there is any other better framework for building REST API on .NET stack.

Also, I observed that in OpenRasta aspx view containing HTML can also be rendered as a response (in ASP.NET MVC fashion) apart from other JSON/XML representations. So, is it that I can even (or it is recommended that I should) build a web application which will also serve as a service layer to 3rd party client developer using it? Or it is just for use as a service layer?

Community
  • 1
  • 1
IsmailS
  • 10,797
  • 21
  • 82
  • 134

3 Answers3

9

OpenRasta is much more mature than WCF Web API. OpenRasta is an opinionated REST framework. WCF Web API currently has no opinions on how you should do REST, it only has opinions on how you use HTTP.

If you share OpenRasta's opinions on how to do REST then it will do a great job for you. WCF Web API is still a preview. It has great potential but there is still a long way to go.

Darrel Miller
  • 139,164
  • 32
  • 194
  • 243
  • Thanks very much Darrel. This is much helpful. What about the other question related to view for rendering HTML? – IsmailS Jun 06 '11 at 07:03
  • How about the rest options in standard WCF 4.0. Would be interested to see peoples opinion. Why not use what comes out of the box? It seems quite straightforward : http://stackoverflow.com/questions/186631/rest-soap-endpoints-for-a-wcf-service – Edward Wilde Jul 19 '11 at 08:20
4

please read a closed question

OpenRasta vs FubuMVC vs Asp.net MVC just some thoughts

Video with the question and answers, use the PAUSE to hold the scroll and read it.

http://gape.cc/jz822d

--

Err, It's been deleted though I can see deleted questions, let me make a screenshot of it.

Community
  • 1
  • 1
balexandre
  • 73,608
  • 45
  • 233
  • 342
2

OpenRasta works for both services and html sites, it's what it was built for. There's codecs for webforms, razor, sparkview and new ones are easy enough to just plugin.

SerialSeb
  • 6,701
  • 24
  • 28
  • Thanks Sebastian for the answer. So if I was to create a website and then expose everything what my website does through an API (obviously securely via oAuth etc.), so is it recommended that I do it using one code base of OpenRasta project? Is it practical? By practical I mean, can I make an intuitive ajax based website restfully and then use the same Get, Post, Put, Delete operations for exposing API to third party developers? I know this much by now that using "accept" header, a client can get response either in XHTML or JSON. – IsmailS Jun 20 '11 at 07:05
  • well yes you certainly could do that, but usually a web page rarely has the exact same dataset as the json or xml you may send to clients, so they usually live at different URIs. The point of OpenRasta is that you have the same development model for both :) – SerialSeb Jun 25 '11 at 14:37