Helios Kernel

Download the library: helios-kernel-0.9.1.tar.gz [2 kb]
Download the docs: helios-kernel-0.9.1-guide.pdf [290 kb]
Download the source: helios-kernel-0.9.1-src.tar.gz [8 kb]
Contact author: heliosframework@gmail.com

Helios Kernel is an open-source Javascript library which provides an opportunity to manage a Javascript code split into a set of separate modules. Comparing to other script-loading libraries, Helios Kernel introduces an approach which is common in many other programming languages and which is usually available out-of-the box — an opportunity to declare a module's dependences inside the module itself.

To achieve this approach, Helios Kernel library declares the include() function which you may use in the head of your module to include other modules:

include( "path/to/someLibrary.js" );
include( "path/to/someOtherLibrary.js" );

function init() {
    // this function is the module initializer
    // here you may use the objects declared in the included modules
    someLibrary.doSomething();
    var mySomething = new someLibrary.Something();
    someOtherLibrary.doSomethingElse();
}
The benifit of such approach is that when you need to use some module, you don't need to care about its dependences — this is the module creator who should declare all dependences in the module head using the include() function. You will just need to load the single module you are going to use, and then Helios Kernel will load up all the module's dependences and initialize them in the appropriate order.

Using this technique, you may create a complicated structure of dependences between the modules. Split your code, and simply use the include() function in the head when you need some routine. Don't worry about wether some module has already been included — Helios Kernel will take care of loading the needed sources when something is requested for the first time, and will not load it again if the needed module has already been loaded.

Helios Kernel also provides the kernel.require() and kernel.release() functions which you may use to dynamically load and unload the modules (along with all their dependences) at the runtime.

There are also several usefull routines which allow to track the loading process to probably reflect it into the GUI. One of such routines is the kernel.getStatistics() function which reports the detailed information about all of the modules which are being loaded.

Helios Kernel is the client-side library, which means that you don't need an http-server to try it. Simply download the library, unpack it somwhere on your hard drive, and load it into the browser locally. And don't forget to read the documentation.

Author

Who really cares about an author when there's such an amazing library? :-)

Okay, here is a special bonus for those who read until the end: the author is Dmitry Prokashev from St. Petersburg, Russia. The following image generally describes what the author usually looks like (on the left): click




cheers,
the author.