Slide 1

Slide 1 text

@jhsu / Josephhsu.com WNYRuby Lightning Talk 2 Oct., 2012 Versioning an API Tuesday, October 2, 12

Slide 2

Slide 2 text

Hypermedia API Responders HATEOAS Tuesday, October 2, 12

Slide 3

Slide 3 text

Versioning Things Change. Tuesday, October 2, 12

Slide 4

Slide 4 text

Versioning Don’t break things, please. Tuesday, October 2, 12

Slide 5

Slide 5 text

Different ways * Param - http://blah.io/api/users?v=1.0 * URI - http://blah.io/api/v1/users * Headers - http://blah.io/api/users (‘Accept’ header) Tuesday, October 2, 12

Slide 6

Slide 6 text

headers Accept: application/vnd.thing.v1+json Accept: application/vnd.github.v3+json Tuesday, October 2, 12

Slide 7

Slide 7 text

Implementation * Responders * Decorator Pattern (draper) Tuesday, October 2, 12

Slide 8

Slide 8 text

incoming code Tuesday, October 2, 12

Slide 9

Slide 9 text

Actioncontroller::REsponder #to_[format] Tuesday, October 2, 12

Slide 10

Slide 10 text

Tuesday, October 2, 12

Slide 11

Slide 11 text

Actioncontroller::REsponder #to_[format] Tuesday, October 2, 12

Slide 12

Slide 12 text

Tuesday, October 2, 12

Slide 13

Slide 13 text

controllers Tuesday, October 2, 12

Slide 14

Slide 14 text

Actioncontroller::REsponder #to_[format] Tuesday, October 2, 12

Slide 15

Slide 15 text

josephhsu.com Thanks. Tuesday, October 2, 12