Kross - Start of a Unified Scripting Approach

has has.temp2 at virgin.net
Fri Apr 14 08:04:29 EDT 2006


Jerry wrote:
> Kind of like AppleScript then?

Same fundamental goal, i.e. language-independent application scripting.
They seem to have a similar sort of approach to decoupling a scripting
language from its host application (Kross::API::ScriptManager vs. the
Open Scripting Architecture API) but a very different approach to the
intercommunication part.

Kross appears to create native language wrappers for the application's
public (C++) classes; nothing fancy, but pretty straightforward. Mac
apps use serialised procedure calls containing first-class queries and
other arguments to describe the action to perform and the application
object(s) to use in that action. A query engine in the application
framework (e.g. Cocoa Scripting) locates the actual object(s) and
applies the appropriate action to them. Much higher level of
abstraction and a lot more sophisticated, though it can be a bit tricky
for application developers to implement (for the same reason).

Plus I get the impression that Kross doesn't do interprocess yet
although it's on the cards, presumably using something like proxy
objects and dbus to provide the bridge. With Macs you only need OSA for
intraprocess communication; the Apple Event Manager, which handles the
messaging part, can pass messages between processes as well.

> Sorry, just starting to learn about some of this stuff (CLI, CLR, CIL,
> etc...) and am interested in understanding better.

As far as how the Mac does it, here's an old but good paper on the
basic principles involved if you want to know more:

http://www.cs.utexas.edu/users/wcook/papers/AppleScript/AppleScript95.pdf

I couldn't find a nice, simple overview of the Kross system. You should
be able to form a rough impression from reading through the following
links, although some better examples of calling Kexi from scripts would
help:

http://wiki.kde.org/tiki-index.php?page=kross
http://www.kexi-project.org/wiki/wikiview/index.php?Scripting
http://www.kexi-project.org/docs/cvs-api/html/namespaceKross.html

HTH




More information about the Python-list mailing list