Planning for CRAP and entity revisions in Drupal core

download Planning for CRAP and entity revisions in Drupal core

If you can't read please download the document

Transcript of Planning for CRAP and entity revisions in Drupal core

@dickolsson & @timmillwood

Planning for CRAP in core

Track: Core Conversations

Agenda

What and why

Status in contrib

A use case for core

Planning

Discussion, Q&A

Who?

Dick Olsson

@dickolsson

Long time contributor

Maintainer of UUID and Deploy

Works at Pfizer Inc.

Tim Millwood

@timmillwood

Long time contributor

Maintainer of Statistics module

Works at Appnovation

What and why?

Background

CRAP = Create Read Archive Purge

Amsterdam session:
https://amsterdam2014.drupal.org/node/1478

LA core conversation: https://events.drupal.org/node/1005

Not spend much time on what/why

See LA core convo

What?

Revisions for all content entity types

Create / Read will remain same

Archive is a new flagged revision (delete)

Purge removes all revisions of an entity

Compaction will remove old/unnecessary data

Nodes, terms, block content, users, files etc.

Revisions like Git or CouchDB

Compaction not yet in contrib

Why?

Without revisions there's no M in CMS

Improved UX

Common denominator for many use casesWorkflows, moderation etc.

Offline and synchronous editing

Audit and legal (ISO 9001 etc.)

Content staging, network sharing etc.

W/o revs content can only exist, or not exist

W/o revs there's no M in CMS

Improved UX:

Users can always revert revisions for everything

Long tried many use cases w/o common APIs

Solid rev API is the common denominator

Drupal is/needs moving towards all listed use cases

Transition: Core needs an implementation, so...

Status in contrib

Multiversion moduleEnables revisions for ALL content entities

Enables CRAP storage

Relaxed moduleExposes the full data model over REST

Standard API spec with support for common clients
(Hood.ie, PouchDB, CouchDB etc.)

Both modules have alpha release

Relaxed module not fully relevant to this topic

A use case in core

A 30 year old concept from file/content systems...

Mac OS (1984)

Windows 95

Wordpress & Joomla

Drupal 8.2?

trash.module(somewhere to put our CRAP)

Trash module

Ability to delete and restore content entities

Ability to purge (empty) Trash

Great demonstration of the delete flag

Unlikely to conflict with other use cases
(workflow, staging, sync edit etc.)

Demo time!

How do we get there?

Do what you can, with what you have,where you are.

- Theodore Roosevelt

Phase 0 (8.0.0)

Enable revisions by default
https://drupal.org/node/2490136

Any core committers in the room? ;)

Push for attention to this issue!

Phase 1 (8.1.0)

Performance improvements to Revision API

Enable revisions for all content entity types

Introduce revision hash, parent and tree

Data migration

(Nothing above requires API changes!)

Do what you can, with what you have, where you are.

Phase 2 (8.2.0)

Remove ability to NOT have revisions

Delete is a new flagged revision

Introduce purge functionality

Commit trash.module to core

Summary

Improved content management

Improved UX

Common revision API for many use cases

Questions?

@dickolsson @timmillwood

Do we need revisions everywhere in core?

Do we need a Trash module in core?

Is the schedule too slow?

Wanna throw tomatoes? (please don't)