Jump to Navigation

Google Web Toolkit and Echo Framework

Recently I have begun to experiment with the Google Web Toolkit. The GWT is an amazing framework that allows one to programme in pure java with the resulting application being cross-compiled into Javascript so that the entire application runs on the client browser with trips to the server occurring only when some middleware interaction takes place. Essentially your application becomes one javascript file. Apparently the javascript compiler can do some pretty amazing optimisations to ensure your compiled javascript file is as lean as can be, and it takes care of all those horrible cross-platform issues.

Benefits of the GWT

One of its benefits is that it allows for the debugging of the web application using traditional debugging tools which is a major productivity saviour. A GWT application has its own unique project structure which I find a bit of a nuisance since I like to stick to the traditional maven project structure. The GWT framework has been open sourced by google but not the javascript compiler.

Echo Application Framework

Whilst experimenting with GWT I also came across the Echo framework . From a development perspective the echo framework is similar to GWT in that allows one to develop an entire web2.0 application in straight java. The way it achieves this though is quiet different to the GWT with the application mainly running on the server and a small more traditional html/javascript page being sent to the browser and most interaction being processed on the server. Debugging can be done as with any traditional web application which isn't as great as the GWT approach.

Benefits of Echo

On the plus side though, remote procedure calls are much easier to handle in the Echo framework than with GWT. GWT requires two interfaces and one implementation class for any remote services and the client code needs three lines of boilerplate code to get any communication going. With echo this is not the case. A simple java call is all that is required for remote communication. Additionally Echo does not require any configuration in XML files and other annoying setup hoops to get it to work. It is simply a servlet with entries in the Web.xml file. GWT requires the setup and editing of gwt.xml files for each module. On the minor side an echo application also follows a more traditional project structure.

Presentation Logic and Style separation

One thing that both frameworks have picked up is that is better to separate style information from presentation logic code. GWT makes use of css while Echo has its own external stylesheet format. The GWT approach is nicer as it does not require learning a new markup language. GWT has an advantage in that it can be integrated into existing web applications where as this is harder to do with Echo. GWT application architecture is still page based, essentially you programme for a web paradigm whereas Echo is much more of a traditional fat-client architecture.

GWT or ECHO?

I still need to get some more experience before answering this question categorically but so far I think Echo is great for intranet applications where development speed is important and bandwidth is not an issue. With everything being server side security is much tighter. For external application that do not require a lot of communication with a remote service GWT is probably better.

In the long run Google will be able to throw more money and resources at improving GWT technically and at marketing it. It is already growing a community around GWT. My only reservation are the none open source components used in GWT but from a practical point of view this is not really a problem.

 

Open Source: 


by Dr. Radut.