Agent 008

Decoupled Drupal 8 using PouchDB and React

@jlongbottom / @emarchak / @myplanetHQ

Myplanet

@myplanetHQ

Justin Longbottom
@jlongbottom

&

Erin Marchak
@emarchak

Why Decoupled Drupal 8?

What we are going to cover?

  1. Business Cases & Technical Goals
  2. Technical Toolkit
  3. Build Process & Demo
  4. Afterthoughts
  5. Looking forward

Ask us questions at any time!

Goals

Business

  • Technicians that maintain remote solar panel installations
  • Newspage Managers that edit content while commuting
  • Students with confined data limits

Technical

  • Offline first
  • View all the content, all the time!
  • Drupal to JS, without middleware

Tools

Because it's 2016

Drupal 8

React

  • Designed for “building large applications with data that changes over time”
  • Composable Declarative Components
  • Proven to work well with Drupal 8

pouchDB/couchDB

pouchDB Setup

var localDB  = new PouchDB('pouchDBInstance');
var remoteDB = new PouchDB('http://couch/db/instance');

localDB.sync(remoteDB).on('complete', function () {
  // sync success :)
}).on('error', function (err) {
  // 'sync error :(
});
		          

Build Process & Demo

Build Drupal & Friends

Configure Relaxed

Create React App

Afterthoughts

  • How secure is Relaxed?
  • Is Relaxed preferable over custom controllers?
  • How feasible is pouchDB in production?

Looking Forward

  • Let the CMS do what it does best
  • Build native with CouchDB for Android and iOS
  • Unleash your front-end devs!

Thank you

@myplanetHQ