One of the components of the framework on which I have been working particularly hard in the past week is the Script Engine.
It is what it sounds like: a module designed to allow scripting to work inside the framework. Although most definitely still a work-in-progress, it now has a lot of the features I want it to have.
My goals were:
- It should be extremely easy to make an object scriptable (less than ten minutes)
- It should be extremely easy to pass objects to JavaScript
- It should be extremely easy to retrieve objects from JavaScript
- It should be possible to implement other scripting languages in future
I don’t know about the last, as I haven’t tried it yet, but the first three I think I may have succeeded in to some extent.
Basically, to give you the idea of what it does, I’m going to give a code dump showing how the script engine works. You very likely will not be interested. On the other hand, you could. So, I am posting it.