not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

2.7 KiB

Architecture

Global overview

Sugarizer is fully written in HTML5 and JavaScript.

Sugarizer is composed of three components:

  • Sugarizer Core implements the main Sugarizer UI (home view, list view, Journal view, neighborhood view) and is the launcher for activities.
  • Sugar-Web contains JavaScript libraries and CSS styles which expose UI and functions to handle Journal, collaboration and controls.
  • Activities is the set of pedagogic activities included in Sugarizer.

Sugarizer Core is independant of activities. Sugarizer Core has it's own index.html and redirect the browser to the index.html for activities when an activity is launched. The UI of Sugarizer Core use the Enyo Framework and, like activities, rely on Sugar-Web to handle Journal and collaboration.

Sugar-Web use localStorage and IndexedDB features of the browser to store Journal content. localStorage is use to store metadata entries, IndexedDB is use to store data entries. localStorage also contains user settings. Sugar-Web use Web Sockets for real time communication (presence) with the server and XmlHttpRequest calls on the server REST API to handle remote Journal. Sugar-Web rely on require.js to handle JavaScript libraries dependancies.

Activities must use Sugar-Web but could be written using any existing JavaScript framework. Most activities are written without any framework (vanilla JS), some are written using ReactJS, Vue.js, Enyo or other frameworks. When an activity is called by Sugarizer Core, the QUERY_STRING contains calling context. See the dedicated tutorial for more about activity development.

Portability

The main conception rule of Sugarizer is that all platforms must share the same source code. So Sugarizer run the same JavaScript/HTML5 code whatever device used: web, mobile or computer.

To do that, the JavaScript/HTML5 code used for the web application is encapsulated into a container to be packaged as an application. See below how it works.

Mobile App

On mobile platforms (Android, iOS), Sugarizer rely on Cordova to package the source code as a native application.

On Android, it's possible to build Sugarizer as a launcher to be able to run native applications directly from the home view. This feature is implemented in a dedicated Cordova plugin named cordova-plugin-sugarizeros.

Desktop App

On desktop platforms (GNU Linux/Mac OS/Windows), Sugarizer rely on electron to package the source code as a native application.