It is finally out. The first working version of Grails plugin for Vaadin 7.
Vaadin 7 differers from Vaadin 6 a lot and therefore there is no backward compatibility beween the plugins for 6th and 7th version. Actually, the plugin for Vaadin 7 is made almost from scratch. Many things have been simplified and plugin is just handling the connection between Grails and Vaadin. For example dynamic methods getBean and i18n are not injected anymore.
Vaadin 7 differers from Vaadin 6 a lot and therefore there is no backward compatibility beween the plugins for 6th and 7th version. Actually, the plugin for Vaadin 7 is made almost from scratch. Many things have been simplified and plugin is just handling the connection between Grails and Vaadin. For example dynamic methods getBean and i18n are not injected anymore.
One thing I have noticed after playing with Grails 2.2.0 and Vaadin 7 - it is fast (actually in two ways). First, I have made localized application with access to database via ORM (Hibernate) and Spring (Services), displaying list of users in a good looking table in just 5 minutes (sometimes, in other frameworks, I don't even setup the project in that short time). Second, it is really responsive user interface. I think the guys in Vaadin did amazing job with the 7th version.
Let's have a look how to install the latest version and try it out. Setup Grails console before you start or you can just make it in your favorite IDE.
- Create new project and run it.
grails create-app bookstore
cd bookstrore
grails run-app - You can stop the application now. It was just to verify that you have successfully created the project. Download and install the plugingrails install-plugin /path/to/plugin/grails-vaadin-1.7.0-beta2.zip
- And run the application
grails run-app
Quite simple, right? You might be wondering... what about access to database or localization. There is a new class Grails and that one is meant to be used when you need to get the access to the services or i18n. Few examples follows.
Let's create a service class in Grails. It just returns all the users from the database.
Let's create a service class in Grails. It just returns all the users from the database.
class UserService {
List<User> listUsers() {
return User.list()
}
}
Now get the service and call the method.
List<User> users = Grails.get(UserService).listUsers()
Or just create new Label and pass there localized string.
String text = Grails.i18n("key.to.localization.from.i18n")
Label label = new Label(text)
Fantastic effort! I'm really happy that you have decided to continue with the effort of developing the Vaadin plugin for Grails. By the looks of it, good things are happing as well! Keep it up!
ReplyDeleteHi! I am evaluating RICH technologies where Grails is a prerequisite. Vaadin plugin for grails is one of the options.
ReplyDeleteI have zillions of questions and the first one is: is this the right place to discuss in details this plugin?
or is there a specific section in the Vaadin site?
Hi Fabio, I have used Vaadin 7 together with Grails 2.2.0-RC2 on a project which is just about to go to the production. It works nice, but you really need to consider many things before choosing Vaadin and Grails.
ReplyDeleteI might answer some of the questions you have got.
Please ask on stackoverflow and don't forgot to add tags:
http://stackoverflow.com/questions/tagged/grails
http://stackoverflow.com/questions/tagged/vaadin
I am following them and I will try to help.
Done, thanks. I started with a generic one...
DeleteFabio, there is also new kind of central page for Vaadin on Grails: http://vaadinongrails.com
ReplyDelete