If you need a boost in GWT knowledge, check out these courses:
I am going to teach a Getting started with the Google Web Toolkit course. It is a two day course, aimed at GWT beginners. The course will take place at The Skills Matter eXchange - London, on April 18th and 19th 2011.
If you already know GWT basics, have a look at Dmitry Buzdin's Advanced Google Web Toolkit: Large-Scale GWT Development. This course takes place in late June.
In case you are unsure whether to attend a course or not, we do also offer a free event in April. Come to the In the Brain session Whats new in GWT 2.X on April 19th, 18:30PM at The Skills Matter eXchange.
Wednesday, February 23, 2011
Tuesday, February 1, 2011
GwtAI 0.3
After many years, literally after many years, I managed to make a new release of the GwtAI project. The release is mainly about GWT 2.X compatibility and additionally contains some bugfixes. The JarLinker feature is worth mentioning, check out the API and GwtAI demos to see how to use it. The JarLinker is a neat way to use the GWT tool chain to spit out the resources (Jar file...) required to start your Applet in the browser. For big projects with lot's of dependencies it is probably easier to create the required resources with Ant or Maven.
Thanks to Michael Krog for helping with the project. He is working on some cool stuff for our next release. And also many thanks to the people on the Google Group who do help with support.
Download GwtAI 0.3 from its Google Project Hosting site...
Thanks to Michael Krog for helping with the project. He is working on some cool stuff for our next release. And also many thanks to the people on the Google Group who do help with support.
Download GwtAI 0.3 from its Google Project Hosting site...
Tuesday, December 7, 2010
State of GWT for mobile 2
In my last post I have been talking about different options to use GWT for mobile development. In this post I will focus on one of these options, HTML5 offline web application. HTML5 offline web application continue to work while they are offline. That means such a web application can be loaded just once and run without Internet connection. So here is how I got a GWT application in shape to run as offline app...
It is pretty easy to tell the browser that your web app is offline capable, just add a manifest attribute to the <html> tag:
<html manifest="cache.manifest">
In this cache.manifest file you specify which files shall be stored by the browser for offline usage. The manifest file is a plain text file which lists all resources, the paths are relative to the location of the manifest file. The detailed syntax of this manifest file is specified right here. A very simple cache.manifest file looks like this:
CACHE MANIFEST
CACHE:
Calculator.css
index.html
calculator/0A9476898799A150D840F0B1C3672921.cache.png
calculator/0FD6BF190ECD237B1ED75CD3C37F79D3.cache.html
...
Et voilà your application can run without an internet connection. Now, can you see the problem with GWT? Right... The name of the output produced by the GWT compiler changes with every compile. So the cache.manifest file has to be constructed dynamically. There is a good example by Alex Moffat on the development blog of Lombardi Software. Everything you need to know about GWT linkers, how to write one and how to configure it is explained. Something quite similar has been presented at the Google IO 2010 by Matt Mastracci, check out the video and slides of the talk GWT Linkers target HTML5 Web Workers, Chrome Extensions, and more as well.
So we have a dynamically created cache.manifest file which lists all our resources. There is just one tiny little thing left to be done. The filetype of the cache.manifest file has to be set to text/manifest, otherwise the browser will ignore it. You have to change the web server HTTP Headers configuration. There are different solutions depending on the web server you are using. To make this work in the Apache Tomcat, I have added a .htaccess file to the output directory. The .htaccess file contains one line only:
AddType text/cache-manifest .manifest
So that's it. Deploy you app and open your browser of choice (an HTML5 offline web application capable one of course). The first time your browser should ask you about installing the app for offline usage.

This is only the beginning. There are a couple of iPhone specific meta tags that can be added to your HTML, more about that next time...
It is pretty easy to tell the browser that your web app is offline capable, just add a manifest attribute to the <html> tag:
<html manifest="cache.manifest">
In this cache.manifest file you specify which files shall be stored by the browser for offline usage. The manifest file is a plain text file which lists all resources, the paths are relative to the location of the manifest file. The detailed syntax of this manifest file is specified right here. A very simple cache.manifest file looks like this:
CACHE MANIFEST
CACHE:
Calculator.css
index.html
calculator/0A9476898799A150D840F0B1C3672921.cache.png
calculator/0FD6BF190ECD237B1ED75CD3C37F79D3.cache.html
...
Et voilà your application can run without an internet connection. Now, can you see the problem with GWT? Right... The name of the output produced by the GWT compiler changes with every compile. So the cache.manifest file has to be constructed dynamically. There is a good example by Alex Moffat on the development blog of Lombardi Software. Everything you need to know about GWT linkers, how to write one and how to configure it is explained. Something quite similar has been presented at the Google IO 2010 by Matt Mastracci, check out the video and slides of the talk GWT Linkers target HTML5 Web Workers, Chrome Extensions, and more as well.
So we have a dynamically created cache.manifest file which lists all our resources. There is just one tiny little thing left to be done. The filetype of the cache.manifest file has to be set to text/manifest, otherwise the browser will ignore it. You have to change the web server HTTP Headers configuration. There are different solutions depending on the web server you are using. To make this work in the Apache Tomcat, I have added a .htaccess file to the output directory. The .htaccess file contains one line only:
AddType text/cache-manifest .manifest
So that's it. Deploy you app and open your browser of choice (an HTML5 offline web application capable one of course). The first time your browser should ask you about installing the app for offline usage.

This is only the beginning. There are a couple of iPhone specific meta tags that can be added to your HTML, more about that next time...
Labels:
gwt java iphone android
Tuesday, November 30, 2010
State of GWT for mobile
I've been playing around with developing mobile apps using GWT. Using Java to output cross platform mobile apps seems like a no brainer. So I expected to find tons of examples, but that is not the case. I made a HTML5 offline web application demo for a recent talk on GWT. But this time I was up to create a real mobile app, something that could be published in an app store.
There are a variety of JavaScript frameworks (PhoneGap, jqtouch, Sencha Touch, titanium-mobile and others) tailored to mobile apps. But I could only find a GWT-wrapper project called gwt-phonegap for PhoneGap. PhoneGap has a very neat approach. It consists of two parts, one part is the actual JavaScript framework which provides access to mobile phone features including location data, accelerometer, camera, sound and more. The other part takes care of the integration of our HTML/CSS/JS code into a native mobile phone application. It sets up some type of WebKit view wrapped for all kinds of mobile platforms. Alas I could not get it to work properly. A new version of PhoneGap has been release just lately and gwt-phonegap did not play well with it (at least not in the Android emulator).
So I went back to the HTML5 route. There the a GWT third party library gwt-mobile-webkit which provides access to the HTML5 features of WebKit. That includes the W3C specifications W3C Web Database, W3C Web Storage, W3C Geolocation API and Application Cache API. I've only made a small test application using the location API. I've then used WebKit wrapper part of PhoneGap to make a native app for Android and one for the iPhone. That worked fine so far.
But I have to say, everything is kind of clunky, lot's of back and forth between the different project. And testing on the emulators is no joy either. I definitely want to go back to gwt-phonegap, having only one framework for everything could make things easier.
Anybody out there with a better approach?
There are a variety of JavaScript frameworks (PhoneGap, jqtouch, Sencha Touch, titanium-mobile and others) tailored to mobile apps. But I could only find a GWT-wrapper project called gwt-phonegap for PhoneGap. PhoneGap has a very neat approach. It consists of two parts, one part is the actual JavaScript framework which provides access to mobile phone features including location data, accelerometer, camera, sound and more. The other part takes care of the integration of our HTML/CSS/JS code into a native mobile phone application. It sets up some type of WebKit view wrapped for all kinds of mobile platforms. Alas I could not get it to work properly. A new version of PhoneGap has been release just lately and gwt-phonegap did not play well with it (at least not in the Android emulator).
So I went back to the HTML5 route. There the a GWT third party library gwt-mobile-webkit which provides access to the HTML5 features of WebKit. That includes the W3C specifications W3C Web Database, W3C Web Storage, W3C Geolocation API and Application Cache API. I've only made a small test application using the location API. I've then used WebKit wrapper part of PhoneGap to make a native app for Android and one for the iPhone. That worked fine so far.
But I have to say, everything is kind of clunky, lot's of back and forth between the different project. And testing on the emulators is no joy either. I definitely want to go back to gwt-phonegap, having only one framework for everything could make things easier.
Anybody out there with a better approach?
Labels:
gwt java iphone android
Tuesday, September 14, 2010
Herbstcampus conference 2010
I have published the presentation slides and examples of my Herbstcampus conference talk on my website. In the talk I have presented some of the new features of GWT 2.0. At the end of the talk there were some code demos to showcase the most important new features, including Layout Panels, UiBinder and Code Splitting.

I used a small calculator web application for the example. The code can be found over here...

I used a small calculator web application for the example. The code can be found over here...
Labels:
gwt,
herbstcampus,
java
Sunday, August 22, 2010
Traceurl goes GWT 2.0
I finally managed to update the traceurl.com website to GWT 2.0 (2.0.4 to be precise). Up to now traceurl.com was compiled with a GWT 1.5 compiler. This update should fix a couple of issues with IE8 and bring some overall improvements in performance. The update path was quite smooth, although I had to fiddle with some third party libraries. Let me know in case you experience any problems...
Friday, July 3, 2009
Jazoon 2009 presentation slides available
The Jazoon team has published the presentation slides of this year's conference on the Jazoon homepage. So the slides of my GWT talk are now available for download.
They have also uploaded tons of photos to flickr.
They have also uploaded tons of photos to flickr.
Monday, June 22, 2009
GWT at Jazoon 2009
My GWT session at the Jazoon conference is scheduled at June 23th at 11:00am. At this talk I will not cover typical visual concepts like widgets, layouts and styles but I will give an in-depth view on the true force that is driving GWT. The Deferred binding mechanism and the new Linkers subsystem.
There is a second GWT related talk, right after my session in the same arena. The talk by Ferda Tartanoglu is about Seam integration with GWT.
See the complete presentation program and speakers's list.
There is a second GWT related talk, right after my session in the same arena. The talk by Ferda Tartanoglu is about Seam integration with GWT.
See the complete presentation program and speakers's list.
Friday, May 29, 2009
TVizFX
TVizFX started as a learning project, and I have finally submitted it for the JavaFX Coding Challenge. TVizFX it is by no means complete, but yesterday was the challenge deadline so I had to submit what I got so far...
TVizFX visualizes your Twitter network in diagrams. Currently only a tree layout is supported, but more layouts, such as circular or organic layouts, will be added soon. You can zoom nodes and drag nodes freely. Tweets are faded in above the user's node in the diagram.
Go have a look...
TVizFX visualizes your Twitter network in diagrams. Currently only a tree layout is supported, but more layouts, such as circular or organic layouts, will be added soon. You can zoom nodes and drag nodes freely. Tweets are faded in above the user's node in the diagram.
Go have a look...
JavaFX 1.1
I wrote a small (relatively) JavaFX application using the public Twitter API. As mentioned earlier JavaFX runs fine under Linux although it is not yet officially supported.
I have been using Eclipse for many years. Which means I'm a total Netbeans newbie, but Netbeans generally behaved and I found my way around pretty well. Though the support for JavaFX in Netbeans is not as good as other language support in NetBeans.
The thing I am missing the most in JavaFX are some kind of good component libraries. Chances are good, that the next version is going to solve that one. JavaOne may brings some new things...
I have been using Eclipse for many years. Which means I'm a total Netbeans newbie, but Netbeans generally behaved and I found my way around pretty well. Though the support for JavaFX in Netbeans is not as good as other language support in NetBeans.
The thing I am missing the most in JavaFX are some kind of good component libraries. Chances are good, that the next version is going to solve that one. JavaOne may brings some new things...
Monday, March 30, 2009
Traceurl API
I got a request about a public API (Application programming interface) for Traceurl.com. I already had simple API used by my own Google-Gagdet. The Traceurl.com API provides a set of operations to directly access the Traceurl.com services. It is based on simple HTTP GET requests and returns data in the JSON format.
I wrote short document and some examples, so if you're interested in developing a widget or to integrate Traceurl.com into your application please drop me an email and I'll happily provide the documentation.
I wrote short document and some examples, so if you're interested in developing a widget or to integrate Traceurl.com into your application please drop me an email and I'll happily provide the documentation.
Friday, December 5, 2008
JavaFX 1.0
I have just upgraded the JavaFX demo to work with the all new JavaFX 1.0 release. Alas only the Windows and Mac versions are available as of now, but thanks to this post I was able to get JavaFX 1.0 running on my Linux box.
As far as I can say, there have not been tremendous changes to the API from the pre-release to the final version. I had to adapt some import statements. Rectangle (and probably other shapes) moved from javafx.scene.geometry to javafx.scene.shape and the Font class move from javafx.scene to javafx.scene.text. The font style handling changed a bit, there is no FontStyle class anymore, but multiple boolean attributes on the Font object to control its style. The biggest change is probably that there is no javafx.application package anymore, the entry point of an JavaFX application is the javafx.stage.Stage class now.
On the tool side some compiler options changed or have been removed (-target does not exist anymore), and the applet parameter applicationclass has been renamed to MainJavaFXScript.
Check out the JavaFX homepage they have tons of examples there. Ohhh, and of course have a look at the updated GwtAI JavaFX demo and its source code.
As far as I can say, there have not been tremendous changes to the API from the pre-release to the final version. I had to adapt some import statements. Rectangle (and probably other shapes) moved from javafx.scene.geometry to javafx.scene.shape and the Font class move from javafx.scene to javafx.scene.text. The font style handling changed a bit, there is no FontStyle class anymore, but multiple boolean attributes on the Font object to control its style. The biggest change is probably that there is no javafx.application package anymore, the entry point of an JavaFX application is the javafx.stage.Stage class now.
On the tool side some compiler options changed or have been removed (-target does not exist anymore), and the applet parameter applicationclass has been renamed to MainJavaFXScript.
Check out the JavaFX homepage they have tons of examples there. Ohhh, and of course have a look at the updated GwtAI JavaFX demo and its source code.
Thursday, November 20, 2008
GwtAI - 0.2
I have made a second release of the GwtAI project. Besides some minor bug fixes it now contains a couple of new parameters:
In addition to the new functionality I have separated the core and demo code into two different Eclipse projects. That makes building GwtAI much easier.
Thanks to all the people who have sent me feedback and suggestions!!!
- The LoadingImage parameter sets a custom loading image for the applet. The custom image replaces the default animation that is show during applet loading.
- The SeparateJVM parameter specifies that the applet should run in its own JVM instance (Java Plug-In >= 1.6.0_10 only).
- The JavaArguments can be used to pass JVM command-line arguments to the applet instance (Java Plug-In >= 1.6.0_10 only).
- The JavaVersion parameter specifies which JRE version is required to launch the applet (Java Plug-In >= 1.6.0_10 only).
In addition to the new functionality I have separated the core and demo code into two different Eclipse projects. That makes building GwtAI much easier.
Thanks to all the people who have sent me feedback and suggestions!!!
Thursday, October 9, 2008
Bringing JavaFX and GWT together
JavaFX it the new kid on the Java block. There is a lot of buzz about this new technology. Although it is not quite stable yet and some people think Sun is too late to win the RIA (Rich Internet Application) market. None the less I’m a Java guy, so I just had to have a look at JavaFX. At first I had some problems to understand how things work with JavaFX. They made quite some changes to the API over the course of developing it and lots of the examples on the net are not up to date anymore. This causes some confusion and does not make things easier.
However once I got my first JavaFX code snippet running the next question was how to integrate it into a GWT website. A JavaFX application can easily be compiled into a Java applet. And that is where GwtAI come into play. Have a look at this demo to learn how to integrate JavaFX with GWT. Using GwtAI this only takes a couple of lines of code, the actual compiling and packaging things together was a bit more complicated. The JavaFX support in Eclipse is not that great, and a real pain in the ass is the fact that the GWT compiler does not work with JDK 1.6 (at least not under 64bit Linux) and the JavaFX requires a Java 1.6 environment… Argh… But I figured it out eventually.

Don't miss the demo!
However once I got my first JavaFX code snippet running the next question was how to integrate it into a GWT website. A JavaFX application can easily be compiled into a Java applet. And that is where GwtAI come into play. Have a look at this demo to learn how to integrate JavaFX with GWT. Using GwtAI this only takes a couple of lines of code, the actual compiling and packaging things together was a bit more complicated. The JavaFX support in Eclipse is not that great, and a real pain in the ass is the fact that the GWT compiler does not work with JDK 1.6 (at least not under 64bit Linux) and the JavaFX requires a Java 1.6 environment… Argh… But I figured it out eventually.

Don't miss the demo!
Saturday, September 27, 2008
Traceurl new functionality
Finally after months of promises I made an update of the Traceurl.com website. Now you can upload documents and trace accesses to this documents. The documents are stored in the very popular Box.net service. The new functionality is not yet finished and should be considered as beta. If you run into problems please let me know...
Friday, September 19, 2008
GwtAI - 0.1
Over the last weekend, I have finally made a first release of GwtAI. The project is still in an very early stage, but I got a couple of emails from people all over the world with questions and ideas. So I thought it is time to make something available for those who don't can or want to build GwtAI from SVN. The Applet integration and communication stuff is quite stable and already useful. The tray integration stuff does not yet work on all platforms. I have to read up and do some more tests with JDIC to get it to work on Linux and Mac.
Tuesday, September 16, 2008
Herbstcampus 2008
A couple of hours ago, I arrived in Nürnberg at the Herbstcampus Java conference. The conference is mixed with .Net guys so this promises to be interesting. I'll probably not gonna listen to a lot of .Net talks, still to get some impression from 'the other' (a almost said the 'dark') side may be enlightening. Tomorrow afternoon I am going to give my GWT talk again. Of course I had changed and improved it a bit. The talk is somewhat longer than the one from the Jazoon and I made a completely new demo application. I'll post the code and the presentation on my homepage later on...
Labels:
gwt,
herbstcampus,
java
Wednesday, July 23, 2008
GwtAI - GWT Applet Integration
In the past couple of days I have been working on a third party library to provide cross-browser no-hassle Java Applet integration for GWT. With the upcoming Java SE 6 Update 10 (a.ka. Update N) Sun provides a totally new browser plugin. With this move they want to bring the Java Applet and Web Start technology back. With the ability to drag an Applet outside of the browser and run it in a separate thread, Applets will become kind of equal to Web Start applications. The big advantage of an Applet that Applets are capable to talk back to the website that actually started them. So Applets may experience kind of comeback in the near future.
The GwtAI project is in an early stage, anyway have a look if you like.
The GwtAI project is in an early stage, anyway have a look if you like.
Thursday, July 3, 2008
Jazoon 2008 roundup
So the Jazoon 2008 is over and it was great fun. After my talk on the first conference day I relaxed and was enjoying the rest of the conference. In my book the presentations given by Joshua Bloch, Principal Engineer at Google, were the conference highlights. His presentation are not only informative but also entertaining. The opening sessions and keynotes are available as videos from Parleys, check them out yourself.
Most presentations, including mine, are already available for download from the Jazoon website.
Most presentations, including mine, are already available for download from the Jazoon website.
Tuesday, June 24, 2008
Jazoon day 1 wrap-up
The first day at the Jazoon Conference is over. The Opening Sessions were really interesting. Martin Odersky started out with a talk on Scala which keeps to be the new thing to check out. Simon Phipps gave a really impressing talk on free software in the market, how to bring free software from niche to mainstream.
My own talk went quite well. I was less nervouse than I had expected, so it went like clockwork. Although I had quite a lot of slides I did not exceed the time limit. The slides will be available from the Jazoon homepage after the conference and I made the example sources avaliable from my private homepage.
My own talk went quite well. I was less nervouse than I had expected, so it went like clockwork. Although I had quite a lot of slides I did not exceed the time limit. The slides will be available from the Jazoon homepage after the conference and I made the example sources avaliable from my private homepage.
Subscribe to:
Posts (Atom)