@valzav @svk Let's assume I wanted to build a BitShares UI in the form of a native Android app.
I have little experience with JavaScript, nevertheless I've looked into the BitShares-UI source code and tried my best to understand the architecture of this project.
My plan is to reverse-engineer it a little bit so that I can judge how difficult it would be to port the JavaScript code into Android's native code.
I have these "stupid" questions:
(1) My understanding is that there are two crucial layers in your design:
- the data layer (the dl folder)
- the UI layer (the web folder)
The UI layer is clearly a React.js project.
(a) Does the data layer have anything to do with React or is it pure JavaScript/CoffeeScript project?
(b) Is the data layer able to work "on its own", i.e. without the UI layer? If so, what is the best way to try it out?
(2) Would you be so kind and describe briefly the workflow of the GUI? Especially, I'm curious about these aspects:
(a) What is the sequence of events that happens from the moment the app launches till the moment the it is fully displayed on the screen?
(b) How is caching of data solved? As a GUI user I've noticed that most data is loaded sequentially (i.e. only when it's needed) - is it the case?
(c) How does the UI layer communicate with the data layer? How are changes in the data layer pushed to the UI?
(3) In your README file you mention that:
A javascript CLI environment is also available in the ./cli folder.
This will be a really stupid question: how do I launch this JavaScript CLI?
(4) If I wanted to run the UI step by step in a debug mode, do I need to have it compiled locally with Nodejs or will it be enough to debug the production code hosted on OpenLedger?
If the former is true, does the whole thing compile on Windows? I've had some problems with it.
(5) In the Environment section of your
README file you mention those system variables:
GRAPHENE_UI_HOME=$HOME/bitshares/graphene-ui
export NODE_PATH="$NODE_PATH:$GRAPHENE_UI_HOME/dl/src:$GRAPHENE_UI_HOME/web/app"
When do I need them?
(6) For educational purposes which repository would you recommend me to use:
cryptonomex/graphene-ui or
bitshares/bitshares-2-ui?
Also, the README file is different between those repositories - which one is more up-to-date?
-------------------
I realize I've asked lots questions here and you guys are quite busy with coding.
If that's too much, just answer whatever part of it - every little detail will be helpful for my understanding.
Thank you.