Get Some Rest: Best RESTful API Practices

Lorna Jane Mitchell (LornaJane)
PHP
Location: E144
Average rating: ***..
(3.94, 16 ratings)

Now we’re over the hype of RESTful services, and the majority of providers have realised that JSON-RPC and REST are two different things, there is still great inequality between RESTful services. Some are a pleasure to use; predictable and robust. Others seem to have a mind of their own and integrating against them can put a project over budget with the delays they cause. With that in mind, this session looks at the situation from both sides.

There are pointers, with PHP examples, for how to build a solid framework for a RESTful service using the current tools available such as microframeworks. We’ll talk about publishing a service and paying attention to error handling, consistency, and how to use hypermedia to make your service its own documentation. For those of us consuming these services, we will cover some tactics for dealing with external services in project planning terms, how to minimise the coupling of an unpredictable service against our own application, and how to debug when things go wrong. If you’re creating or consuming services, this session will give you some new ideas and hopefully lead to fewer support requests on both sides of the fence!

Photo of Lorna Jane Mitchell

Lorna Jane Mitchell

LornaJane

Lorna is an independent PHP consultant based in Leeds, UK. She leads the joind.in open source project, which provides a platform for real-time, public feedback at community events. She is an experienced event organiser and speaker herself, having hosted the Dutch PHP Conference and co-founded the PHP North West conference and user group. She has spoken at technical events across Europe and beyond, predominantly on technical topics around PHP and APIs, but also on topics around business, projects and open source. She regularly delivers technical training sessions and is also active as a mentor with PHPWomen.org. Author of the book PHP Master from Sitepoint, Lorna loves to write and is regularly published at a number of outlets including netmagazine and of course her own blog lornajane.net.

Comments on this page are now closed.

Comments

Picture of Michael Shadle
Michael Shadle
07/19/2012 2:05pm PDT

Thanks! Enjoyed the session. Forgot to talk about versioning though, do you recommend versioning in the URL, in headers, in Media Types, or query string/parameters?

I believe Foursquare published notes on their findings with their API a while ago and strongly suggested versioning in the URL.

Picture of Lorna Jane Mitchell
Lorna Jane Mitchell
07/18/2012 5:12pm PDT

Slides uploaded to OSCON’s site but you can find them also here: speakerdeck.com/u/lornajane...

Picture of Michael Shadle
Michael Shadle
07/18/2012 4:31pm PDT

hopefully the slides will be posted!

Sponsors

For information on exhibition and sponsorship opportunities at the conference, contact Sharon Cordesse at (707) 827-7065 or scordesse@oreilly.com.

View a complete list of OSCON contacts