jeudi 19 février 2009

How to speed up the GWT compilation without modifying the UserAgent.xml etc...

If you search on the web a way to reduce the compilation time of you GWT application you would find many results !

Some articles explain that you can use the permutation configuration to compile a french application for IE6 for instance and not a french-english-deutsch-and-so application for firefoxilla-ie6-opera-andso !

They explain also that you can easily modify the UserAgent.xml and the I18N.gwt.xml files from the GWT distribution to set the locale and user agent you want to use to compile...

Unfortunatly, if I ask to my BOSS if I can modify those files and create a "GWT-1.5.3-with-my-funny-modification-to-reduce-compilation" distribution, I think he would kill and fired me for non quality suggestion and silly way so solve problem ! (Sorry guys, just kidding)

Here is some results sample :

http://vinaytech.wordpress.com/2008/11/10/gwt-compiler-compiling-for-...

http://blog.bazoud.com/post/2008/07/31/Can-I-speed-up-the-GWT-compiler
http://blog.bazoud.com/post/2008/07/31/Can-I-speed-up-the-GWT-compile...
http://blog.bazoud.com/post/2008/07/31/Can-I-speed-up-the-GWT-compile...

http://www.youenchene.fr/2008/08/petite-astuce-pour-gwt.html

http://www.ongwt.com/post/2008/08/11/How-do-speed-up-the-GWT-compiler

http://www.scribd.com/doc/9692542/How-to-Speedup-Gwt-Compiler

If you read these articles, they explain how to reduce the compilation but you have to modify your module xml file also and if you use continuous integration you would have a only frenchy-firefoxed application for instance after the continuum/hudson build !!!

But if you RTFM you would find this page "Defining a Module: the Module XML File" and in this paragraph "Renaming modules" :
The <module> element supports an optional attribute rename-to that causes
the compiler to behave as though the module had the name specified. Renaming a
module has two primary use cases:

* to have a shorter module name that doesn't reflect the actual package structure
* to create a "working module" to speed up development time by restricting the
number of permutations

com.foo.WorkingModule.gwt.xml:

<module rename-to="com.foo.MyModule">
<inherits name="com.foo.MyModule" />
<set-property name="user.agent" value="ie6" />
<set-property name="locale" value="default" />
</module>

When WorkingModule.gwt.xml is compiled, the compiler will produce only an ie6
variant using the default locale; this will speed up development compilations.
The output from the WorkingModule.gwt.xml will be a drop-in replacement for MyModule.gwt.xml
because the compiler will generate the output using the alternate name.

To use a renamed module in hosted mode, it is necessary to use the "physical" name
(i.e. com.foo.WorkingModule) in the URL path, while otherwise referring to
com.foo.MyModule in the host HTML page.

So do you still need to modify google GWT distribution file to provide your own distribution ? Maybe if you use the -noserver option and GWT 1.5.3

Just create a new file called myDevModule.xml :

<module rename-to="com.foo.MyModule">
<inherits name="com.foo.MyModule" />
<set-property name="user.agent" value="ie6" />
<set-property name="locale" value="default" />
</module>

On my project, this solution is a very good news ! I can now compile in less than 2 minutes !!! A few days ago, I needed to wait for 10 minutes to compile on my computer...

But in the next GWT 1.6 release we will have a new way too avoid wasting time with compilation because the Draft Compile flag will become a real option and not only a patch (I Hope)

Hope that help !

PS: This trick does not work with the -noserver option... see this post on google group : http://groups.google.fr/group/Google-Web-Toolkit/browse_thread/thread/38ff8bedd038ec68?q=Manage+developement+and+production+environnement#beff4307165969c7
Here is the issue : http://code.google.com/p/google-web-toolkit/issues/detail?id=2976

dimanche 8 février 2009

"Nord-pas-de-Calais Lille Java User Group" ou Ch'ti JUG ?!

Cela fait plusieurs fois que l'idée me traverse l'esprit mais c'est la première fois que je passe le pas et que je me décide à coucher l'idée sur la toile !

Il existe de nombreux JUG (Java User Group) en France et ils sont très actifs ! voir de plus en plus actif si j'en crois mes flux RSS !

A en croire les billets de certains blogger assidus du monde de Java J2EE comme le touilleur ou Eric Lefevre, les JUG sont de plus en plus répandus en France SAUF DANS LE NORD !!!

Si c'est pas une honte ça ! Avec tout le beau monde qu'on a, on est même pas capable de maintenir un JUG digne de ce nom... Et nos amis les belges, juste à côté de nous, ont un JUG extrement bien développé puisqu'ils organise la "petite" conférence Devoxx... (> 3000 participants !!! voir parleys.com)

Alors je ne sais pas ce que vous en pensez VOUS qui êtes du Nord de la France, mais organiser un JUG peut se révêler une expérience professionnelle très riche et valorisante pour les organisateur et les participants !

Si vous, votre entreprise ou même votre voisin êtes motivés pour monter ce type de projet, alors n'hésitez pas à me contacter ! Je suis sur la métropole Lilloise et je pense qu'on se doit d'avoir un JUG sur Lille, 4eme agglomération française... et même pas un JUG...

Pour ce qui est du nom du JUG, étant dans le nord, je pense que seul le Ch'ti JUG ou le Ch'tio JUG peut etre retenu... Ca fait partie des choses qui s'imposent dans le Nord.

Pour le logo, une idée ?

samedi 7 février 2009

GWT 1.6 M1 Release

Hi every GWT fans !

Just a post to relay the GWT 1.6 M1 release yesterday !

Here is the original announce on the GWT group:

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/3e7e6cc3b35ad98a

You can download it on the GWT download page:

http://code.google.com/p/google-web-toolkit/downloads/list?can=1&q=1.6.0

Or here directly if you can wait to get it :

http://google-web-toolkit.googlecode.com/files/gwt-windows-1.6.0.zip

To remember you, here is the GWT 1.6 roadmap from the google web site here:

http://code.google.com/intl/fr/webtoolkit/makinggwtbetter.html#roadmap

Release 1.6

Anticipated Time Frame - Q1 2009

  • New compiled file deployment structure
    • Easily compile into a WAR file, making it easy to deploy your compiled GWT application into standard servlet containers
  • Migration from Tomcat to Jetty hosted mode server
    • A more pluggable architecture for the hosted mode server will enable developers to use servlet containers other than Tomcat with the Hosted Mode browser
  • Uniform event handlers
    • Event handlers will be implemented in a uniform fashion across all widgets, with listeners deprecated
  • DatePicker, LazyPanel migrated in from incubator
    • New widgets from the incubator
  • String performance improvements
    • StringBuilder uses deferred binding to optimize string appends per-browser
  • Compiler performance improvements
    • 1.6 will introduce parallel permutation compilations and other performance tweaks for faster compiles
Hope that helps !