ST2JS - Smalltalk to Javascript translator

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ST2JS - Smalltalk to Javascript translator

Gerardo Richarte
Hola Diego!

        this is genial!

> To use the network from JS in browsers, you have to hack over a HTTP
> requests to a web server. 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...
        However, for security restrictions, most connections you'll be able
to open will be limited to the originating host.

> Firing processes from javascript (in browsers) is, AFAIK, not posible.
> What can be done is a type of multithreading for javascript processes
> (see: http://slipwave.info/#js.cps.Thread)

        You could open new windows or iframes or something. I think this
effectively work on different native processes/threads.

        This sounds like science fiction :-)
        gera



Reply | Threaded
Open this post in threaded view
|

Re: ST2JS - Smalltalk to Javascript translator

tblanchard
 


On Wednesday, August 02, 2006, at 11:06AM, Gerardo Richarte <[hidden email]> wrote:

>>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

Reply | Threaded
Open this post in threaded view
|

Re: ST2JS - Smalltalk to Javascript translator

Diego Gomez Deck
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