Tuesday, January 8, 2008

ITMill ToolKit 5: GWT without the inconveniences

I always liked GWT.
Being able to code a web application without having to write a single line of HTML or JavaScript, without bothering to use ten hack per page, without banging your head on a wall due to a strange IE compatibility bug... Priceless.

But GWT come at a price.
You have to use a quite inconvenient RPC mechanism (having 4 classes just to call a server side function from your client is NOT funny) ; you have to declare every one of your RPC function in a separate XML file; and you have to put all your client classes in a "client" package.
Oh, and you have to use a specific Google compiler to create your HTML & JS, too.

But the real trouble begin when you want to use GWT not alone, but in conjunction with all those so nice tools, like Maven2 and Spring. The pain, oh, the pain !
I'm sure it can be done. I'm even sure that a lot of people managed it, and are happily all those things together. But I do not think that anyone would say that it is easy, clean and quick.
After a week of failures, I stopped, and begin to reverse my project to Struts2.

Do not misunderstand me: GWT is a superb framework, with many usages, and can be used to do marvelous things. I just guess it is not for me.

But here come a new challenger: ITMill Toolkit 5 ( http://www.itmill.com/ ) .

ITMill Toolkit is a powerful framework based on GWT.
It use GWT, but under the hood. It remove all the pain from it.
In less than a day, I managed to integrate it with my previous Maven2 / Spring / Acegi project, and to begin to create my UI. And that's a LOT more that what I can claim I accomplished with GWT.
Using ITMill Toolkit is pretty much straightforward: grab the jar, copy in your webapp a folder containing a default theme, add a servlet to your web.xml , and voilĂ , you're ready to go.

The HelloWorld tutorial on the IT Mill site is a good example of the way it work.
If you know GWT, or even if you know AWT / Swing, you will not be surprised.
The Application class is you entry point, called by the servlet; the Window class is, well, your main window (ie. the main page user see). You can add Components to your window, like Labels, Buttons, or TextFields.

Like GWT, it's a pure Java framework. Even more: no XML configuration, no special compiler, no rules on packages, no RPC framework. You've got classes, you do whatever you want, the toolkit takes charge of everything for you.

For me, it's the revolution in web applications developping GWT should have been.

5 comments:

Martin said...

I'm a java developper but have no experience on building web apps. However, I have read few things concerning J2EE an though that it might be the best solution for creating web apps without writting anything else than Java code.

Am I wrong? Are there plenty of java based solution for implementing rich web apps? In what way is ItMill more convenient than JSP/JSF?

emarc said...

@Martin
Very simplified:
JSP/JST are tag -based solutions (as in special tag within html), whereas ITMill is a "pure" Java solutions that aims to hide as much as possible of the "web" in "web-development".
It's much more like programming a standalone GUI app instead of a page-based html app.

splix said...

hm... what the pain when integrating GWT with Maven2 and Spring? really? i'm using gwt with maven2 and spring for more that 1 year and had not found any trouble with this yet.

splix said...

There are maven-googlewebtoolkit2-plugin and net.sf.gwt-widget, they can do all work for you

Unknown said...

you have a nice site.thanks for sharing this site. various kinds of ebooks are available here

http://feboook.blogspot.com