Bucharest GTUG - Roo and GWT - 01 June 2010

Preview:

DESCRIPTION

Spring Roo and Google Web ToolkitSpringSource and Google are working together to combine the speed of development of Spring Roo with the power of the Google Web Toolkit (GWT) to build rich browser apps.

Citation preview

Bucharest GTUG1 Iunie 2010

What's Coming in GWT 2.1?  

• Data Presentation Widgets• MVP Framework• Spring Roo• Server-side Speed Traces

GWT 2.1 and SpringSource Tool Suite (STS)

Google and VMware are delighted to introduce SpringSource's new STS 2.3.3 and Spring Roo 1.1.0.M1 releases. These technologies deliver new levels of productivity, including:

– Spring Roo 1.1.0.M1– Google Plugin for Eclipse (GPE)– Data Nucleus (DN) Plugin for Eclipse

Install SpringSource Tool Suite (STS)

• Dowload springsource-tool-suite-2.3.3.M1-e3.5.2-win32.zip

• Unzip - || -

Start SpringSource Tool Suite

• Open DashBoard• Install Extensions (DataNucleus EclipsePlugin, Google Plugin for

Eclipse)

• Start new Roo Project

New Roo project

Building roo project roo>

• type 'hint' and ENTER for the next suggestion.

• Type 'persistence setup' and then hit CTRL+SPACE three times.

• For testing purposes, type (or CTRL+SPACE) HYPERSONIC_IN_MEMORY.

roo> persistence setup --provider HIBERNATE

--database HYPERSONIC_IN_MEMORY

Creating Entities and Fields

• roo>entity --class ~.server.domain.Book

• roo> field string --fieldName name

• roo> field string --fieldName author

In Roo, '~' means the --topLevelPackage you specified via 'create project'.

class Book

package ro.gtug.app.demo.server.domain;

import javax.persistence.Entity;import org.springframework.roo.addon.javabean.RooJavaBean;import org.springframework.roo.addon.tostring.RooToString;import org.springframework.roo.addon.entity.RooEntity;

@Entity@RooJavaBean@RooToString@RooEntitypublic class Book {}

Add fields

roo>field string --fieldName name roo>field string --fieldName author

And result: public class Book { private String name; private String author;}

Install Google Web Toolkit (GWT) into your project

• roo>gwt setup

Run Roo project

> mvn gwt:compile

> mvn gwt:run

Roo docs

• http://www.springsource.org/roo

• roo-1.1.0.M1\docs\pdfspring-roo-docs.pdf

Thanks! Petrica Clement Chiriac (Tica2)petrica (at) gtugs.org http://twitter.com/Tica2

Bucharest GTUG

Questions …

Next Bucharest GTUG event! Tuesday 6 July 2010 at Bucharest Hubb (19:00)

Agenda:• Proposals• Android ?

Bucharest