Vaadin on Grails

RIA in Vaadin 7, running on Grails.

Rapid development of RIA in Vaadin 7 with Grails services, GORM, environments and i18 features.

How to start

Vaadin

Vaadin is a web application framework for building Rich Internet Applications (RIA).
Learn more

Grails

Grails is a web application framework, which uses Groovy language, following the "coding by convention" paradigm.
Learn more

Grails plugin for Vaadin

Grails plugin called "vaadin" integrates Vaadin into Grails application. How to install latest the version grails install-plugin vaadin"
Learn more


Advantages

Vaadin components

No JavaScript. Vaadin implements many components and makes possible to implement application in Java based language, which is Groovy in this case.
Learn more

GORM

No mapping between database and domain objects. GORM is Grails' object relational mapping implementation using Hibernate 3.
Learn more

Services

Services in Grails are the place to put the majority of the application logic. The way to access a service in Vaadin code. BookService service = Grails.get(BookService)
Learn more

Internationalization

Localization from Vaadin code using standard message bundle files. String localized = Grails.i18n("key.for.message")
Learn more

Environments

Per Environment Configuration if (Environment.current == Environment.TEST) {}
Learn more

Dependency injection

Dependency injection with the inbuilt Spring container.
Learn more

Command line

Command line scripting environment built on the Groovy-powered Gant. grails run-app
Learn more

Embedded Tomcat

Embedded Tomcat container which is configured for on the fly reloading.
Learn more


What Vaadin replaces in Grails?

There is no need to have .gsp files, controllers or URL mapping in Grails-Vaadin project.


How to start

This tutorial describes way to start up Grails project integrated with Vaadin.

Download and install IntelliJ IDEA Ultimate Edition. It has got all what is needed for development of Grails and Vaadin applications. If the Eclipse IDE is the choice, go for Spring Tool Suite (STS) and install the needed plugins: Groovy and Grails.

1

Create new Grails project.

2

Download Grails 2.1.0 or maximally 2.2.0-RC2 (there is an issue with auto-recompilation in 2.2.0 and that slows down the development work).

3

Run the application and see if everything works. The screen below just shows shortcut to grails run-app command.

4

New browser windows should popup and new Grails application should appear.

5

Kill the tomcat.

6

Install Vaadin plugin into the project. Open Grails console in the IDE (press Cmd+Alt+R on Mac in IntelliJ IDEA) and run install-plugin vaadin.

7

Run the application again.

8

Believe or not, this is the Vaadin application running on Grails.

9

Vaadin code is placed in grails-app/vaadin source folder.

10

It is time to continue with Vaadin book and Grails manual.