admin管理员组

文章数量:1402796

as per wikipedia terms REST is

REST can be considered the architectural style for the World Wide Web. The architectural style was developed in parallel to the HTTP/1.1 protocol, based on the existing design of HTTP/1.0

REST practices started long time ago along with HTTP evolution. If i understand the defenetions correctly , we can take advantage of existing techologies and can built REST services on top of it.

My requirement is to built RESTFul services on top of .Net 2.0 (i know this can be easily acheivable in WCF, but currently i dont have that luxury).

  • is this possible??

  • if possible please point me some working examples..

  • is there any blogs or writings in internet covers the implementation of this approach..?

EDIT:

i forgot to mention this one.

  • is it possible to consume the REST services from javascript.??

Thanks in Advance

as per wikipedia terms REST is

REST can be considered the architectural style for the World Wide Web. The architectural style was developed in parallel to the HTTP/1.1 protocol, based on the existing design of HTTP/1.0

REST practices started long time ago along with HTTP evolution. If i understand the defenetions correctly , we can take advantage of existing techologies and can built REST services on top of it.

My requirement is to built RESTFul services on top of .Net 2.0 (i know this can be easily acheivable in WCF, but currently i dont have that luxury).

  • is this possible??

  • if possible please point me some working examples..

  • is there any blogs or writings in internet covers the implementation of this approach..?

EDIT:

i forgot to mention this one.

  • is it possible to consume the REST services from javascript.??

Thanks in Advance

Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Aug 26, 2009 at 10:55 RameshVelRameshVel 65.9k32 gold badges172 silver badges213 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 3

There is a book restful

Try this for a client: http://developer.yahoo./dotnet/howto-rest_cs.html for example

edit: to reflect ment:

I found this article on how to do a restful serivce with http handlers.

And how to consume via javascript.

Apart from rolling your own Http modules there are 3 main toolkits I know of for implementing REST services.

  • WCF - Has the advantage that it es with the framework and has the underlying framework to support more advanced scenerios. Microsoft also provide the WCF Starter Toolkit which has a lot of extra goodies.
  • OpenRasta - Available here. A much simpiler option than the WCF route. I haven't use it enough to ment on advanced usage scenerios.
  • ASP.NET MVC - Although not a REST framework can still be used to implement REST services. Phil Haack has a good blog post here.

You can get it working by writing custom handlers.

Take a look at this article.

http://www.codeproject./KB/webservices/REST_Web_Service.aspx

I believe your best bet to consume REST services in javascript is to get the results in json format.

From javascript you make a request to the service by specifying the format as json and on the server side you check for the format and serialize the response data to json format.

I built my own REST framework on top of HttpListener and run it in an Windows Service. It is pretty easy to get the basic stuff going. However, over time you will need plenty of other infrastructure code to support dealing with all aspects of HTTP. If you are starting from scratch, then check out OpenRasta. It will guide you down the right path and save you a whole lot of time.

本文标签: aspnetREST services with Net 20 framework amp REST consumption in javascriptStack Overflow