Tuesday, July 1, 2008

Surprise GWT Visit

Guys,

This post is about my encounter with GWT (Google Web Toolkit). It is really a wonderful product from Google from the developer's perspective.

The benefit as a developer what I can say is, it provides you a way to debug in the hosted mode in the way we do debugging in Eclipse. You don't have to worry about getting into javascript hassles. Everything you can do right from Java IDE. Again for the modification to reflect, you just need to refresh the browser that GWT came with. If you would like to run your GWT application from weblogic server or any other server, you can always use the option -noserver in the shell. If you are bit familiar with the way that Swing works, you can become a great programmer with GWT. I don't find it appropriate to develop GUI with GWT, rather than going with creating HTML and adding javascript on top of that. My question is that why would Google try to challenge the way we write the web pages now. Even for the simple change in GUI we may have to look forward to changing the Java file and compile it. I guess this might be appropriate for developing the simple and small application. Though I agree that you can develop the HTML and on top of it you can plug in GWT apps in certain tags. I found it not welcomeable.

When you integrate GWT with frameworks like Spring etc, you need to make some more effort. In this time you need to seek the help from utilities like GWT-SL and GWT-WL. But this time you will be losing the facility provided by Hosted mode that GWT boasts of, especially debugging. Though it can be enabled using proprietary servers like Weblogic, Websphere, etc. I tend to think of tomcat server, which is my favorite, I will tell you why too.

One of the hassles that GWT gave, when i was trying out is that my page had had two gwt placeholders, one of which contained main app, and another one small placeholder where I had planned to show a PopupPanel. when I integrated both of these panels, I couldn't show popup panels as expected. But when I had added only one panel to my page, it showed brilliantly. The cause is that it was not firing events for button clicks and so on. And in the DiaglogBox of GWT, you can have only one panel, even though you can make it that way. Anyways I was not impressed much with the GUI styles provided by GWT. For the sake of it, I tried to use ExtJS for GWT. It was highly impressive. It addressed all of my issues very well. But, when I started using it, I realized that though it was an open source library, it had a dubious license, meaning that when you develop applications using GWT - Ext Js, you should keep your complete code of your application open sourced. For my home work, it sufficed, but I couldn't recommend for my clients to use it due to its policies.

So at last, for my project with my client, I ended up recommending Dojo with DWR (Direct web Remoting) . I find this combination appropriate. The reason is that Dojo addresses all the GUI related functionalities. DWR addressed the functionalities like serialization and deserialization of java objects into javascript.

I initially recommended Open Laszlo for our work as it is sufficient to address almost we can imagine, I couldn't recollect why it was rejected. If you see the functionality provided by Open Laszlo, it gives two stark options, one is that it converts the complete GUI as Dynamic javascript and if your browser has Flash plugin installed( I don't think somebody wouldn't have), it will show your application as flash based application, which I consider as appropriate for most of the possible situtations. On top of Open Laszlo, you have lots of add ons too.

We ignored most of the proprietary RIA tools because our client was not inclined to use any proprietary technologies. I prefer the same too.

So what is next? I have to burn my hands in Dojo and its internals and DWR and its internals. My project is going to start in a week, I need to prepare myself for it.

See you soon once again with some more nice information.

No comments: