Flow/Architecture/Front-end
< Flow | Architecture
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on any information on this page. |
Principles edit
The Ten Commandments of Flow Front-End Development:
- Thou shalt not generate HTML in JavaScript, for that is what templating is for.
- Thou shalt use interactive and API handlers to bind events to buttons, in place of binding events in JavaScript.
- Thou shalt not use FlowBoardComponent directly, for this purpose Shahyar hath given thee <something else>
Templating edit
Structure of API response edit
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 edit
FlowStorageEngine
uses third-party engine storer.js
Primarily using sessionStorage, long-term storage doesn't have a lot of space (ResourceLoader using it).