Flip Overview

Undo/Redo System

With its program/transaction system, handling undo/redo or history with Flip is simple as giving a name (or any metadata) to a transaction.

Flip will then replay the transaction in reverse (undo) or as originally intended (redo). In the case where a transaction would fail structural validation, Flip will modify the transaction so that it can be replayed.

Therefore, clients do not need to code "action classes" (or anything similar) for every single action applied to the model. The only thing needed is to describe what metadata the client wants to attach to a transaction. Usually this is just a string describing the action.

When the client calls undo () or redo () on the document history, the exact same code path is used. The transaction or its inverse is sent to the server, and the observers are called to allow further examination of the model change.