Here are the notes from my lightning talk at PHPSW on May 16, 2012.

Instant RESTful APIs
  • http://blog.programmableweb.com/2011/09/23/short-list-of-restful-api-frameworks-for-php/
  • Why REST?
    • www glue
    • standardised
    • traction (3950/5921 on Programmable Web)
      • soap 1183
      • xml-rpc 152
    • low level (body not required for initial routing)
    • NOT SOAP!
      • WSDLs always out of sync with reality
      • parsing overhead (not noticeable until scale)
      • single response format XML
  • Frameworks
    • OOP Rest Controller
        • FuelPHP (ControllerRest)
        • Zend (RestServer)
      • Are...
        • Part of a fully-featured package
        • Not necessarily quick to deploy
    • New Paradigms
      • self generating
          • Recess - included database modelling, MVC
          • FRAPI - high level, media types, generates docs
      • Resource-Method-Representation
          • Tonic
        • very RESTful - every URL as resource
      • Restler (non-RESTful examples!)
        • heavily customisable, supports XML
        • resources mapped directly to classes
      • DAVE (Delete, Add, Edit, View)
        • includes single-threaded webserver, rate limiting, caching
        • not maintained
      • Apify
        • easy output encoding
    • Sinatra style
      • Slim
      • Fat-free
      • Express node.js
    • Why slim?
      • comparable to node.js express
      • very lightweight
      • extensible via middleware
      • maintained!
  • A simple echo server
    • POST /echo
    • GET /echo/1
    • PUT /echo/1
    • DELETE /echo/1
    • GET /echo/1
  • RESTful web services