OpenBaseMovil
Welcome at » OpenBaseMovil-script 0.1 released

OpenBaseMovil-script 0.1 released

We have just released openbasemovil-script-0.1, this is the first revision that we have uploaded. There is still work to do, but the system is running fine and you can create your scripts and extend the script language (please, send your contributions to the project).

We have called the language bmScript, it is an object oriented scripting language, with a syntax very similar to Java, C++ or C#, but a lot easier.

While it is easy, we have designed it to be easily extensible, both the core language it self and the virtual machine interface to “the outer world”. That means that new keywords can be added very easily, and (that will be far more common) you can extend the reach of the language to whatever you want just by providing the appropriate proxy classes.

Lets see the famous Hello World! example with bmScript:

class HelloWorld
{
    method void main()
    {
        system.println( "Hello World!" );
    }

}

Unlike Java, bmScript supports multiple inheritance and has no notion of interfaces. You can extend a class from one or more super-classes, and in case of method conflict the one that belongs to the first declared super-class is used.

Like Java, each class must go in it’s own file with the same name and it is case-sensitive.

class foo
{
    method String sayHello()
    {
        return "hello ";
    }
}
class bar
{
    method int calc( int i1, int i2 )
    {
        return ( i1 + i2 );
    }
}
class foobar : foo, bar
{
    method void main()
    {
        // Will show: hello 25
        system.println( (sayHello() + calc( 10, 15 )) );
    }
}

The next article will be a more in depth look to the language and how can you extend it, with samples from the upcoming releases of OpenBaseMovil-db and OpenBaseMovil-ui libraries that allow the script to access the database engine and the ui toolkit, respectively.

Please, leave your comments. We have big plans for this engine (and the rest of the OpenBaseMovil project), such as running in other platforms like Android, Windows Mobile, Black Berry and Symbian (it actually works through the jvm, but we mean directly for better control and speed).

BlogLinesdel.icio.usDiggFacebookGoogleGoogle ReaderYahoo! MyWebNewsgatorNewsvineredditSlashDotStumbleUponTechnorati

Leave a Reply

You must be logged in to post a comment.