On Tue, Apr 7, 2009 at 2:38 PM, Ian Bambury <[email protected]> wrote:
> GWT isn't Java. It just uses Java syntax so that Java books are useful, and
> things like Eclipse work for it.
I believe the main goal was that you could do a lot of optimization at
compile-time that just aren't possible at runtime (i.e. browser checks for
compatability disappear) & the generated code can be smaller.
>
> GWT code becomes JavaScript. It is never at any point Java.
>
Well, technically, in HostedMode, it is Java with some minor Javascript code
acting as a communication interface.
>
> A very simple compiler might recognise '"Window.alert(" and translate it to
> '"document.alert("
>
> If you whole program consists of Window.alert("Hello"); then it will be OK.
> Anything else will fail.
>
> The Google team have emulated many other commands and structures, but not
> all of them: some are obscure and therefore not high enough up the priority
> list, and some are impossible because, like threading, JS just doesn't do
> that.
>
Threading is possible (or rather will be). Gears & HTML5 browsers introduce
the concept of worker threads.
>
> It would be an impossible task to emulate every possible class in every
> Java library in existence. And would take for ever.
>
Not to mention that some are simply not possible due to browser restrictions
(i.e. most of the java.io. stuff).
>
> So if it ain't emulated, it ain't gonna work because the compiler will
> issue a polite and rather technical version of 'WTF?'
>
> And just throwing any old java program into the GWT compiler is, pretty
> much, pointless.
>
> But if you really want to help Google and emulate
> rg.eclipse.swt.widgets.Canvas
> for GWT, then I'm sure they (and many others) will be eternally grateful for
> at least a week or two :-)
>
> If so, troll your little old lallies over to the very bona
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---