Flow/Architecture/Front-end

Principles
The Ten Commandments of Flow Front-End Development:
 * 1) Thou shalt not generate HTML in JavaScript, for that is what templating is for.
 * 2) Thou shalt use interactive and API handlers to bind events to buttons, in place of binding events in JavaScript.
 * 3) Thou shalt not use FlowBoardComponent directly, for this purpose Shahyar hath given thee

Templating
See Flow/Architecture/Templating

Structure of API response
the idea is to have the same general structure to all API responses. The root/posts/revisions split was done so that we can represent both a topic (one revision of each posts) and history (multiple revisions of each postId) in the same structure.


 * roots.
 * posts

Root is a topic.

Storing state
uses third-party engine storer.js

Primarily using sessionStorage, long-term storage doesn't have a lot of space (ResourceLoader using it).