Grails with Vaadin plugin, is it the right choice?
Asked Answered
F

1

10

For my organization I am evaluating RICH technologies for our next projects. We are currently using grails 2.1.0 and very happy with that, especially with groovy and gorm and we would like to stay with that. The idea is to extend grails with some RICH framework/library. Currently I am evaluating: grails plugin for ZK, grails plugin for Vaadin, knockoutjs, angular.js, ember.js.

I already received a feedback from my colleagues who worked with ZK (no grails) and their conclusion was: cool, but forget performances, ZK goes to the server every time you do something at client side.

My question is: is this also true with Vaadin (plugin for Grails) ? How does it react with heavy single page applications? and what about Bambi? can this be an option?

On paper grails + Vaadin is what we need: we want to write groovy/java, not xml and surely not javascript. Is this the right choice?

I know my question is very generic, but I am just at the beginning of the evaluation... Thank you for your attention!

Fraise answered 24/1, 2013 at 9:52 Comment(3)
ZK does not go to the server for every request. Here's my demo that uses a lot of client-side codes to improve performance: zello.herokuapp.com. disclosure: I am the ZK plugin author.Zygote
Thanks! I will surely report this to my colleagues evaluating ZK.Fraise
No problem. Just forgot to tell you the user id and password. It's "demo" and "demo".Zygote
M
6
  1. Vaadin works perfectly with Groovy and Grails. You can get services (actually spring beans) by using Grails.get() method and do localization via Grails.i18n() method. Because all the code is going to be written in Groovy, not Java, it will become less heavy (less lines of code and so on...).
  2. Vaadin doesn't go with ever user action on server. You can influence that by setting setImmediate(false) on whatever component.
  3. When you make complex application in Vaadin, you need to be careful how many components you put on the page. If you expect that there will be thousands of components on single page, then browser renderer will have performance issues with handling it (of course speed of rendering depends on your computer hardware). More hints is here.
  4. I recommend - try to build UI in Vaadin and fake database. Then see the performance and then switch to the real database. Usually people blame Vaadin but the problem is elsewhere e.g. in database, indexing, loading to many items at once...
  5. If you don't want to play with JavaScript, then I suppose knockoutjs, angular.js, ember.js are out of the game.
  6. You need to find out, whether the Vaadin components are what you need. I really suggest to try it out and make Proof of Concept in Vaadin. If not, Vaadin 7 simplifies integration with JavaScript! So, you can easily integrate Vaadin server code with whatever JavaScript library (e.g. highcharts and so on...).
  7. You will need to get your containers lazily loaded (check this)
  8. I think you should start with Vaadin 7 (here is a tutorial)
  9. There will be more performance optimalisations in Vaadin 7 (in versions 7.0.1 or 7.0.2)
Mayweed answered 24/1, 2013 at 15:16 Comment(3)
Great thanks! I have a strategic question: how mature is the plugin and how is the perspective at long term? I don't want to risk to adopt a technology that will be discontinued in one year... I'm exatcly at point 6. I followed the tutorial and playing with the examples. I have problems, but for that i will create a separate question.Fraise
The Vaadin plugin does actually only three things: adding Vaadin dependencies to Grails project, providing access to beans (get(SomeService)) and providing access to localization file via method i18n("key.to.value"). I don't think there could be something on the plugin what would make troubles. Since last week, more info is on vaadinongrails.comMayweed
It would be even greater if it could handle scss compiling (issue found for production environement => linkCadency

© 2022 - 2024 — McMap. All rights reserved.