[squeak-dev] Squeak browser plugin and JavaScript

Bert Freudenberg bert at freudenbergs.de
Mon Sep 6 17:17:33 UTC 2010


(un-cc'ing vmdev)

On 06.09.2010, at 15:02, Rob Withers wrote:

> Hi Bert,
> 
> I should start by explaining why I think the use of JavaScript is desirable. JS enables client side UI and behaviors.   It is back to fat client, with a server publishing the UI and the content, but the UI runs in the client.  JS supports client-side behaviors to respond to mouse over, hover, move?, click, selection, etc.  It is a professional look and feel and accepted industry wide - broad support in modern browsers.
> 
> Let's look at the alternatives you mention, and please correct me if I have the wrong read on it:
> 
> 1) HTML/DOM - no client side behavior.  Not a robust UI.   All static elements.

Huh? All you do in Javascript is manipulating the DOM. Unless you draw your own UI using the HTML Canvas object.

> 2) Serving up JS from Seaside - This is possible I think, using Seaside as the Servlet.  My intention is to use a ToolBuilder, which I am woefully ignorant of, to build UI objects that would get translated to JS.  I think this is my "GWT" solution.  We would just need to figure out the best way to translate Morphic windows to JS.

If you use ToolBuilder you don't have to worry about Morphic. It's whole purpose is to not depend on a particular UI framework.

> 3) Seaside running is the plugin/web page - In the GWT case, Seaside is the Servlet - why not run on the client?  In the v8 case, there is no servlet required, so Seaside would not be explicitly needed.
> 
> 4) Squeak plugin rendering Morphic - I think Morphic is phenomenal. However, it still has a researchy flavor to it.  It has capabilities which are "non-standard" and fails to deliver a look and feel that is "standard", although it is getting better.  There may be solutions to these problems, but I want focus to stay in a widget even if I mouse off, I want the entire border of a window to be resizable, I want table widgets, multi-column list widgets, I like the power of JS for mouse-over/hover in popping up a borderless window for action.   I am sure most of these things can be done with Morphic, but I don't see it yet.   I think one thing I really want is for these windows to exist on the os/browser without being embedded in the Squeak desktop.

I did not suggest to use Morphic.

> GWT(Seaside) and v8 integration are two ways for Squeak to interact with JS.
> 
> 1) GWT emits JS and the JS communicates back to Squeak by talking to a servlet.   Squeak could be located in the client as a plugin or remotely on the server.  Possible latency issues with the server-based solution.
> 
> 2) v8 looks like it publishes objects whose methods are registered as callbacks, such that a mouse event in JS would call the squeak method registered as it's handler.  It only runs in Chrome - what to do about other browsers?
> 
> I barely recall the capabilities of the Squeak plugin.  Doesn't it allow for interactive Morphic in the browser?  

It runs a client-side Squeak in the browser, period. Anything else is optional. Running a Morphic app is one way to use it.

> Since I want JS as my UI, a third approach in addition to GWTSqueak and v8 integration is to write a JS compiler/interpreter/jit in Squeak and run Squeak as a JS plugin in the various browsers.  We would still need to translate Morphic to JS.
> 
> I hope this helps clear up what I am looking for and the reasoning behind it.

Maybe you should re-read what I wrote in my previous message assuming I understood what you wanted ;)

Nothing I suggested required a server for interaction, it was all client-side. 

- Bert -




More information about the Squeak-dev mailing list