This is a follow-up on the core conversations in Los Angeles that recived lots of positive feedback when suggesting improvements to the Entity Revision API in core.
In this session we will lay out a more concrete and detailed plan of how we can introduce these improvements in Drupal 8.2.x or 9.x.
Short background on the topic
CRAP stands for Create Read Archive Purge which implies that all changes to an entity creates a new revision, even a delete operation is a new revision (much like Git does it). This creates a system much more capable of managing complex workflows, concurrent editing, distributed content, content staging, audit trails etc.
2. Agenda
● What and why
●
Status in contrib
● A use case for core
●
Planning
●
Discussion, Q&A
3. 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
6. 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
7. Why?
●
Without revisions there's no M in CMS
●
Improved UX
●
Common denominator for many use cases
– Workflows, moderation etc.
– Offline and synchronous editing
– Audit and legal (ISO 9001 etc.)
– Content staging, network sharing etc.
8. Status in contrib
●
Multiversion module
– Enables revisions for ALL content entities
– Enables CRAP storage
●
Relaxed module
– Exposes the full data model over REST
– Standard API spec with support for common clients
(Hood.ie, PouchDB, CouchDB etc.)
16. 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.)
19. “Do what you can, with what you have,
where you are.”
- Theodore Roosevelt
20. Phase 0 (8.0.0)
● Enable revisions by default
https://drupal.org/node/2490136
●
Any core committers in the room? ;)
21. 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!)
22. 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
25. 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)
Editor's Notes
Not spend much time on what/why
See LA core convo
Nodes, terms, block content, users, files etc.
Revisions like Git or CouchDB
Compaction not yet in contrib
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...
Both modules have alpha release
Relaxed module not fully relevant to this topic
Push for attention to this issue!
Do what you can, with what you have, where you are.