Smart desktop documentation

Index

Introduction

The Smart Mobile Studio desktop, also known as Amibian.js, is a distributed, portable, JavaScript powered desktop written in Smart Pascal by Jon Lennart Aasenden. It is the evolution of a demo that has shipped with Smart Mobile Studio from version 1.2 until present, namely the quartex media desktop. A humble example of how you could build a front-end for embedded devices and network active storage systems using standard web technology available everywhere.

Screenshot

Running a UAE session directly in the browser. Forget flash or java, UAE is the ultimate virtual machine.

But the smart desktop is very different from it’s ancestor. First of all it is mouse based just like a real desktop (the quartex media desktop likewise supported mouse, but emphasis was on touch interfaces; which is more common for kiosk systems). Secondly it implements a windowing manager – meaning that it presents applications and content isolated in rectangular windows (also called “forms” in languages like Delphi) – features common for operatingsystems like Linux, OS X and Microsoft Windows.

17240646_10154310397125906_2523605473313802097_o

The node.js backend server makes the system highly portable and portable

The Smart desktop contains code that enables you to host both local and external programs (which can be a normal website or a custom application written spesifically for the desktop) and execute them as they were ordinary, resident applications. It even exposes its own global JavaScript API to the browser – so that developers can write code that interface with the system; opening windows, creating controls and using the styling capacity and theming of the desktop.

The desktop also implements a filesystem. In order to make working with files and data uniform, the entire desktop-system reads all its data via storage-devices much like a real operatingsystem would. Programmers can add support for various storage mechanisms by inheriting from this class and implementing whatever protocol their storage device should encapsulate.

By default the desktop ships with 3 device drivers: ram-disk, web-disk and node.js file drivers.

Ram disk

On some systems, specifially the Amiga line of computers, but also Linux, you can mount the available free ram as a disk-drive. This drive is obviously not permanent, so whatever data you store thre will vanish when the system shuts down. But it is a concept that is quite handy. Most people use ram-disk to unpack zip-files or as a holding space when organizing files.

Cache disk

The cache disk device is a filesystem that targets the browser’s local-storage mechanism. If you mount a cache-disk device, whatever data you store there is ultimately dispatched to localstorage, which is a sandboxed file stored in the cache of the browser. Please remember that localstorage is severely limited. Capacity vary between 5 and 10 megabytes, depending on the browser type, so make sure you check the options of your browser.

It is also important to remember that local storage data is deleted by the browser whenever you flush the cache. The browser can also decide to delete your data if you are low on actual disk-space. Cache disk is not meant as a proper and permanent solution, but rather a place you store user information (like login info and temporary data that is retained for a few days).

If you want long term storage via this device, please see the options in your browser. Some browsers have an option to retain and keep data until you manually remove it.

System disk [node.js server]

This device class will mount whatever folder(s) your node.js Smart server exposes. This is a permanent filesystem, meaning that the user is accessing your real files, and any changes you make via the desktop – happens on the server. So this is for all means and purposes a REAL filesystem.

Note: It is highly recommended that you only share out the designated home-folder for that user (see document structure for the server).

Advertisements