On Oct 6, 5:42 am, Noor <baken...@gmail.com> wrote:
> Thus, if we resume, GWT helps more in the development phase of
> software development. The end result is similar to the client as
> development with any other framework.

Well, to sum up, yes.
There are 2 main differences though:

 - GWT generates a bunch of scripts, each one dedicated to a single
"configuration", including the kind of browser (there'll be a script
dedicated to Firefox with all the constants for the US English locale,
another dedicated to Firefox for the French locale, another dedicated
to Safari/Chrome for the US English locale, etc.) and a "selection
script" (the *.nocache.js) evaluates the "environment" (which browser?
which locale?) to load the appropriate dedicated script. This makes
the scripts smaller (because they don't include the code needed for
another browser and/or locale and/or etc.) and more performant
(because they don't include if/else checks everywhere to determine the
browser/locale/etc. to know which code branch to run); but the
drawback is that it's based on browser sniffing, not capability
detection, so only some browsers are supported (the 5 main browsers,
in their not-too-old versions), and when a new browser or browser
version comes in, your app might very well break, until you recompile
it with a newer version of GWT that cope for the new browser/browser
version. This is what happened with IE8, and what happens now with
IE9: it'll work OK but only if you ensure it runs in the "emulate the
previous version" mode. Firefox 3.6 broke some apps too at the time
(but it broke as much GWT apps as other pure JS apps).

 - GWT heavily optimizes the generated code. There are "JS compilers"
the optimize JS code (Google Closure Compiler, Yahoo! YUI Compressor,
etc.) but because of JS dynamic nature, the optimizations cannot be as
good as with a statically typed language like Java. The drawback is
that because GWT has to emulate some parts of the Java runtime, it
will also generate more code than you'd have written if you coded
directly in JS (for instance, you'll likely use an ArrayList and a
for(:) loop, ArrayList generates code to wrap a javascript array and a
for(:) loop will instantiate an Iterator for the ArrayList, yet a bit
more code, and all this code costs some bytes, and has to run in the
browser). And the GWT compiler still has room for improvement re.
optimizations.

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to