One ASPECT of FREST can be nicely separated and used on its own, to great benefit. That is the presentation model.
FREST is based on truly RESTful values at URLs having representations. It adds some more expectations that produce a very flexible protocol for content embedding, where your mind map can contain a drawing, within which is a spreadsheet, in one cell of which is another (or the same) mind map.
It’s really quite simple.
Every FREST endpoint’s value can be presented in the following ways:
icon
cell
row
table header
full
There will be some other, optional ones.
Every FREST endpoint supports a request for its metadata (eg using a HTTP OPTIONS request). Among other things, that metadata includes mustache templates for each of the presentations.
Every FREST endpoint can be retrieved in a JSON representation. That JSON representation can be fed into any of the Mustache templates to produce a representation of the value for each purpose.
Neither JSON nor well-crafted Mustache templates (meaning, ones from which any sort of <script> tag or property are stripped) can represent anything Turing Complete, nor can they express any kind of interaction with the local system. There is always the option of displaying suspicious content in a frame.
The metadata also provides details of known major endpoints that take an argument of this type. We can use this to give every UI element a menu/list of functions when it is right-clicked on.
This is a simple yet profound improvement to an API that supports it — that API comes with a UI for free, and supports embedding in other content.