REST web service - implementation

Published Sunday, July 13, 2008 6:21 PM

On the web there has been a lot of talk about REST (Representational State Transfer) web service. However, it is all on the representational side, its format (mostly, XML output),  its usage (use GET, POST), its popularity (very popular, surpassing SOAP because of its simplicity and intutiveness), its champion providers (a lot, including all major internet players, Yahoo, Amazon ... not Google though, google mostly stick to web service) and sample web service (again, all Yahoo service apis are restful service).

 
However, to find an article on the implementation side of REST is far and bare (actually I do not remember I have seen any). On DNS, we have discussed about this about we are still to find a satisfactory answer.
 
Is it too complicated to implement? Or the opposite?
 
I suspect it is the opposite. It might be as easy as its output suggests. REST uses
  • HTTP
  • URL
  • XML
  •  
    REST has been around as long as the WEB. Every web page is a REST call. In type a web address, out display a web page of information.
     
    Like the age-old HTMLs, REST is stateless, it can be accessed with HTTP GET, POST (all PUT and DELETE, however I am not familiar with these two aspects).
     
    REST responses can be easily found. For example, a local yahoo search call:
    And the output xml would be
     
     <?xml version="1.0" ?>
    - <ResultSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:yahoo:maps" xsi:schemaLocation="urn:yahoo:maps http://api.local.yahoo.com/MapsService/V1/TrafficDataResponse.xsd">
      <LastUpdateDate>1215958212</LastUpdateDate>
      <Warning>The exact location could not be found, here is the closest match: 701 1st Ave, Sunnyvale, CA 94089</Warning>
    - <Result type="construction">
      <Title>Road construction, on I-880 at GATEWAY BLVD</Title>
      <Description>NORTHBOUNDLONGTERM FULL RAMP CLOSURE CONSTRUCTION</Description>
      <Latitude>37.477412</Latitude>
      <Longitude>-121.933437</Longitude>
      <Direction>N/A</Direction>
      <Severity>2</Severity>
      <ReportDate>1136610060</ReportDate>
      <UpdateDate>1215950340</UpdateDate>
      <EndDate>1230792300</EndDate>
      </Result>
      </ResultSet>
    <!--
     ws03.search.re2.yahoo.com compressed/chunked Sun Jul 13 07:12:16 PDT 2008 
      -->
     
    There are principals in REST Web service design (from http://www.xfront.com/REST-Web-Services.html)
     
    1. The key to creating Web Services in a REST network (i.e., the Web) is to identify all of the conceptual entities that you wish to expose as services.
    2. Create a URL to each resource. The resources should be nouns, not verbs. For example, do not use this

    http://www.parts-depot.com/parts/getPart?id=00345

    Note the verb, getPart. Instead, use a noun:

    http://www.parts-depot.com/parts/00345

    3. Categorize your resources according to whether clients can just receive a representation of the resource, or whether clients can modify (add to) the resource. For the former, make those resources accessible using an HTTP GET. For the later, make those resources accessible using HTTP POST, PUT, and/or DELETE.

    4. All resources accessible via HTTP GET should be side-effect free. That is, the resource should just return a representation of the resource. Invoking the resource should not result in modifying the resource.

    5. No man/woman is an island. Likewise, no representation should be an island. In other words, put hyperlinks within resource representations to enable clients to drill down for more information, and/or to obtain related information

    6. Design to reveal data gradually. Don't reveal everything in a single response document. Provide hyperlinks to obtain more details.

    7. Specify the format of response data using a schema (DTD, W3C Schema, RelaxNG, or Schematron).
    For those services that require a POST or PUT to it, also provide a schema to specify the format of the response.

    8. Describe how your services are to be invoked using either a WSDL document, or simply an HTML document. 

    by xxxd

    Comments

    # software for scheduling said on Monday, February 08, 2010 11:16 PM

    NFS provide a total package of hotel software for properties of all sizes ranging from small independent hoteliers to large chains

    # ASP.NET MVC Archived Buzz, Page 1 said on Thursday, February 18, 2010 4:54 PM

    Pingback from  ASP.NET MVC Archived Buzz, Page 1

    # Sale 2001 Mr2 Spyder Fj Cruiser Toyota Rav4, Rav4 Suv said on Thursday, May 20, 2010 2:53 PM

    Pingback from  Sale 2001 Mr2 Spyder Fj Cruiser Toyota Rav4, Rav4 Suv

    # T1000 Problems Parking Light, T1000 2nd Hand Stark Industries said on Thursday, May 20, 2010 4:39 PM

    Pingback from  T1000 Problems Parking Light, T1000 2nd Hand Stark Industries

    # Volvo V70 Part Oxygen Sensor Anti Seize Compound, V70 Acura said on Thursday, May 20, 2010 8:41 PM

    Pingback from  Volvo V70 Part Oxygen Sensor Anti Seize Compound, V70 Acura

    # Lacrosse Lucerne Used Rendezvous Buick Reatta, 1989 Buick Reatta Sale said on Thursday, May 20, 2010 8:47 PM

    Pingback from  Lacrosse Lucerne Used Rendezvous Buick Reatta, 1989 Buick Reatta Sale

    # B2300 Replacement Coupon Hyundai Scoupe, 2002 Mazda B2300 Parts said on Thursday, May 20, 2010 9:13 PM

    Pingback from  B2300 Replacement Coupon Hyundai Scoupe, 2002 Mazda B2300 Parts

    # Aftermarket Parts Auto Parts 450sl Mercedes 190e, 190e Classic said on Thursday, May 20, 2010 10:02 PM

    Pingback from  Aftermarket Parts Auto Parts 450sl Mercedes 190e, 190e Classic

    # 2007 Clk430 Parts Mercedes Benz 450sl, 01 Mercedes Benz Clk430 Parts Shock Absorber said on Thursday, May 20, 2010 11:43 PM

    Pingback from  2007 Clk430 Parts Mercedes Benz 450sl, 01 Mercedes Benz Clk430 Parts Shock Absorber

    # Honeywell H46c Contemporary Style, Replacement 1985 Ford Tempo Fuel Pump said on Friday, May 21, 2010 2:32 AM

    Pingback from  Honeywell H46c Contemporary Style, Replacement 1985 Ford Tempo Fuel Pump

    # Compare Miata S2000, Buy Mx 5 Miata Fix said on Friday, May 21, 2010 4:48 AM

    Pingback from  Compare Miata S2000, Buy Mx 5 Miata Fix

    # Price 2008 Hyundai Tucson Kia Sportage, Tucson Parts Elantra Tiburon Hyundai Azera said on Friday, May 21, 2010 6:06 AM

    Pingback from  Price 2008 Hyundai Tucson Kia Sportage, Tucson Parts Elantra Tiburon Hyundai Azera

    # Discoteca Florida Verona, Verona Taillight Discount said on Friday, May 21, 2010 4:38 PM

    Pingback from  Discoteca Florida Verona, Verona Taillight Discount

    # Clearance Rear Infiniti I30, Used Infiniti Cars Sale said on Friday, May 21, 2010 5:19 PM

    Pingback from  Clearance Rear Infiniti I30, Used Infiniti Cars Sale

    # 190d Custom 190e, 190d Promotional Sky Dancer said on Friday, May 21, 2010 10:03 PM

    Pingback from  190d Custom 190e, 190d Promotional Sky Dancer

    # 325e Parts Repair, Part 1985 Bmw 325e Floor Mats said on Saturday, May 22, 2010 12:23 AM

    Pingback from  325e Parts Repair, Part 1985 Bmw 325e Floor Mats

    # New 230sl 250sl 280sl W113, 250sl Pt Stupa said on Saturday, May 22, 2010 1:59 AM

    Pingback from  New 230sl 250sl 280sl W113, 250sl Pt Stupa

    # P25 P2500 Bus Radiator W4500 Gmc Syclone, Buy Ford E 550 Econoline F250 Crown Victoria said on Saturday, May 22, 2010 8:30 AM

    Pingback from  P25 P2500 Bus Radiator W4500 Gmc Syclone, Buy Ford E 550 Econoline F250 Crown Victoria

    # 280zx Twin Turbo Nissan Altima, 280zx Used Insertion said on Saturday, May 22, 2010 8:33 AM

    Pingback from  280zx Twin Turbo Nissan Altima, 280zx Used Insertion

    # 1948 Dodge Truck Sale Lil Red Express, Vitamin Express Oakland Ca said on Saturday, May 22, 2010 5:29 PM

    Pingback from  1948 Dodge Truck Sale Lil Red Express, Vitamin Express Oakland Ca

    # Clk550 Accessories Parts, Clk550 Part Wrecking Used said on Saturday, May 22, 2010 6:46 PM

    Pingback from  Clk550 Accessories Parts, Clk550 Part Wrecking Used

    # Headlight Toyota Rav4 2008 Kia Sportage Isuzu Vehicross, Isuzu Vehicross Promo Suvs - 281.binggreen.com said on Sunday, May 23, 2010 12:16 AM

    Pingback from  Headlight Toyota Rav4 2008 Kia Sportage Isuzu Vehicross, Isuzu Vehicross Promo Suvs - 281.binggreen.com

    # 265 Replacement Battery For Lg, Replacement Trd Fj Cruiser Skid Plate P265 70r17 - 470.tijuanareader.com said on Monday, May 24, 2010 7:05 AM

    Pingback from  265 Replacement Battery For Lg, Replacement Trd Fj Cruiser Skid Plate P265 70r17 - 470.tijuanareader.com

    # 1964 Chevy Chevelle Malibu Ss, 1970 Chevelle Wheels - 88.an74.com said on Monday, May 24, 2010 8:05 AM

    Pingback from  1964 Chevy Chevelle Malibu Ss, 1970 Chevelle Wheels - 88.an74.com

    # 1990 Sale Buick Reatta, Wildcat Aftermarket Reatta Buick Lesabre - 398.unlockiphone30.net said on Monday, May 24, 2010 1:48 PM

    Pingback from  1990 Sale Buick Reatta, Wildcat Aftermarket Reatta Buick Lesabre - 398.unlockiphone30.net

    # 1991 1996 Infiniti G20 Radiator Transmission Oil Cooler, Infiniti Beacon - 342.tvshowzone.com said on Monday, May 24, 2010 7:57 PM

    Pingback from  1991 1996 Infiniti G20 Radiator Transmission Oil Cooler, Infiniti Beacon - 342.tvshowzone.com

    # Oleo Fusion Silky Smooth, Plymouth Horizon Transmission Blower Motor - 84.tijuanareader.com said on Monday, May 24, 2010 8:32 PM

    Pingback from  Oleo Fusion Silky Smooth, Plymouth Horizon Transmission Blower Motor - 84.tijuanareader.com

    # 2000 Acura Integra Bumper Provides, Acura 2.5 Tl - 277.computeronlinebingo.com said on Monday, May 24, 2010 9:37 PM

    Pingback from  2000 Acura Integra Bumper Provides, Acura 2.5 Tl - 277.computeronlinebingo.com

    # E 550 Super Duty Stripped Chassis Replacement 5.4 L, 1966 Chevrolet Nova Super Sport - 100.renters.ws said on Tuesday, May 25, 2010 12:59 AM

    Pingback from  E 550 Super Duty Stripped Chassis Replacement 5.4 L, 1966 Chevrolet Nova Super Sport - 100.renters.ws

    # Pb150 Marketplace, Pb150 Finger - 137.renters.ws said on Tuesday, May 25, 2010 1:55 AM

    Pingback from  Pb150 Marketplace, Pb150 Finger - 137.renters.ws

    # 1988 Mazda B2600 4x4, 1992 Mazda B2600 Cab Plus - 247.zapstreaming.com said on Tuesday, May 25, 2010 4:53 AM

    Pingback from  1988 Mazda B2600 4x4, 1992 Mazda B2600 Cab Plus - 247.zapstreaming.com

    # 630csi Part Brake Pads Spark Plug, 1040 Park Avenue Nyc - 210.animejin.com said on Tuesday, May 25, 2010 7:08 AM

    Pingback from  630csi Part Brake Pads Spark Plug, 1040 Park Avenue Nyc - 210.animejin.com

    # Pilot Automotive Fog Lights, Soul Survivor Pilot James Huston - 32.tvshowzone.com said on Tuesday, May 25, 2010 3:05 PM

    Pingback from  Pilot Automotive Fog Lights, Soul Survivor Pilot James Huston - 32.tvshowzone.com

    # Bonneville Review Vacation Rentals, 2004 Pontiac Bonneville Se Review - 474.cmanager.org said on Tuesday, May 25, 2010 4:34 PM

    Pingback from  Bonneville Review Vacation Rentals, 2004 Pontiac Bonneville Se Review - 474.cmanager.org

    # 1989 - 1980 @ Rd250 Bulb Flasher Relay, 1989 Dodge D250 Body Parts Ram 2500 - 24.computeronlinebingo.com said on Thursday, May 27, 2010 11:54 AM

    Pingback from  1989 - 1980 @ Rd250 Bulb Flasher Relay, 1989 Dodge D250 Body Parts Ram 2500 - 24.computeronlinebingo.com

    This site

    This Blog

    Syndication

    Sponsors

    • MaximumASP
    • Social Bookmarking
      Online Shopping
      asp.net hosting
      UK online local dating