Drupal As A RESTful Backend For Client Side Applications


Published on

Arivn Singla's presentation from Drupal Camp Toronto 2012

1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • We’re hiring Drupal front end developers, module developers, UI/UX designers Also looking for strong devs who don’t know drupal just yet
  • Clients initiate requests to servers; servers process requests and return appropriate responses. Client / Server For example, clients are not concerned with data storage, and the Servers are not concerned with the user interface Stateless Each request from any client contains all of the information necessary to service the request, and any session state is held in the client Cacheable clients can cache responses and the server and responses must therefore, implicitly or explicitly, define themselves as cacheable, or not, Layered System client can’t tell what kind of server they are talking to. Is it the end point server or some middle tier caching server along the way. It makes no difference to them. Uniform Interface A set of guiding principles that should be followed. Relating to the nature of how the data is represented and manipulated.
  • Benefits of REST
  • Examples of existing REST services - Twitter
  • Drupal As A RESTful Backend For Client Side Applications

    1. 1. 11/16/12Drupal As A RESTful BackendFor Client Side ApplicationsFor Client Side Applications
    2. 2. We’re hiring! Arvin Singla 207-90C Centurian DrContact @arvinsingla Markham, Ontario arvin@myplanetdigital.com L3R 8C5us:
    3. 3. GetourselvesarRESTedourselvesarRESTed
    4. 4. REpresentational State Transfer • Architectural Style – Many ways to implement • 5 Primary Constraints to be considered “RESTful” – Client / Server – Stateless – Cacheable – Layered System – Uniform Interface
    5. 5. wRESTlingwith thewebwith theweb
    6. 6. Why do we REST? • Client side and Mobile Applications – Apps load fast, data comes after – Local caching • API data access – Allow others to use your data
    7. 7. RESTful Web API • Web service implemented using HTTP and the principles of REST • Clients interact with RESTful servers over HTTP methods – Create (POST) – Read (GET) – Update (PUT)
    8. 8. RESTrainyourself fromtheexcitement!theexcitement!the
    9. 9. Services Module (3.x) – Creates URL callback endpoints for integrating external applications – Supports multiple interfaces including REST, XMLRPC, JSON, JSON-RPC, SOAP, AMF, etc.
    10. 10. Services Module (3.x) – Supports Drupal core resources, third party integration is done with modules – Authentication and OAUTH support – Performs a full bootstrap :( – Caching in 7.x-dev YAY! (Issue #1791978)
    11. 11. Services Endpoints Create: POST /[endpoint_path]/[resource] + body Retrieve: GET /[endpoint_path]/[resource]/[resource_id] Update: PUT /[endpoint_path]/[resource]/[resource_id] + body Delete: DELETE /[endpoint_path]/[resource]/[resource_id]
    12. 12. Demo time!
    13. 13. cRESTingtowards the futuretowards the future
    14. 14. Drupal 8: The Promise Land • WSCCI: Web Services and Context Core Initiative – Utilizing Symfony 2 HTTP services – Native RESTful services baked into Core
    15. 15. qRESTions?