GWT 2.5 RC is here!

Posted by Rajeev Dayal - Wednesday, June 27, 2012 at 12:42:00 PM


Today we are excited to announce the GWT 2.5 Release Candidate. 

You can skip past all the information and download this release from our main GWT download page.

GWT 2.5 comes with new optimizations that boast a 20% code size reduction and a 39% reduction in initial download size of the Showcase applicationGWT 2.5 also includes several new features that improve both usability and functionality:


Preview of Super Dev Mode

We have begun work on a replacement for Development Mode that will support more browsers, because it doesn't require any browser plugins. While it is not yet a full replacement, we expect that many developers will already prefer it. Interested early adopters can learn more by reading Introducing Super Dev Mode.


Introducing Elemental

Elemental is an experimental new library for fast, lightweight, and "to the metal" web programming in GWT. It's intended for developers who are comfortable working with the browser API's that JavaScript programmers use. We think it will be an excellent 'thin' library for both mobile and desktop web applications.


Speed and Optimization Improvements

Integration with the Closure Compiler

To further optimize the Javascript generated by GWT, we have integrated Google’s Closure Compiler as an optional backend for the GWT compiler. Yes, there is now comprehensive function and variable inlining, and a graph-coloring-based variable allocator to squeeze even more performance out of your GWT application!

Code Splitter Improvements


The code splitter now has the ability to automatically partition deferred code that is specified by GWT.runAsync() calls. By detecting code fragments that share common functionality and merging them together into a single fragment, the GWT compiler can reduce the size of the leftover fragment that needs to be download after the initial page load. This greatly reduces the latency of loading the first deferred fragment of a GWT application.

ARIA

We’ve added a new accessibility library that has a full coverage of the W3C ARIA standard. In fact, the library is generated from the standard itself! This library makes it easier to correctly set ARIA roles, states, and properties on DOM elements. For more details, have a look at the updated GWT accessibility documentation.


UiBinder and CellWidget Enhancements

GWT 2.5 adds extensions to UiBinder that allow it to support Cell rendering and event handling. In particular, this design enables UiBinder to generate a UiRenderer implementation to assist with rendering SafeHtml, and dispatching events to methods specified by @UiHandler tags.

We’ve also introduced the IsRenderable/RenderablePanel types. When used by an application instead of HTMLPanel, they can significantly improve rendering time and reduce the latency of complex UiBinder UIs. In the case of Orkut, for example, it improved startup latency by 20% and rendering speed by 300%.

Finally, we’d like to thank the many developers, both inside and outside of Google, that contributed to this release candidate. This release contains over 50 patches written by developers that are not part of the GWT team! We are very grateful for all of your contributions.

-Rajeev Dayal and Bhaskar Janakiraman, on behalf of the GWT Team

26 comments:

Pawel Magnowski said...

thanks for this!! it's about time a new version is released; especially among so many rumours that GWT is discontinued in favour of DART.

wishlist:
- GWT compiles to Android code
- SPDY
- GWT code is significantly slower than closure compiled raw js (three.js)
- simpler UiBinder script for including image resources
- File Api
- WebWorkers
- WebSockets

James Wendel said...

@Pawel

* GWT is built around compiling to javascript, don't expect to compile to android anytime soon. If you want something similar, take a look at the "playn" framework, it was developed by Ray and others.
* SPDY is a server (jetty/jboss/tomcat) / client (chrome/firefox/ie) problem, and has little to do with the client scripting language used.

* For HTML5 features (file api, webworkers, websockets), the GWT team has been conservative with what they implement because that functionality is not backwards compatible with non-HTML5 browsers.

Pawel Magnowski said...

with SPDY I meant the bi-directional requests. It would be nice to have some server side support for it in the API.

- Android would be great if it was SWING (with all its fallacies). learning yet another api that could be implemented with an old one is the reason why developers
build 10x more apps for Apple. I'm not trying to start a war here ...

- please give me the option to be non-conservative and enable HTML5 features. I know this would divert resources, so at least try to merge one of the community supplied implementations into the official release channel.

skybrian said...

For HTML5, you might want to check out Elemental :-)

Artem said...

really great news! Especially when there is only one session on GWT on Google IO. And even this one won't be shown LIVE.

What is also missing - bi-directional binding for any field, like for example Knockout.js does.

James Nelson said...

Pawel, for HTML5, elemental is your ticket. It generates html5 wrappers based on browser IDLs, so you get "whatever is supported, as soon as it is supported".

In regards to wanting gwt on android... The suggestion to use PlayN is a good one. The 2.5rc also allows the use of GWT.create in pure java code {although it has some gotcha involved}, it is possible to develop gwt+android+java+ios+flash in a single java codebase.

I am presently working on a swing-like layout abstraction layer for all clients using PlayN, and supporting gwt generators applied to android et al. It's a lot of work, since android != html, but it can be done.

Long story short, if you want bleeding edge functionality, you can definitely get it. Use PlayN, Elemental {elemental.Collections at the very least}, and your code will be blazing fast {provided your algorithms are efficient}.

Shadow_x99 said...

Alright. Stop the train... New features aint what we need. We need COMPILER speed.

It is not normal that compiling 500kb of java code to javascript takes about 10 minutes on a quad-core (2.8ghz per core) with 12gig of RAM.

The Java-To-JavaScript compiler is abysmally slow, and because of that the modify-compile-debug tight loop of development is painful.

I've tried Eclipse
I've tried IntelliJ Ultimate

It's a pain no matter what IDE you use.

Andrei Volgin said...

@Shadow_x99

I have 1MB of code. It compiles in under 2 min for 18 permutations on an old MacPro. And I only compile once or twice per day as I can see most of the changes instantly in DevMode.

Carlos A Becker said...

Is it in a maven repo?

Thomas Broyer said...

@Shadow_x99: modify-compile-debug is not how you're supposed to work with GWT. You're supposed to use DevMode if you want to be productive.

Now with 2.5, you can try SuperDevMode which actually does exactly what you're asking: modify-compile-debug, but compile "on the fly" (more or less), with a resident compiler that can then recompile your app in less than 10 seconds. Works best in Chrome (because it's the only one which supports SourceMaps), which with remote debugging allows you to experience SuperDevMode within Chrome for Android, Mobile Safari (using iWebInspector), or BlackBerry. Should allow you to experience DevMode in browsers that don't have a GWT DevMode plugin too, e.g. Opera or Safari on Windows.

And BTW, Googlers have promised they'll now concentrate on the making the compiler faster and use less memory.

Thomas Broyer said...

@Carlos A Becker: it's in Central (except SuperDevMode). You won't find it at search.maven.org (probably the time they refresh their indexes), but just replace 2.4.0 with 2.5.0-rc1 in your POM and enjoy!

DRye said...

@Shadow_x99

What JDK are you using? I recommend you try the latest version of jRocket. I've seen some crazy build times as a result of the JDK being used.

Riley said...

Our business is built on GWT. It's also a pleasure to work with. Thank you, from the bottom of our hearts!

James Nelson said...

@Shadow_x99

If you want to cut your compile speed massively, try adding the -localWorkers 6 to do multi-threaded compiles. If you have 6 permutations and 8 cores, using 7 localWorkers might peg your cpu, but, for me at least, it turns a 600s compile into ~110s.

If you're just compiling for development testing in JS, the suggestions to use SuperDevMode are your best bet. My 600s compile now takes 23s to do super dev draft compile.

Guru said...

Nice !
Still looking for a complete code coverage tool for GWT apps (both client and server) without having to run it in dev mode

Sasha Kazachonak said...

Good news. And I've heard that Scala support for GWT is coming soon...

ideal idefiks said...

Heyy guys, is there any ETA or Roadmap that you know about when GWT 2.5 will have landed ?

I wanna learn GWT but i think it's better that i start with the new release..

Thanks in advance !

Pavel Lahoda said...

Is there any chance we'll see a more complete support of the Java language ?

To be specific, is there a chance to have complete runtime reflection including ability to see the annotations during the runtime ? That would be cool and it is long overdue for GWT in my opinion. Thanks for feedback.

Pawel Magnowski said...

well yes, I'd like to be able to use Java7 functions in my GWT code. Also, the Eclipse plugin should notify me upfront that this particular function is not implemented ex. String.format()...

Please sort out the "Float32Array" mess I am seeing all over the scene. GWT core has an implementation (that has no use at the moment as WebGL is not there?). GwtGL has another one, GWT-g3d has another.

Elemental has one more, which if I believe doesn't offer any sane way to populate / instantiate

I filed this as an issue already:
http://code.google.com/p/google-web-toolkit/issues/detail?id=7529

Stefaan Vanderheyden said...

The new 2.5 features sound wonderful!

I am particularly interested in the Closure code optimization feature.

I enabled it on one of my projects, and now the compilation fails :-(

error optimizing:JSC_VAR_ARGUMENTS_SHADOWED_ERROR. Shadowing "arguments" is not allowed at com/google/gwt/core/client/impl/Impl.java line 187 : 0

None of my code uses "arguments" as a variable, so this seems to be related to the GWT code itself.

Where would I open a bug report for this issue?

David Chandler said...

@Stefaan You can find the GWT issue tracker here: http://code.google.com/p/google-web-toolkit/issues/list

Tirumalakumar said...

what are the methods available for getting current date,month,year in gwt which are not deprecated

Jarda said...

Thank you guys, thank you very much! :)

Richard Janicek said...

Grew very frustrated with the impedance mismatch between Java and JavaScript when interfacing with JS libraries. Switched to Haxe, and have not looked back since.

Unknown said...

GWT continues to be excellent, and very fast for me.
Mirroring above comments, Android, Reflection and more java support would be nice.

Reg GWT I think it could be done. Of course, we would need to make a alt GUI - and thats fine. I dont expect Android versions of GWTs widgets, but a eclipse plugin setup to share as much code as possible between projects would be nice. (of course, this means your android project would be limited to gwt compatible java, but Id be fine with that too).
--
Finally, long range goal:

WebGLPanel in GWT!

christian said...

hi the community :
gwt 2.5.0 compilation error.
i use now gwt 2.5.0, gxt 2.2.5 but i used gwt 2.0.4,gxt 2.2.1 after
in this day,i had upgraded my gwt from 2.0.4 to 2.5.0 ,gxt from 2.2.1 to 2.2.5.
after this i get the folowing error during the compilation:

com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:109)
at com.google.gwt.dev.jjs.ast.JModVisitor.acceptImmutable(JModVisitor.java:313)
at com.google.gwt.dev.jjs.ast.JMethodCall.visitChildren(JMethodCall.java:250)
at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:241)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
at com.google.gwt.dev.jjs.ast.JExpressionStatement.traverse(JExpressionStatement.java:41)
at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
at com.google.gwt.dev.jjs.ast.JIfStatement.traverse(JIfStatement.java:52)
at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)


could any body help me?
cordialy...