Gaia/Architecture Proposal: Difference between revisions

Jump to navigation Jump to search
m
Line 234: Line 234:
None of the back-end code is allowed to touch the DOM. The DOM is purely own by the front-end side, and since the back-end can run in a Worker accessing the DOM directly is not an option.
None of the back-end code is allowed to touch the DOM. The DOM is purely own by the front-end side, and since the back-end can run in a Worker accessing the DOM directly is not an option.


DOM changes are driven by the front-end that can remotely calls methods of the back-end, or subscribe to some events. For example the front-end can subscribe to any contacts change, and react in order to update its rendering, possibly calling some of the methods available in the back-end.
DOM changes are driven by the front-end that can remotely call methods on the back-end, or subscribe to some events. For example the front-end can subscribe to any contacts change, and react in order to update its rendering, possibly calling some of the methods available in the back-end.


Back-end capsules are loaded on-demand. Initially the back-end does not run, but the front-end can ask for a part of the back-end to serve it, because it either needs to call a method, or to subscribe to a specific event.
Back-end capsules are loaded on-demand. Initially the back-end does not run, but the front-end can ask for part of the back-end to start, because it either needs to call a method, or to subscribe to a specific event.


So back-ends capsule are lazy-loaded, based on the UI needs.
'''So back-ends capsule are lazy-loaded, based on the UI needs.'''


The back-end is also intended to be shutdown at any time if the UI does not need it anymore, or if the app is going into background. This is intended to save resources on low-end devices, that may not be able to runs too many apps at the same time.
The back-end is also intended to be shutdown at any time if the UI does not need it anymore, or if the app is going into background mode. This is intended to save resources on low-end devices that may not be able to runs too many apps at the same time.


== Bridge ==
== Bridge ==
Confirmed users
51

edits

Navigation menu