API Driven Development

C7f3b4756d808ef0e2548bd0965ac225?s=47 Nick Jackson
February 20, 2012

API Driven Development

Slides from my CIConf 2012 talk on API Driven Development

C7f3b4756d808ef0e2548bd0965ac225?s=128

Nick Jackson

February 20, 2012
Tweet

Transcript

  1. 3.
  2. 4.

    APIS HAVE MADE US: • Smarter • More Responsive •

    Faster • Better at what we do • Produce a better user experience
  3. 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.
  4. 7.
  5. 8.
  6. 9.
  7. 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.
  8. 20.

    ARCHITECTURE IS BETTER • Forced to think about data types

    and methods early on. • Consistent behaviour across application is easier to achieve.
  9. 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.
  10. 22.

    UPDATES BECOME SIMPLER • Run two or more API versions

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