Friday Jun 09, 2006

GWT - revolution in web application development

Few my friends were talking about Google Web Toolkit GWT last week. There are too many MVC frameworks for web application development in java world - JSF, Struts, Spring, Tapestry, JSF, etc. It is not normal that one other tool can so quickly impressed java developers. I had to look at GWT too. GWT answers to question which I've heard many times:

Why not to develop the web application in the same way like desktop application?

By using GWT you can develop web application in the same way like swing application. The similar parts are below:
  1. Entry point for java application is Main class. It is EntryPointClass for GWT application.
  2. Swing and GWT represents all UI components a java class.
  3. Registration handlers are done by event listeners. For example listening on clicking of JButton.
  4. Components is registered to panel. A panel contains layout.
  5. You can show dialogs and change components on desktop for swing or in web browser for GWT.
  6. Swing app can be run on different platform. GWT application can be show in different web browsers.
Web browser doesn't contain support for java in html pages. GWT compiles java bytecode on client side of application to AJAX. There is development cycle for GWT application:
  1. Use your favorite Java IDE to write and debug an application in the Java language, using as many (or as few) GWT libraries as you find useful.
  2. Use GWT's Java-to-JavaScript compiler to distill your application into a set of JavaScript and HTML files that you can serve with any web server.
  3. Confirm that your application works in each browser that you want to support, which usually takes no additional work.

GWT solves communication between client and server side. It use proprietary Remote Procedure Calls. A service is represented by interface. Server side implements the interface and JavaScript is generated for client side. It leads developers to separate model, view and controller. GWT RPC is kind of SOA. Only with one difference. It doesn't use redundant (and slow ) SOAP protocol. Developer doesn't need to write jsp pages and servlets anymore.

There is no support for GWT application development in NetBeans. I hope GWT NetBeans project type be implemented early. And I may be someone will answer to another question:

Why not to generate GWT java code with NetBeans Matisse editor?

About

xzajo

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today