12
Drupal 8 Web Services CODING AND DEVELOPMENT | Moshe Weitzman | FEBRUARY 7 2013 Thursday, February 7, 13

DrupalCon Sydney: Drupal 8 Web Services

Embed Size (px)

DESCRIPTION

Learn about the brand new Web Services that are in Drupal 8. Core Drupal can now finally read and write entities via a RESTful web service. For example, a native mobile app or Backbone single page web app can now create/read/update/delete nodes, users, terms, etc. without going through the usual web forms. Views will soon offer a Service where you can retrieve view results via a Web Service. Drupal is now cleanly exposed for other servers and software to interact with it. Furthermore, custom bits of Drupal can add their own Services quickly and easily Learn more, and discuss next steps, including web services which Contrib can start building right now. Background information at http://groups.drupal.org/wscci

Citation preview

Page 1: DrupalCon Sydney: Drupal 8 Web Services

Drupal 8 Web Services

CODING AND DEVELOPMENT | Moshe Weitzman | FEBRUARY 7 2013

Thursday, February 7, 13

Page 2: DrupalCon Sydney: Drupal 8 Web Services

Demo

This is the sub headingLorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent vitae sapien sed nisi commodo posuere. Quisque sollicitudin nisi vitae mi. • Single page apps• Native Mobile Apps• Content staging - deploy module• Content sharing - Feeds Module• Add-on projects like Create.js

2

Thursday, February 7, 13

Page 3: DrupalCon Sydney: Drupal 8 Web Services

Demo

This is the sub headingLorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent vitae sapien sed nisi commodo posuere. Quisque sollicitudin nisi vitae mi. • Single page apps• Native Mobile Apps• Content staging - deploy module• Content sharing - Feeds Module• Add-on projects like Create.js

3

Thursday, February 7, 13

Page 4: DrupalCon Sydney: Drupal 8 Web Services

Demo

•REST module backend•GET of an aggregator feed•GET results of a View•DELETE a node

4

Thursday, February 7, 13

Page 5: DrupalCon Sydney: Drupal 8 Web Services

Use Cases

• Single page apps (Backbone)• Native Mobile Apps• Content staging - Deploy• Content sharing - Feeds• Add-ons like Create.js

5

Thursday, February 7, 13

Page 6: DrupalCon Sydney: Drupal 8 Web Services

REST

Representational State Transfer

• An IETF standard very related to HTTP 1.1• Developed by Roy Fielding in 2000• Verbs: POST,PUT,PATCH,DELETE

6

Thursday, February 7, 13

Page 7: DrupalCon Sydney: Drupal 8 Web Services

Capabilities

•CRUD Content Entities•Read View results•Read a dblog record

7

Thursday, February 7, 13

Page 8: DrupalCon Sydney: Drupal 8 Web Services

Response Formats

• JSON-LD• JSON• XML

8

Thursday, February 7, 13

Page 9: DrupalCon Sydney: Drupal 8 Web Services

Developers

• Easy: Use content entities (EntityNG)• REST module plugins (dblog)• Normalizers, Serializers (JSON-LD)• Docs: rest.module tests• D7: Restws and Services projects

9

Thursday, February 7, 13

Page 10: DrupalCon Sydney: Drupal 8 Web Services

The Future

• Update Entity Types to EntityNG• Basic Auth• Entity Reference

• Config entities• Offline/Rich editors apps• Data sync/deploy/migration tools

10

Thursday, February 7, 13

Page 11: DrupalCon Sydney: Drupal 8 Web Services

Credits

• Klaus Purer• Lin Clark• Fago• Acquia

11

Thursday, February 7, 13

Page 12: DrupalCon Sydney: Drupal 8 Web Services

12

Thursday, February 7, 13