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
Enter Project Settings and Click Next
Click Finish, and Yes to Turn Weaving Service On
No to Restart Now
Step 3 : Goto Roo Shell
Ensure project is selected in Project Hierarchy
Setup Persistence
Step 4 : Create Employee Entity
Step 5 : Create Employee Entity Fields
Field firstName
Field lastName
Step 6 : Create GWT – Front End
Step 7 : Setup Google Web tool Kit Settings
Step 8 : Enable Maven Dependency
Step 9 : Run Project
Step 10 : Goto Browser
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:
I've been playing with this for the last few days.
ReplyDeleteSome 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