Currently I am using GWT for a new project and I am really enthusiast of the results. I think it could be a nice article for this blog to explain some GWT ideas and how it is changing the way modern web application are being written.

With GWT you use a subset of Java Core libraries and GWT apis to implement your web application. The web application later can be translated in a 100% JavaScript application that can invoke server side services also written in Java: plain servlets using GWT toolset that make easier to serialize and transfer object between the Java Server and JavaScript application you obtained from GWT. And, as everything is written in Java on the first step, it becomes very easy to keep structures compatible and aligned between client and server.

With GWT you can layout your html pages almost as usual, and inject your GWT components in DIVs defined in the hosting html page.
Modeling the layout of forms and buttons and advanced controls is like writing Swing applications. But the interaction with the server must always be asyncronous (the first "A" of ajax).

GWT is cross browser (version 1.7 covers internet explorer 8 fanciness), has the best support for iternationalization I've ever seen in a web framework, can handle JSON, XML, SOAP or a native and simple google solution as protocol for calling remote services (GWT-RPC).

During the development you only debug Java code, in an "hosted mode" browser. You can put breakpoint on the code that later will be translated in JavaScript, and it really works fine.

If you have your javascript, you can write your Java "wrapper" and have that running as a native GWT library.

GWT also includes a good "back button" handling, javascript code obfuscation/optimization, and whatever you may dream to have from a framework.

but... it's not that simple! you will need some time to master all its feature and understand the internals.

Also a weakness is that at the moment you may have many troubles to get it working with maven, as GWT comes with a "standard" project layout relying on ant script. GWT provides a command line tool to jump start your project and have everything you need to import it in eclipse (maybe also intellij and netbeans).

GWT does not replace CSS. You still use CSS to modify how your GWT widgets will be rendered. Also there are some css predefined to have theming.

This is the quickstart.

This is the showcase to see some of the basic widget you can use and the java source code.

It may be surprising but the compilation from Java to JavaScript really works great! Recently a Java port of Quake (Jake) has been cross compiled into Javascript and HTML5 using GWT: quake2-gwt-port.

Source: How GWT is useful in place of Javascript and CSS?


No Responses to “How GWT is useful in place of Javascript and CSS?”  

  1. No Comments

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



Calendar

April 2010
M T W T F S S
« Jan   May »
 1234
567891011
12131415161718
19202122232425
2627282930  

Follow me

twitter flickr LinkedIn feed

Subscribe by email

Enter your email address:

Archives


Categories

Tag Cloud


Listening