[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[U8] Application startup

We describe the startup process of S8 applications and how to configure S8 systems to run applications in multiple platforms.


S8 is used to implement systems running on multiple platforms.
Each platform has an unique way to package and run applications.
We provide a simple way to start a fresh image with U8 tools included while enabling users to change the image, extending, hiding or removing the U8 tools or any other parts of the system.
The user starts a self guided path on S8 land by downloading or opening a contribution space; then the user continue by modifying/extending the environment and/or writing frameworks.
At a given point in time it can be necessary to instruct the system/contribution to start using the user's changes.
Each time the system/contribution starts, it loads a clean image and makes a lookup of some files/resources/contents. When found those contents are used to continue with execution/installation.
The default behavior (when nothing has changed, a pristine system) is to open the U8 tools. The U8 user can modify the configuration and save changes to create a different startup the next time the system/contribution is run.

How can S8 run on multiple platforms?

A S8 system requires a JavaScript VM to run. JavaScript engines are available on most platforms so we use it as a low level machinery to boot and run the S8 environment.

All platforms instantiate a JavaScript execution context and load a "S8 snapshot". A snapshot is a .js file with JavaScript code that we consider as a "binary" file and contains all we need to start the system (it was generated from Smalltalk code, after fileIn of required code to start the system, and saved in one file as result of evaluating expression "Snapshot contents").
The snapshot can be loaded as one file or fragmented in multiple pieces, e.g. it can be loaded from files:
  1. boot.js - containing boot definitions of a S8 smalltalk structure.
  2. app.image.js - image file containing class definitions and methods required to start the system

The image file can be obtained evaluating "Smalltalk current imageContents", as aString to be be saved to a file (or transferred to another computer to run).

Image launch

The platform will "launch" the image, and it will send the message #launch to the current Smalltalk instance (just after loaded); if exists a method implemented for the message.
The default implementation for Smalltalk>>#launch send the message #launch to all classes in the system and the mesage #evaluate to the global object named LaunchExpression (if it exists as a global object).
The default implementation of #launch for classes do nothing. This message can be implemented to initialize a class just after loading (before launching).

Welcome and U8 tools

(It would be nice to have) a Welcome page with a simple list of steps to start using U8 in the platform.
After welcome screen is closed, the U8 tools are opened in the appropiate layout for the platform.

Related pages