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

API Driven Development

C7f3b4756d808ef0e2548bd0965ac225?s=47 Nick Jackson
February 20, 2012

API Driven Development

Slides from my CIConf 2012 talk on API Driven Development


Nick Jackson

February 20, 2012

More Decks by Nick Jackson

Other Decks in Technology


  1. API DRIVEN DEVELOPMENT Or; Eating Your Own Dog Food

  2. NICK JACKSON @jacksonj04

  3. None
  4. APIS HAVE MADE US: • Smarter • More Responsive •

    Faster • Better at what we do • Produce a better user experience
  5. IN TODAY’S LECTURE... • What is an API? • How

    can I use it to drive development? • Why should I care? • How CodeIgniter made it easy.
  6. WHAT IS AN API? A Really Quick Introduction

  7. None
  8. None
  9. None
  10. DRIVEN BY APIS Planning For The Win

  11. Fancy Web Service NOW WITH AN API!!!*

  12. We Have An API!* ❖ API only available on Triple

    Platinum Plus plan. ❖ API allows reading of content only, not creation, modification or deletion. ❖ API will not be kept up to date with new changes. ❖ No support or documentation is available for API. ❖ API may randomly stop working, and we won’t really care about fixing it for you. After all, it’s not important.
  13. Database Application User

  14. 3rd Party Application User API Database Application User


  16. Database API

  17. 3rd Party Application User Application User Database API


  19. YAY FOR APIS! But why should I care?

  20. ARCHITECTURE IS BETTER • Forced to think about data types

    and methods early on. • Consistent behaviour across application is easier to achieve.
  21. DEVELOPMENT IS EASIER • Calling a well designed API is

    simple. • Error messages become cleanly captured by design. • APIs encourage code reuse at both API and application end.
  22. UPDATES BECOME SIMPLER • Run two or more API versions

    concurrently. • Tweak API backend and all frontends (‘official’ and 3rd party) benefit at once.
  23. YOUR API WILL BE BETTER • API must include everything

    you want your application to be able to do. • Reliability of API is now critical. • Documentation is better.
  24. SO WHAT OF CODEIGNITER? Why CodeIgniter already has you thinking

    the right way
  25. View Model Controller

  26. API Model Controller View API Controller

  27. HELPFUL OUT OF THE BOX • PHP is built to

    work in a web environment, so functions to GET, POST etc are really simple. • Output class has caching, media types and so-on. • Upcoming in v3: Unit testing (and other goodies)
  28. LIBRARIES AND EXTENDABILITY • Awesome libraries out there already. •

    Many, many tutorials out there already. • Google it, try “CodeIgniter REST / OAuth / API” etc. • Really easy to extend output class to do custom API stuff.