REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

18
GET /greeting Content-Type: text/plain Hello :) Saturday, September 22, 12

description

Slides from my talk on REST & Hypermedia, given at the Ruby Hoedown 2012 in Nashville, TN. Questions, comments? Reach me through my Twitter handle, @philharvey.

Transcript of REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Page 1: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

GET /greetingContent-Type: text/plainHello :)

Saturday, September 22, 12

Page 2: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

About Me

• Phil Harvey, @philharvey

• Web Developer

• Member of the architecture team

• The Lampo Group, Inc.

• daveramsey.com

Saturday, September 22, 12

Page 3: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

REST & HypermediaThe Missing Links and Why You Need Them

Saturday, September 22, 12

Page 4: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Purpose

Saturday, September 22, 12

Page 5: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Common Scenario

You built an API for a business need...

Saturday, September 22, 12

Page 6: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Common Scenario

The business grows, matures, and changes...

Saturday, September 22, 12

Page 7: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Common Scenario

Leading to new, unanticipated requirements...

Saturday, September 22, 12

Page 8: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Common Scenario

New functionality is needed! But...

Saturday, September 22, 12

Page 9: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Common Scenario

You must not break existing clients!

Saturday, September 22, 12

Page 10: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Hypermedia

Saturday, September 22, 12

Page 11: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Saturday, September 22, 12

Page 12: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

api.example.com

Tickets (/tickets)

Ticket (/ticket)

Saturday, September 22, 12

Page 13: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Three Examples...UPDATE: My three examples are now located in a Gist on GitHub, right here:

https://gist.github.com/3766847

Feel free to comment on them there. Thanks!

- Phil Harvey

Saturday, September 22, 12

Page 14: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Hypermedia Constraint

• Minimal API surface area

• Discoverable Transitions

• Looser coupling, higher extensibility, reduced breakage

• Independent evolution/innovation of Client and Server systems

Saturday, September 22, 12

Page 15: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Hypermedia gives you wings!

Saturday, September 22, 12

Page 16: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Questions, comments?

Saturday, September 22, 12

Page 17: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Resources

• Roy Fielding’s dissertation:

• http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm

• Google groups:

• API Craft, Hypermedia Web, REST-Discuss

• Implementing REST/Hypermedia APIs:

• http://code.google.com/p/implementing-rest/

Saturday, September 22, 12

Page 18: REST & Hypermedia: the missing links and why you need them - Ruby Hoedown 2012

Thanks!

Saturday, September 22, 12