Commit 1abef133 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

doc/browser-dev.org: browser development doc, draft

parent 2a52bc55
#+TITLE: Vidjil Algorithm -- Browser development documentation
#+AUTHOR: The Vidjil team (Marc, Mathieu, Mikaël and Tatiana)
** Architecture
The Vidjil browser is a set of /views/ linked to a same /model/.
The model keeps the views in sync on some global properties,
most notably dealing with the selection of clones, with the clone filtering,
as well with the locus selection.
- The model (=js/model.js=) is the main object of the Vidjil browser.
It loads and saves =.vidjil= json data (either directly from data, or from a local file, or from some url).
It provides function to access and edit information on the clones and on the global parameters
It keeps all the views in sync.
- Each of the views (=Graph=, =ScatterPlot=, =List=, =Segment=) is rendered inside one or several =<div>= elements,
and kept sync with the model. All the views are optional, and several views of the same type can be added.
See =js/main.js= for the invovcation
- The link with the patient database/server is done with the =Database= object (=js/database.js=)
- Other objects: =Report=, =Shortcut=
** Integrating the browser
*** HTML and CSS
- The =index.html= contains the =<div>= for all views and the menus
- The CSS (=css/light.css=) is generated by =less= from =css/vidjil.less=
- The =small_example.html= is a minimal example embedding basic HTML, CSS, as well as some data.
As the menus are not embedded in this file, functionalities should be provided by direct calls to the models and the views.
*** Javascript
- The wonderful library =require.js= is used, so there is only one file to include
<script data-main="js/app.js" src="js/lib/require.js"></script>
- =js/main.js= is the main file that creates the different views and binds them to the model.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment