Tuesday, June 1, 2010

Create a GWT Contact Application in 10 easy steps.

Google GWT and Spring Source have joined forces to make it easier to develop web applications by developing a tool which creates your data models, your web gui interface and all the web-server communication code in a few easy command line statements.  This was demo’d at Google IO 2010 and I aim to replicate the steps required here, including any pitfalls to help you jump start your GWT development.

SpringSource Tool Suite (STS) Is a flavor of Eclipse that includes all the necessary functionality to get this working.  At it’s core is a Roo Project where you create project and define entities using the Roo Shell.  This allows you to quickly get a Database, GWT Front End and connectivity code build without writing a single piece of code.

The source data and graphics for this article is from this web page.  I have outlined my steps taken when completing it and any pitfalls I came across.   http://www.thescreencast.com/2010/05/how-to-gwt-roo.html

The Steps REQUIRED

Step 1 : Setup your system

Download and setup Spring Source Tool Suite using the first screencast on this page:

http://www.thescreencast.com/2010/05/how-to-gwt-roo.html

Step 2 : New Roo Project

image

Enter Project Settings and Click Next

image  

Click Finish, and Yes to Turn Weaving Service On

image

No to Restart Now

image

Step 3 : Goto Roo Shell

Ensure project is selected in Project Hierarchy

image

Setup Persistence

image

Step 4 : Create Employee Entity

image 

Step 5 : Create Employee Entity Fields

Field firstName

image

Field lastName

image

Step 6 : Create GWT – Front End

image

Step 7 : Setup Google Web tool Kit Settings

image

image

Step 8 : Enable Maven Dependency

image

Step 9 : Run Project

image

image

image

Step 10 : Goto Browser

image 

Pitfalls to watch out for

Enable Maven Dependency:  This is one of the last stages of the demo and in the screen case it appears to work instantly.  This is not the case.  You will notice Eclipse in a busy mode for a few minutes as it configures itself.

Additional Info

Video from Google IO demonstrating this feature:

1 comment:

  1. I've been playing with this for the last few days.

    Some other pitfalls to look out for. It currently doesn't handle boolean, number (except for Double) List, Enum, set and reference fields for Entitities yet when using the GWT web layer.

    http://jira.springframework.org/browse/ROO-933

    ReplyDelete