Saturday, February 09, 2008

Making RoleML easy to learn and easy to use

XML scripting languages can be pretty bad. In this case the use of a scripting language is justifyable, as we need to preserve the transactions now in COODBMS and that means keeping the number of classes reasonable, and XML scripting languages are especially easy to implement. But still RoleML needs to be easy to use and easy to learn or COODBMS will be just another dead project on Sourceforge. So every effort needs to be made at this time to assure success. And yes, I have a plan...

First, I've been thinking about the difference between an API and a scripting language. Methods should be fairly simple and you can use several methods to achieve a particular effect, but in an XML scripting language you want to keep the number of elements in a script to a minimum. So we want to have very powerful and configurable elements, each of which accomplishes a recognizable task. This is achievable using attributes, which can be optional. For example, an addWellKnown element can use a default Role of "rolon" and can have an optional Headline, so that with one element we can create a Rolon and give it a headline. We can also reduce the number of different types of elements in RoleML by using flags. So a make element can have a remove attribute which changes its behavior to be an add.

Second, we should have a tool for composing the XML. This can reduce the syntactic overhead, especially for users unfamiliar with XML as well as making it easy to insert variable data, like text content or base64 encoded byte arrays and serialized objects.

And thrid, good documentation is mandatory. Having a page documenting each RoleML element type seems reasonable. And the documentation should cover the composition tool as well.

Doing all this will ofcourse slow things down. But doing a good job here will more than make up for the time spent. My plan then is to take things one element at a time and complete all the tasks related to that element before proceeding with the next. That's my strategy anyway. Tactics offen dictate a slightly different course when executing a plan.

0 Comments:

Post a Comment

<< Home