The Artima Developer Community
Sponsored Link

Artima Developer Spotlight Forum
Google Releases GWT 2.0

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Google Releases GWT 2.0 Posted: Dec 9, 2009 3:54 PM
Reply to this message Reply

Google's open-source Web Toolkit (GWT) has become a popular Web development framework in recent years. GWT allowing developers to write Java code, using familiar Java development tools, and generates highly optimized JavaScript from the Java code base. The GWT compiler takes into account the idiosyncrasies of various browser environments when optimizing its JavaScript output. Google released this week version 2.0 of GWT.

The most visible feature in the latest release is Speed Tracer, a performance profiler that works with the Chrome Web browser. Speed Tracer is not tied to GWT applications: It can be used to profile and analyze the performance of any Web applications. Speed Tracer is a result of performance profiling instrumentation added to the version of WebKit used by Chrome and, therefore, works only in Chrome.

Separating user interface and program logic is a key feature of almost every Web and UI toolkit. However, as UIs become increasing sophisticated, graphic artists and UI specialists often need to work side-by-side with more code-centric developers. Since graphic designers and developers often use different tools and have different working styles, modern UI toolkits need to facilitate easy interaction between developers and designers. Adobe's Flex framework has provided such features for a long time with an XML-based declarative UI language, and GWT 2.0 adds a similar capability with UiBinder:

To construct your UI, simply mix HTML and widget elements declaratively in a UiBinder XML template — a .ui.xml file. You can then place application logic in an associated .java file... UiBinder makes it much easier to involve web designers more directly into the development workflow. For example, developers can copy/paste from HTML mocks provided by a web designer... Incorporating your own custom widgets into a UiBinder template is exactly the same as using any of the built-in widgets...

An equally important aspect of Web application UIs is their fidelity to design when rendering in various browser environments. To that effect, GWT 2.0 introduces layout panels, an abstraction over CSS layout:

Prior to GWT 2.0, even GWT's widgets were not able to fully abstract away some of the layout headaches that can occur. However, GWT 2.0 introduces layout panels that actually do make it possible to reliably create the layout you want... Layout panels create a predictable constraint-based layout system on top of standard CSS. Because it works with CSS, rather than in spite of it, layout panels continue to work predictably in the presence of custom CSS styles that you might need to include.

Since GWT applications run mostly in the browser, minimizing application download time is an important usability concern. GWT 2.0 introduces code splitting, allowing a GWT application to incrementally download to a browser:

Just find a spot in your project where you'd like to chop out some code and use the magic new GWT.runAsync() method to create a split point. By continuing to add split points wherever it makes sense, you can easily and safely slice and dice your application to ensure that the initial download includes only the bare minimum of code necessary to start. The compiler automatically arranges for additional code fragments to be downloaded later. And, unlike manually splitting JavaScript... the GWT compiler does the hard work of ensuring that all necessary dependencies are downloaded in the correct order automatically.

GWT 2.0 also includes numerous compiler improvements, leading to further optimization in the generated JavaScript:

With each new release of GWT, we add compiler optimizations to make compiled JavaScript smaller and faster. That's a big benefit if you have existing GWT projects, because you can simply upgrade, recompile, and — poof — your applications start and run more quickly. Indeed, GWT 2.0 includes some high-impact new optimizations, and we have already seen size reductions in compressed JavaScript ranging from 3% up to over 20%.

What do you think of GWT 2.0?

Topic: Groovy 1.7 Released Previous Topic   Next Topic Topic: A (Brief) History of Object-Functional Programming

Sponsored Links


Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use