Guilhermesilveira's Blog

as random as it gets

Rest from scratch – Part 2

with 7 comments

This 20 minutes video shows how to move from a basic REST api to one which makes use of linked resources and adds semantic values to those links.

Did your REST api do that already? Great.

Otherwise, it’s time to move ahead and decouple a little bit further your clients from your server.

Written by guilhermesilveira

May 6, 2010 at 2:51 pm

7 Responses

Subscribe to comments with RSS.

  1. […] Rest from scratch – Part 2 […]

  2. […] Rest from scratch – Part 2 – Part 2 of the video tutorial on creating RESTful applications using the Restfulie framework. (by Guilherme Silveira) […]

  3. That’s really quite awesome.

    One thing I stumbled over while playing with the client side: Many of my XML representations include an xml:base so that I can use relative URIs. It would be great if the Restfulie client resolved that …

    Stefan Tilkov

    May 31, 2010 at 7:43 am

  4. Thanks Stefan!

    Let me try to implement it. How is this base element typically defined within your representation? As a root element attribute or children element?



    May 31, 2010 at 4:33 pm

    • Sounds great. Checkout the spec here:

      Essentially, you can specify something like xml:base= as an attribute and all relative URIs contained below resolve relative to that.

      Stefan Tilkov

      May 31, 2010 at 4:35 pm

      • Great… according to the specs, it would take place if the links are xlink’links, not atom. An atom link included in a xml representation can also be leveraged by that attribute?


        May 31, 2010 at 4:46 pm

  5. Yes. From RFC 4287 (Atom Syndication): “Any element defined by this specification MAY have an xml:base attribute. When xml:base is used in an Atom Document, it serves the function described in section 5.1.1 of [RFC3986], establishing the base URI (or IRI) for resolving any relative references found within the effective scope of the xml:base attribute.”

    Stefan Tilkov

    May 31, 2010 at 5:08 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: