John Teague of Avenida Software spoke on REST (ReST stands for Representational State Transfer) and what Roy Fielding (who came up with REST) penned to be HatEoAS (Hypertext as the Engine of Application State) which the rest (no pun intended) of the world has come to refer to as Hypermedia APIs (as the later name is less unwieldy) at the Austin .NET Users Group tonight. My takeaway:
- Representational State Transfer varies from CRUD in that you are pushing state to commands in hitting a REST API.
- REST is not SOAP (Simple Object Access Protocol) in which one defines gunk on a WSDL (Web Service Definition Language) and interfaces with it exclusively through POST as GET, PUT, DELETE, and PATCH may be used with REST too.
- The Richardson Maturity Model is a means to gauge how RESTful your stuff is.
- A Hypertext implementation varies from a REST-only approach without out it in that the later will expose a bunch of marginally-related routes on an API that a consumer can only know of to implement by way of its programmer be told of by documentation or by human being what the smattering or different routes to hit are. In a Hypermedia implementation, arriving an entry point at one URI provides to the consumer all other routes. A tree of links is exposed at the entry point allowing for navigation to all other functionality.
- In the mobile space this is posh because the infrastructure for a site may be pulled into HTML5 local storage once and then referenced even when connectivity is lost allowing for some cached capabilities.
- There is a movement to have a Hypermedia call return HTML with links nested in unordered lists in lieu of JSON or HAL (Hypertext Application Language). John Teague asserted he was having trouble warming up to this as if one is to try to reshape what comes across the wire as HTML one gets into the slog of XML spelunking. Glen Block has an article on using a link-formatter over top of a Hypermedia API. Perhaps such an approach could minimize the HTML and thus XML wrangling.
- Mike Amundsen has a book on Hypermedia APIs.
- Deep link entry points partway into a Hypermedia tree provide a how-to-offer/how-to-maintain challenge.
- Adding a new item within a Hypermedia API is done with something called a template.
- REST in Practice by Ian Robinson and Jim Webber is... a book!
- NBuilder is a great tool with which to make fake data for a test. (Sorry, I know that is off topic.)
The event was held at the facility of Build a Sign! Thanks to Build a Sign for hosting!
No comments:
Post a Comment