Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-incubator-e4-dev] SWT thread in managed runtimes

Excellent info. Thanks, Fabian.

Strands seems to be based on Narrative JS, and as with everything web
related, there are browser issues: Even though they both showed effectively
the same demo, the Narrative JS version ran in Safari but the Strands
version did not.

McQ.



                                                                       
             Fabian Jakobs                                             
             <fabian.jakobs@1u                                         
             nd1.de>                                                    To
             Sent by:                  E4 developer list               
             eclipse-incubator         <eclipse-incubator-e4-dev@eclipse.o
             -e4-dev-bounces@e         rg>                             
             clipse.org                                                 cc
                                                                       
                                                                   Subject
             04/08/08 05:25 PM         Re: [eclipse-incubator-e4-dev] SWT
                                       thread in managed runtimes      
                                                                       
             Please respond to                                         
             E4 developer list                                         
             <eclipse-incubato                                         
             r-e4-dev@eclipse.                                         
                   org>                                                
                                                                       
                                                                       




Mike Wilson schrieb:
>> Since there are no threads on the web...
>>
> If that's true, what does this mean:
>    "...the founders of Ajaxian.com discuss the latest developments,
>    including multithreaded JavaScript technology-powered UIs..."
>
Hard to tell by just reading the talk description. There is currently
only one technology, which allows real multi-threading in AJAX
applications: the Google Gears worker pools
<http://code.google.com/apis/gears/api_workerpool.html>. But these
worker pools are quite limited (e.g. no access to the DOM) and only work
with the gears plugin installed.

There are some pure JavaScript approaches, which try to provide at least
cooperative multi threading but they all require preprocessing.

Interesting projects in this area are:

 - Narrative JavaScript by Neil Mix
<http://www.neilmix.com/narrativejs/doc/>: Adds blocking capabilities to
remove all the callbacks from the control flow. Add custom language
extensions and compiles it to plain JavaScript
 - Strands by Kris Zyp <http://www.xucia.com/strands-doc/index.html>:
Uses the "yield" operator present in FireFox 2 to achieve cooperative
multithreading and "pseudo"-blocking for asynchronous events. Strands
can transform the code containing the yield statement into JavaScript
code without yield statements.

There are some more projects I don't remember right now.

The basic problem these projects want to solve is that once you are
asynchonous e.g. by calling the server, you have to stay asyncronous in
the whole call stack. There is no way of synchronization or blocking for
an event. You really have to be careful to not clutter the API with all
those callback parameters, otherwise the control flow of the application
will be very hard to understand and debug.

I guess this will be a hot topic in bringing SWT to the browser.


Best Fabian

--
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas
Gauger, Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn,
Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren

_______________________________________________
eclipse-incubator-e4-dev mailing list
eclipse-incubator-e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipse-incubator-e4-dev




Back to the top