SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
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
Websites
Web apps
Websites, web apps +

Syndication
Interoperability
Outsource complexity
Reuse application components
Mashups and unforeseen...
Flickr
Google AdWords
Google Maps
hostip.info
NOAA Weather Service
Yahoo Geocoding
Yahoo 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 codes
If you get 200 then all is ok.

If you get 3xx 4xx 5xx then something went wrong.

3xx = it's moved
4xx = client error
5xx = server error

404 = not found
418 = i'm a teapot
500 = internal server error
503 = service unavailable
REST example - Amazon S3
Amazon S3 based on two concepts:

   Bucket
      name

   Object
      parent bucket
      value (the data)
      key (name)
      metadata (key/value pairs)
REST example - Amazon S3

Resources:

  List of your buckets
      http://s3.amazonaws.com/

  A bucket
     http://s3.amazonaws.com/{bucketname}/

  An object
     http://s3.amazonaws.com/{bucketname}/{objectname}
REST example - Amazon S3
Methods:
Types of web service in Drupal


                               Blog API
   Views Datasource
   (read only)


          Services v3   Services v2



     Views Atom
     (read only)
Views Datasource

Multiple 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 Atom

Style plugin
  Alternative Feed style that generates Atom not RSS

RDFNode Row style plugin
  Serializes arbitrary node to XML, including CCK fields


Useful with Feeds Atom to move content between Drupal sites.
http://tagging.darrenmothersele.com/node/42/atom
Services v3 - the future
Fully RESTful web services now possible in Drupal
REST on a node

CRUD

create:    POST /node
read:      GET /node/1
  index:   GET /node
update:     PUT /node/1
delete:    DELETE /node/1
Services 3 extensions to CRUD

Actions, eg:

POST /node/publish_my_drafts

Targeted actions, eg:

POST /node/1/publish

Relationships, eg:

GET /node/1/comments
Response formats

XMLRPC returns XML
JSONRPC returns JSON

REST format agnostic:

http://example.com/node/1.xml
                                 returns XML
http://example.com/node/1.json
                                 returns JSON
http://example.com/node/1.php
                                 returns serialized-PHP
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

Weitere ähnliche Inhalte

Was ist angesagt?

My First Hadoop Program !!!
My First Hadoop Program !!!My First Hadoop Program !!!
My First Hadoop Program !!!Ayapparaj SKS
 
Hive : WareHousing Over hadoop
Hive :  WareHousing Over hadoopHive :  WareHousing Over hadoop
Hive : WareHousing Over hadoopChirag Ahuja
 
Attack on graph
Attack on graphAttack on graph
Attack on graphScott Miao
 
Introducing JDBC for SPARQL
Introducing JDBC for SPARQLIntroducing JDBC for SPARQL
Introducing JDBC for SPARQLRob Vesse
 
Apache Spark - Dataframes & Spark SQL - Part 2 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 2 | Big Data Hadoop Spark Tutori...Apache Spark - Dataframes & Spark SQL - Part 2 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 2 | Big Data Hadoop Spark Tutori...CloudxLab
 
Hive and HiveQL - Module6
Hive and HiveQL - Module6Hive and HiveQL - Module6
Hive and HiveQL - Module6Rohit Agrawal
 
Multi faceted responsive search, autocomplete, feeds engine & logging
Multi faceted responsive search, autocomplete, feeds engine & loggingMulti faceted responsive search, autocomplete, feeds engine & logging
Multi faceted responsive search, autocomplete, feeds engine & logginglucenerevolution
 
Yahoo! Hadoop User Group - May Meetup - HBase and Pig: The Hadoop ecosystem a...
Yahoo! Hadoop User Group - May Meetup - HBase and Pig: The Hadoop ecosystem a...Yahoo! Hadoop User Group - May Meetup - HBase and Pig: The Hadoop ecosystem a...
Yahoo! Hadoop User Group - May Meetup - HBase and Pig: The Hadoop ecosystem a...Hadoop User Group
 
Hadoop first mr job - inverted index construction
Hadoop first mr job - inverted index constructionHadoop first mr job - inverted index construction
Hadoop first mr job - inverted index constructionSubhas Kumar Ghosh
 
21servers And Applets
21servers And Applets21servers And Applets
21servers And AppletsAdil Jafri
 
Poster Declaratively Describing Responses of Hypermedia-Driven Web APIs
Poster Declaratively Describing Responses of Hypermedia-Driven Web APIsPoster Declaratively Describing Responses of Hypermedia-Driven Web APIs
Poster Declaratively Describing Responses of Hypermedia-Driven Web APIsRuben Taelman
 
Xcap tutorial
Xcap tutorialXcap tutorial
Xcap tutorialwanglixue
 
Replacing ActiveRecord With DataMapper
Replacing ActiveRecord With DataMapperReplacing ActiveRecord With DataMapper
Replacing ActiveRecord With DataMapperPeter Degen-Portnoy
 
Cassandra Summit 2015 - A Change of Seasons
Cassandra Summit 2015 - A Change of SeasonsCassandra Summit 2015 - A Change of Seasons
Cassandra Summit 2015 - A Change of SeasonsEiti Kimura
 

Was ist angesagt? (20)

03 hive query language (hql)
03 hive query language (hql)03 hive query language (hql)
03 hive query language (hql)
 
Pig
PigPig
Pig
 
My First Hadoop Program !!!
My First Hadoop Program !!!My First Hadoop Program !!!
My First Hadoop Program !!!
 
Hive : WareHousing Over hadoop
Hive :  WareHousing Over hadoopHive :  WareHousing Over hadoop
Hive : WareHousing Over hadoop
 
Apache hive
Apache hiveApache hive
Apache hive
 
Attack on graph
Attack on graphAttack on graph
Attack on graph
 
Introducing JDBC for SPARQL
Introducing JDBC for SPARQLIntroducing JDBC for SPARQL
Introducing JDBC for SPARQL
 
Apache Spark - Dataframes & Spark SQL - Part 2 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 2 | Big Data Hadoop Spark Tutori...Apache Spark - Dataframes & Spark SQL - Part 2 | Big Data Hadoop Spark Tutori...
Apache Spark - Dataframes & Spark SQL - Part 2 | Big Data Hadoop Spark Tutori...
 
Hive and HiveQL - Module6
Hive and HiveQL - Module6Hive and HiveQL - Module6
Hive and HiveQL - Module6
 
Hive(ppt)
Hive(ppt)Hive(ppt)
Hive(ppt)
 
Multi faceted responsive search, autocomplete, feeds engine & logging
Multi faceted responsive search, autocomplete, feeds engine & loggingMulti faceted responsive search, autocomplete, feeds engine & logging
Multi faceted responsive search, autocomplete, feeds engine & logging
 
Yahoo! Hadoop User Group - May Meetup - HBase and Pig: The Hadoop ecosystem a...
Yahoo! Hadoop User Group - May Meetup - HBase and Pig: The Hadoop ecosystem a...Yahoo! Hadoop User Group - May Meetup - HBase and Pig: The Hadoop ecosystem a...
Yahoo! Hadoop User Group - May Meetup - HBase and Pig: The Hadoop ecosystem a...
 
Hadoop first mr job - inverted index construction
Hadoop first mr job - inverted index constructionHadoop first mr job - inverted index construction
Hadoop first mr job - inverted index construction
 
21servers And Applets
21servers And Applets21servers And Applets
21servers And Applets
 
Solr Architecture
Solr ArchitectureSolr Architecture
Solr Architecture
 
Poster Declaratively Describing Responses of Hypermedia-Driven Web APIs
Poster Declaratively Describing Responses of Hypermedia-Driven Web APIsPoster Declaratively Describing Responses of Hypermedia-Driven Web APIs
Poster Declaratively Describing Responses of Hypermedia-Driven Web APIs
 
Xcap tutorial
Xcap tutorialXcap tutorial
Xcap tutorial
 
Replacing ActiveRecord With DataMapper
Replacing ActiveRecord With DataMapperReplacing ActiveRecord With DataMapper
Replacing ActiveRecord With DataMapper
 
Cassandra Summit 2015 - A Change of Seasons
Cassandra Summit 2015 - A Change of SeasonsCassandra Summit 2015 - A Change of Seasons
Cassandra Summit 2015 - A Change of Seasons
 
xcap
xcapxcap
xcap
 

Ähnlich wie Drupal web services

Deploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application ServerDeploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application Serverwebhostingguy
 
Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...
Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...
Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...Vlad Savitsky
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Igor Moochnick
 
Services in Drupal 8
Services in Drupal 8Services in Drupal 8
Services in Drupal 8Andrei Jechiu
 
RestFul Web Services In Drupal 8
RestFul Web Services In Drupal 8RestFul Web Services In Drupal 8
RestFul Web Services In Drupal 8Gajendra Sharma
 
GoodRelations Tutorial Part 4
GoodRelations Tutorial Part 4GoodRelations Tutorial Part 4
GoodRelations Tutorial Part 4guestecacad2
 
ISWC GoodRelations Tutorial Part 4
ISWC GoodRelations Tutorial Part 4ISWC GoodRelations Tutorial Part 4
ISWC GoodRelations Tutorial Part 4Martin Hepp
 
Drupal as a data server
Drupal as a data serverDrupal as a data server
Drupal as a data serverJay Friendly
 
Getting Started With The Talis Platform
Getting Started With The Talis PlatformGetting Started With The Talis Platform
Getting Started With The Talis PlatformLeigh Dodds
 
The RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with OracleThe RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with OracleEmiliano Pecis
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQLLino Valdivia
 
Linked Data Tutorial
Linked Data TutorialLinked Data Tutorial
Linked Data TutorialSören Auer
 
Import web resources using R Studio
Import web resources using R StudioImport web resources using R Studio
Import web resources using R StudioRupak Roy
 

Ähnlich wie Drupal web services (20)

Wedi2014
Wedi2014Wedi2014
Wedi2014
 
Deploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application ServerDeploying PHP applications using Virtuoso as Application Server
Deploying PHP applications using Virtuoso as Application Server
 
Http and REST APIs.
Http and REST APIs.Http and REST APIs.
Http and REST APIs.
 
Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...
Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...
Yuriy Gerasimov. Drupal Services. Integration with third party applications. ...
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 
Services in Drupal 8
Services in Drupal 8Services in Drupal 8
Services in Drupal 8
 
Web Topics
Web TopicsWeb Topics
Web Topics
 
RestFul Web Services In Drupal 8
RestFul Web Services In Drupal 8RestFul Web Services In Drupal 8
RestFul Web Services In Drupal 8
 
GoodRelations Tutorial Part 4
GoodRelations Tutorial Part 4GoodRelations Tutorial Part 4
GoodRelations Tutorial Part 4
 
ISWC GoodRelations Tutorial Part 4
ISWC GoodRelations Tutorial Part 4ISWC GoodRelations Tutorial Part 4
ISWC GoodRelations Tutorial Part 4
 
Drupal as a data server
Drupal as a data serverDrupal as a data server
Drupal as a data server
 
Getting Started With The Talis Platform
Getting Started With The Talis PlatformGetting Started With The Talis Platform
Getting Started With The Talis Platform
 
Drupal and the Semantic Web
Drupal and the Semantic WebDrupal and the Semantic Web
Drupal and the Semantic Web
 
Services Stanford 2012
Services Stanford 2012Services Stanford 2012
Services Stanford 2012
 
The RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with OracleThe RESTful Soa Datagrid with Oracle
The RESTful Soa Datagrid with Oracle
 
Talking to Web Services
Talking to Web ServicesTalking to Web Services
Talking to Web Services
 
Triplestore and SPARQL
Triplestore and SPARQLTriplestore and SPARQL
Triplestore and SPARQL
 
Linked Data Tutorial
Linked Data TutorialLinked Data Tutorial
Linked Data Tutorial
 
Import web resources using R Studio
Import web resources using R StudioImport web resources using R Studio
Import web resources using R Studio
 
Data in RDF
Data in RDFData in RDF
Data in RDF
 

Drupal web services