0
Drupal Web Services   Darren Mothersele
Drupal Web Services Uses of web services Classifications of web services Example web service Types of web services in Drupal
WebsitesWeb apps
Websites, web apps +SyndicationInteroperabilityOutsource complexityReuse application componentsMashups and unforeseen...
FlickrGoogle AdWordsGoogle Mapshostip.infoNOAA Weather ServiceYahoo GeocodingYahoo Local Search
iPhone app
Classification of web services
XML-RPC
REST - resource oriented approach...  Method information goes in the HTTP method  Scoping information goes in the URL
HTTP methods
HTTP error codesIf you get 200 then all is ok.If you get 3xx 4xx 5xx then something went wrong.3xx = its moved4xx = client...
REST example - Amazon S3Amazon S3 based on two concepts:   Bucket      name   Object      parent bucket      value (the da...
REST example - Amazon S3Resources:  List of your buckets      http://s3.amazonaws.com/  A bucket     http://s3.amazonaws.c...
REST example - Amazon S3Methods:
Types of web service in Drupal                               Blog API   Views Datasource   (read only)          Services v...
Views DatasourceMultiple data formats RDF, XML, JSON,Configurable using awesome power of Views...
http://tagging.darrenmothersele.com/node/42/
http://tagging.darrenmothersele.com/node/42/json
Views AtomStyle plugin  Alternative Feed style that generates Atom not RSSRDFNode Row style plugin  Serializes arbitrary n...
http://tagging.darrenmothersele.com/node/42/atom
Services v3 - the futureFully RESTful web services now possible in Drupal
REST on a nodeCRUDcreate:    POST /noderead:      GET /node/1  index:   GET /nodeupdate:     PUT /node/1delete:    DELETE ...
Services 3 extensions to CRUDActions, eg:POST /node/publish_my_draftsTargeted actions, eg:POST /node/1/publishRelationship...
Response formatsXMLRPC returns XMLJSONRPC returns JSONREST format agnostic:http://example.com/node/1.xml                  ...
Links  Services  http://drupal.org/project/services  Views Datasource  http://drupal.org/project/views_datasource  Views A...
Drupal web services
Drupal web services
Drupal web services
Drupal web services
Drupal web services
Drupal web services
Drupal web services
Drupal web services
Drupal web services
Upcoming SlideShare
Loading in...5
×

Drupal web services

5,404

Published on

2 Comments
1 Like
Statistics
Notes
No Downloads
Views
Total Views
5,404
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
58
Comments
2
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Drupal web services"

  1. 1. Drupal Web Services Darren Mothersele
  2. 2. Drupal Web Services Uses of web services Classifications of web services Example web service Types of web services in Drupal
  3. 3. WebsitesWeb apps
  4. 4. Websites, web apps +SyndicationInteroperabilityOutsource complexityReuse application componentsMashups and unforeseen...
  5. 5. FlickrGoogle AdWordsGoogle Mapshostip.infoNOAA Weather ServiceYahoo GeocodingYahoo Local Search
  6. 6. iPhone app
  7. 7. Classification of web services
  8. 8. XML-RPC
  9. 9. REST - resource oriented approach... Method information goes in the HTTP method Scoping information goes in the URL
  10. 10. HTTP methods
  11. 11. HTTP error codesIf you get 200 then all is ok.If you get 3xx 4xx 5xx then something went wrong.3xx = its moved4xx = client error5xx = server error404 = not found418 = im a teapot500 = internal server error503 = service unavailable
  12. 12. REST example - Amazon S3Amazon S3 based on two concepts: Bucket name Object parent bucket value (the data) key (name) metadata (key/value pairs)
  13. 13. REST example - Amazon S3Resources: List of your buckets http://s3.amazonaws.com/ A bucket http://s3.amazonaws.com/{bucketname}/ An object http://s3.amazonaws.com/{bucketname}/{objectname}
  14. 14. REST example - Amazon S3Methods:
  15. 15. Types of web service in Drupal Blog API Views Datasource (read only) Services v3 Services v2 Views Atom (read only)
  16. 16. Views DatasourceMultiple data formats RDF, XML, JSON,Configurable using awesome power of Views...
  17. 17. http://tagging.darrenmothersele.com/node/42/
  18. 18. http://tagging.darrenmothersele.com/node/42/json
  19. 19. Views AtomStyle plugin Alternative Feed style that generates Atom not RSSRDFNode Row style plugin Serializes arbitrary node to XML, including CCK fieldsUseful with Feeds Atom to move content between Drupal sites.
  20. 20. http://tagging.darrenmothersele.com/node/42/atom
  21. 21. Services v3 - the futureFully RESTful web services now possible in Drupal
  22. 22. REST on a nodeCRUDcreate: POST /noderead: GET /node/1 index: GET /nodeupdate: PUT /node/1delete: DELETE /node/1
  23. 23. Services 3 extensions to CRUDActions, eg:POST /node/publish_my_draftsTargeted actions, eg:POST /node/1/publishRelationships, eg:GET /node/1/comments
  24. 24. Response formatsXMLRPC returns XMLJSONRPC returns JSONREST format agnostic:http://example.com/node/1.xml returns XMLhttp://example.com/node/1.json returns JSONhttp://example.com/node/1.php returns serialized-PHP
  25. 25. Links Services http://drupal.org/project/services Views Datasource http://drupal.org/project/views_datasource Views Atom http://drupal.org/project/views_atom Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) http://tools.ietf.org/html/rfc2324
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×