Wednesday, October 21, 2009

Re: Targettting Rhino with GWT compiler

On 20 oct, 15:53, Attila Szegedi <szege...@gmail.com> wrote:
> Hi all,
>
> I really like the development model of GWT - using Java for
> development, with all its type robustness and refactoring
> friendliness. I have a rather large JS system that badly needs
> rewriting after five years of incremental spontaneous evolution and I
> consider using the GWT compiler to redo it. The gotcha though is that
> this is not a browser-run front-end application, rather it is a server
> side JavaScript system, using Mozilla Rhino on the JVM as its JS
> runtime.
>
> Am I correct in thinking that I could still use GWT for development -
> I could have my system written in Java, and then compiled to JS by GWT
> compiler and deployed into our Rhino-based server-side runtime system.
> (Before you ask, no, we can't run Java on the server side, we have a
> massively parallel system that absolutely needs continuations to
> retain its scalability).
>
> So, GWT compiler would have no trouble emitting code for a non-browser
> environment?

AFAICT, GWT emits "valid" ECMAScript, so it should run in Rhino
without problem. You'd have to make a special Linker though (the thing
that generates the *.nocache.js and chooses how to output the compiled
JS in either <md5>.cache.html or <md5>.cache.js), as GWT's built-in
linkers expect a "browser runtime".

> Also, would it be possible to have a Rhino runtime as the
> debugger target instead of a browser?

With OOPHM (shipping in GWT 2.0), it shouldn't be a problem (again,
you'd have to write a Rhino-based OOPHM client). I actually believe
the HtmlUnit-based OOPHM client (used for unit tests) runs Rhino (and
simulates a "browser runtime").

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate