Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hypermedia APIs & Self-Building Apps

vlucas
June 09, 2012

Hypermedia APIs & Self-Building Apps

What if your application had all of the information it needed from your REST API to build itself? This session will use an example RESTful Hypermedia API running locally together with a live running custom-built mobile application to demonstrate how to automate building parts of a mobile application UI from a RESTful API response alone. We will then explore techniques to customize and fine-tune the UI while still automating most of the work from the API.

vlucas

June 09, 2012
Tweet

More Decks by vlucas

Other Decks in Programming

Transcript

  1. Who are You? • Vance Lucas • http://vancelucas.com • @vlucas

    (for heckling) • Brightbit • http://brightb.it • Design, Development & Consulting for web apps, mobile apps and APIs
  2. “Level 3” is a pre- condition of REST Roy T.

    Fielding http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven
  3. “A REST API should be entered with no prior knowledge

    beyond the initial URI (bookmark) and set of standardized media types that are appropriate for the intended audience (i.e., expected to be understood by any client that might use the API). From that point on, all application state transitions must be driven by client selection of server-provided choices that are present in the received representations or implied by the user’s manipulation of those representations.” Roy T. Fielding http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven
  4. HAL Specification { "_links": { "self": { "href": "/orders" },

    "next": { "href": "/orders?page=2" }, "search": { "href": "/orders?id={order_id}" } }, "_embedded": { "order": [ { "_links": { "self": { "href": "/orders/123" }, "customer": { "href": "/u/bob", "title": "Bob" } }, "total": 30.00, "currency": "USD", "status": "shipped", "placed": "2011-01-16", } ] } }