Wednesday, May 25, 2011

On top of ...

As I said in my post on JTalk it is very easy to run the Rhino JavaScript Engine from Java and therefore should be easy to load JTalk to run this Smalltalk implementation on the JVM.

Stefan picked up the idea and tried it with the following snippet:


ScriptEngineManager factory = new ScriptEngineManager();
ScriptEngine engine = factory.getEngineByName("JavaScript");
engine.eval("var CanvasRenderingContext2D = false;");
engine.eval(new java.io.FileReader("jtalk.js"));
engine.eval(new java.io.FileReader("init.js"));
engine.eval("println(smalltalk.Date._today())");


He did more experiments to make sure calling Java-Classes from JTalk-Smalltalk is possible too.

Today Stefan left a comment on my blog post on "JTalk and JSTalk". He announced that the execution of smalltalk-code on the server-side via Rhino is possible. Details on the remote runner and how you can save your Smalltalk Code to a DB can be found on his blog.

So given enough time (and money) it should be possible to build a Smalltalk IDE using Javas Swing UI library or a Seaside server running on top of Glassfish/JBoss/WebSphere/Weblogic/Geronimo/... app servers, ...

I still doubt that performance would be good. It would make more sense to run it on Googles new Native client.

However - JTalk on Rhino is a nice way to experiment with Smalltalk on top of JavaScript on top of JVM on top of...

No comments: