What in the world is sisula? Sisula stands for ‘simple substitution language’ and it is the key to supporting other databases in our modeling tool. Up until now, the tool was using XSLT to transform XML to SQL. But as it turns out, there are very few people who are fluent in both languages. In that respect, using XSLT was a bad design choice. It also becomes verbose, to say the least, and the code looks quite far from the end result.
So, what we are doing right now is moving towards a template language, in which you write SQL code with some variable names in it. It looks very much like the end result, meaning you only need to have very basic programming skills on top of your SQL expertise in order to write templates. We believe that we will get quicker adoption for other databases using this.
We also wanted a simple way to access the different parts of a model in sisula. Instead of using the XML, and access it using either XPath notation or through DOM traversal, we decided to expose a JSON-compatible object. That way you can use regular object notation to access the parts, which is more familiar and natural. Below is the JSON description of the schema object used in the template above.
Finally, keeping all code together in a single file, as it was previously, turns out to be somewhat limiting as well. By instead having small templates that encapsulate specific pieces of SQL, it makes it much easier for anyone to insert custom templates in between existing ones, or to leave out certain templates altogether. The example above is contained in its own file: CreateKnots.js. Templates are referenced from a directive, that keeps the process together and lists all the template files that should be processed and in which order.
While the Sisulator is in place, we still haven’t ported the old SQL generation to sisula. We expect to have this done before august, and at the same time add concurrent-temporal generation to the tool.