Contenta CMS: Drupal as a single Page App (Notes for Drupal Show N' Tell)

Decoupled Drupal or Headless Drupal. From simple webpage persistence to full blown webapps powered by a drupal backed, the need to separate the frontend and back-end to allow allow drupal site-builders leverage the awesome new potential of javascript libraries like Ember, React and Vue

Refreshless(Drupal Module)

The first step for this site was this module. It requires a core hack which is fine and does not appear to  be compatible with pagination. But it's close enough to plug and play.

"RefreshLess makes navigating your web site faster by only loading the parts that change between pages. Uses the ideas behind Turbolinks technique (pioneered by Rails). But it goes further: thanks to Drupal 8's architecture, we're able to automatically figure out which parts of a page change. So, we only need to send the parts of the page that actually change."

Oddly enough I had to hack the code to enable for non logged in users. The logic being a n anonymous user would have the content so cached that a page refresh wouldn't matter. This went against my use case which was not really about the efficiency of only loading the content that changed but in the fact that the page did not reset and disturb the radio widget. However I have much bigger use case for a SPA.

Contenta CMS

The Contenta CMS is a drupal distribution. It includes the JSON API and some example content to be consumbed by your javascipt frontend. Currently there are a few demos ion development one for each of the major frameworks including React, Angular Ember and Vue.

Contenta CMS  and a javascript consumer of your choice:

Table of consiumers for ContentaCMS

ContentaCMS and Ember as you can see the Ember consumer is in development. I'm helping out where I can. I'm having issue both with the plural/singluar model structure ad dealing with relationships. [edit It was a bug in the new version, required a rollback. [/edit]

My repo is here:

[edit] PRS are now in main repo[/edit]

Reservoir CMS:

I glanced over this effort from Acquia. but it is a very basic distribution that cannot be expanded to cater for comments or other content types. Essenmtially it is a sibset of the ContentaCMS project.


Usage in our  Drupal Online RPG Game:

The idea is to use ember.js to control the states for phaser js using it;s model s, .for the frontend and drupal for the backend alongside a reddit database for player statistics and a websockets communication layer for player movement.

A drupal user = a player character.

I'm considering using a graph database to deal with the relationship between players, npcs, factions and other groups.

Finally I've experimented with using a functional data store for storing player events called event store.

I've built a basic admin section using symfony 2 And have built a few game loops, battle engine modules using various oop patterns (to teach myself the patterns before choosing the most appropriate) .

I'm interested in seeing if/how Drupal might be a replacement for twine.

All of the code can be found on git.