GWT and Flash

Many of us GWT developers can’t rely on a fancy HTML5 ready browser. This can come to a problem when your customers expect RIA features from you web application that the browser can’t deliver natively.

For example: customer wants to drag and drop files into your web application. This request is not uncommon, and there is no way of providing a native DHTML solution for this without modern html5 capable browsers.

Another example: your GWT RIA application delivers lightweight server deployment & resources consumption – and even rich behavior on the browser – but as soon as you need a fancy chart representing the data on the client you probably will end up doing a full client-server communication cycle sending the data to the server. The server takes the data, creates the chart and renders a picture that is transmitted to the browser. Don’t even think of animated charts here, it simply won’t work.

Well, these are only two examples of problems common to HTML development. This is where Flash filled in the gap in web development for the last years.

Looking for solutions for file uploads, I came across some interesting projects:

File upload without drag and drop, but nice UI and purely JavaScript based:
http://code.google.com/p/gwtupload/

File upload with drag and drop, Flash based:
http://swfupload.org/
Gwt bridge to swfupload:
http://code.google.com/p/swfupload-gwt/

In fact, it is quite easy to embed Flash into a GWT application, as long as you don’t want to communicate between the Flash and the GWT Application. You can simply use the HTML GUI component provided by GWT.

If you need yout GWT application to communicate with the Flash application, here is a nice posting you probably want to read.

There is a project that addresses Flash and GWT: http://code.google.com/p/gwt2swf/.

A nice working example of a GWT/ Flash integration can be found here: Open Flash Chart for GWT

This entry was posted in Java Web Frameworks and tagged , , . Bookmark the permalink.