DrupalCon LA Sprint: REST module documentation and "Hello World" Examples of Headless Drupal 8

Events happening in the community are now at Drupal community events on www.drupal.org.
R.J. Steinert's picture
Start: 
2015-05-13 (All day) - 2015-05-14 (All day) America/New_York
Organizers: 
Event type: 
Sprint

I come from the land of CouchDB, Sails.js, and Phreeze. A land where spinning up a RESTful API is but a few commands on the command line. I'm hoping that with a reproducible recipe and a "Hello World" Example, Drupal will prove that it too can kick butt in the modern world. I'm coming to DrupalCon LA this week, flying in Tuesday night. I'll be hanging around the sprint rooms on Wednesday and Thursday trying to come up with a recipe that might go something like...

> composer global require drush/drush:dev-master
> drush quick-drupal --core=drupal-8.0.x
> drush en rest
> drush runserver
> drush entity-create blog
> drush field-create blog title,text,text_textfield body,text,text_textfield
> curl -XPOST http://admin:password@127.0.0.1:8080/api/blog -d '{"title": "First post", "body":"Lipsum."}'
{"id": 1, "title": "First post", "body":"Lipsum."}
> curl -XGET http://admin:password@127.0.0.1:8080/api/blog/1
{"id": 1, "title": "First post", "body":"Lipsum."}

WIP Gist of this here -> https://gist.github.com/rjsteinert/9ade7759cf1535ec7467

If I'm successful in getting a reproducible recipe together, I'll then build a boilerplate Backbone.js App that communicates with the resulting API. Does anyone want to join me in this mission? I have little experience with Drupal 8 so this will be a learning experience for me.

I hope to see you there! If you are having trouble finding me, shoot me an email at rjsteinert@isovera.com.

\\ R.J. Steinert

Comments

Recipe GIST

TodoMVC in Backbone.js/D7 and Angular/D7

R.J. Steinert's picture

A tweet from Josh Koenig alerted me to a Backbone.js/D7 based TodoMCV app from infiniteluke that is based on the Angular/D7 TodoMVC app from Gizra.

Backbone -> https://github.com/infiniteluke/todo_restful
Angular -> https://github.com/Gizra/todo_restful

I suppose the next challenge is to port this to D8.

R.J. Steinert's picture

Drupal 8 + core rest module + jQuery code examples added to REST module documentation: https://www.drupal.org/node/2405657

Headless Drupal

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: