ST2JS - Smalltalk to Javascript translator

Diego Gomez Deck DiegoGomezDeck at consultar.com
Thu Aug 3 09:44:11 UTC 2006


Hi Tood,

In Asteroid (my implementation of Comet for Komanche) I'm using exactly
an hidden IFRAME (to keep the connection opened and inject JS code when
needed) and JSON format (to interchange objects between Squeak and the
internet-browsers).

Cheers,

-- Diego

> >>Plain sockets are just not available for JS
> >> code.
> >
> >	That's one and the most standard way, you can also try using the
> >HTTPXMLRequest, a trusted ActiveX object which can be used from Internet
> >Explorer, Mozilla, etc. Works in windows and unix, and AFAIK Ajax heavily
> >uses it. I think this HTTPXMLRequest will be more and more standard, as
> >more web applications start using it. And XML is not a bad option...
> 
> The call is mis-named.  XML is not required and most developers are
> using JSON as the data format.
> 
> >	However, for security restrictions, most connections you'll be able
> >to open will be limited to the originating host.
> 
> This can be worked around by using hidden iFrames if you really need
> it.
> 
> -Todd Blanchard





More information about the Squeak-dev mailing list