Thursday, June 6, 2013

GWT Going Mobile and Beyond

At Google IO 2013, Google made it clear what the future of GWT is. The future is quite bright for GWT given the roadmap that Google and community have rolled out. The next major release will include full support for Java 7 & 8 and support for mobile browsers with a new set of mobile optimized widgets. Google is also opening up the process for how GWT will be developed and governed moving forward. It will now be community driven which is great news for the future of open source GWT.

There is no perfect framework for building web apps, but GWT is one of the best if you want a highly structured Java environment and high productivity with a larger team and a potentially large code base. The fact that GWT is based on Java gives it great tooling out of the box and a well understood design methodology and patterns for building client and server code that Java developers are already accustomed to. You have clearly understood concepts like MVP for building rich and complex apps and all the power of Java to build and organize your code. Something most javascript frameworks don't have.

I am a fan of many of the popular javascript frameworks out there for building web apps. jQuery, backbone.js, underscore.js, require.js, knockout.js and AngularJS (just to mention a few) are nice frameworks and give you a lot of expressiveness as a javascript/web developer to build pretty cool stuff from large single page apps to multi-page oriented apps. The problem is this begins to breakdown as the apps and code base get bigger and as the team gets bigger. Have you ever tried to reverse engineer code in javascript or pickup someone else's code? Sure if you have javascript guru's on your team, you are probably in good shape, but javascript programming by its nature is loosely structured and leaves a lot to the developer to define (which can be good and bad depending on your perspective). But on larger teams and with less experienced developers, this can be a challenge.

Again, there are dozens of javascript/html5 type frameworks out there (and new ones coming out each year) and what you choose really depends on how adventurous you want to be with web development. GWT gives you a highly structured environment and programming language to build browser based apps. And now with GWT being community driven and with much clearer support for GWT by Google, the future looks quite bright for GWT and Java developers. I am looking forward to building GWT apps for mobile as I think this is one area (along with gwt-phonegap) that GWT will excel in.

Also checkout soafaces, a cool GWT powered open source framework that allows you to build component based GWT web apps. It includes cool features like an on-the-fly GWT compiler (kind of like JSP to Servlet compiling), so your GWT apps can be dynamically compiled to javascript by the hosting container. SOAFaces also makes it easy to bundle and organize your GWT apps into components and optionally communicate with SOA and Mule type endpoint services.