Drupal As A RESTful Backend For Client Side Applications
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


Drupal As A RESTful Backend For Client Side Applications



Arivn Singla's presentation from Drupal Camp Toronto 2012

Arivn Singla's presentation from Drupal Camp Toronto 2012



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • 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 Presentation Transcript

  • 1. 11/16/12Drupal As A RESTful BackendFor Client Side ApplicationsFor Client Side Applications
  • 2. We’re hiring! Arvin Singla 207-90C Centurian DrContact @arvinsingla Markham, Ontario arvin@myplanetdigital.com L3R 8C5us:
  • 3. GetourselvesarRESTedourselvesarRESTed
  • 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. wRESTlingwith thewebwith theweb
  • 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. 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. RESTrainyourself fromtheexcitement!theexcitement!the
  • 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. 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. 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. Demo time!
  • 13. cRESTingtowards the futuretowards the future
  • 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. qRESTions?