BlueJscript project specification

With the aim to provide a flexible and powerful engine to instrument BlueJ into a tutorial environment the following aims where identified.

Chosen technologies

The first choice to be made is what kind of scripting language to use. One possibility is to invent the ever new script language but this is both time consuming and error prone. This is what can be chosen to deliver the wanted result.

Only the Javascript engine had the following properties and was therefore chosen as scripting language

The second choice to make is how to allow external programs to intact with BlueJ. Even in this scenario there where a few requirements.

Ruling out the possibility of having some sort of special component to be plugged in the desired platform, the only choice left was to look to a standard way to do some sort of Remote Procedure Call from the chosen client architecture to BlueJ. As usual there are various ways to do it.

The only one protocol that is at the moment reasonably supported by the many platforms and has the most promising future is SOAP over HTTP. This one was then chosen as possible choice to interface external programs to BlueJscript.

System Structure

To better describe the system structure we will be looking at an image that aid us.

Figure 1: Structure of BlueJscript

From the Image we may gather a few points that are worth remembering.

What can be done with BlueJscript

The scripting engine can access all methods of the BlueJ Extension interface, it can therefore drive the extension interface as it desires to, as an example it can load projects. Not only it can send orders to BlueJ but it can also be notified of events happening within BlueJ and then respond to them in the appropriate way. It may wait for an Object to be istantiated and then do something with it.

The HTTP - SOAP server is simply a bridge provider. Its duty is to publish a WebService interface that allows a Javascript command line to be sent to the Javascript engine and have a result back. The power of this approach is that the whole behavior of the WebService interface is therefore delegated to the script and it becomes immediately a flexible mechanism. As an example a WebService client can send a Javascript command line that can load a project in BlueJ.

How to install BlueJscript

You must have BlueJ version 1.3.0 or later running successfully. You then need to download the actual extension from you preferred place. A good place where to start to look for it would be the BlueJ site

If you are reading this you may already have installed the BlueJscript extension, if you have not done so you can get it from here , just make sure that you save it under the extension directory of BlueJ and then restart BlueJ