Gaia/Architecture Proposal: Difference between revisions

Line 17: Line 17:
Web Applications architecture is built based on the pattern described in this document.
Web Applications architecture is built based on the pattern described in this document.


The pattern is not tied to specific versions of a library nor a framework. It is intended to expose to the browser some of the application logic in order to benefits from the browser architecture.
The pattern is not tied to specific versions of a library nor a framework. It is intended to encapsulate and expose some logical blocks of the application 'blackbox' logic into something that can be understandable by the browser.


As a result it enforces a platform level encapsulation, by having different compartments per logical pieces of code. For more informations on compartments, please see [https://developer.mozilla.org/en-US/docs/Mozilla/Gecko/Script_security#Compartments [1<nowiki>]</nowiki>] [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Compartments [2<nowiki>]</nowiki>] [http://andreasgal.com/2010/10/13/compartments/ [3<nowiki>]</nowiki>] [https://bholley.wordpress.com/2012/05/04/at-long-last-compartment-per-global/ [4<nowiki>]</nowiki>]
As a result it enforces a platform level encapsulation, by having one compartment per logical pieces of code. For more informations on compartments, please see [https://developer.mozilla.org/en-US/docs/Mozilla/Gecko/Script_security#Compartments [1<nowiki>]</nowiki>] [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Compartments [2<nowiki>]</nowiki>] [http://andreasgal.com/2010/10/13/compartments/ [3<nowiki>]</nowiki>] [https://bholley.wordpress.com/2012/05/04/at-long-last-compartment-per-global/ [4<nowiki>]</nowiki>]


In this document 'logical pieces of code' is often referred to as a Client or a Server. But more specific examples for applications can be a particular View, or the view application logic, a main-thread-only WebAPI wrapper, etc.
In this document 'logical pieces of code' is often referred to as a Client or a Server. But more specific examples for applications can be a particular View, or the view application logic, a main-thread-only WebAPI wrapper, etc.
Line 25: Line 25:


Also all applications are hosted web applications, running offline through the use of Service Worker.
Also all applications are hosted web applications, running offline through the use of Service Worker.
Lastly, while various part of the current proposal are directly managed by the application itself, and while this is a deliberated choice in order to prototype things, one of the goal is to move some of them to the platform side.


== Service Worker ==
== Service Worker ==
Confirmed users
230

edits