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

API Driven Development

Nick Jackson
February 20, 2012

API Driven Development

Slides from my CIConf 2012 talk on API Driven Development

Nick Jackson

February 20, 2012
Tweet

More Decks by Nick Jackson

Other Decks in Technology

Transcript

  1. APIS HAVE MADE US: • Smarter • More Responsive •

    Faster • Better at what we do • Produce a better user experience
  2. 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.
  3. 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.
  4. ARCHITECTURE IS BETTER • Forced to think about data types

    and methods early on. • Consistent behaviour across application is easier to achieve.
  5. 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.
  6. UPDATES BECOME SIMPLER • Run two or more API versions

    concurrently. • Tweak API backend and all frontends (‘official’ and 3rd party) benefit at once.
  7. 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.
  8. 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)
  9. 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.