Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails with Vaadin plugin, is it the right choice?

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!

like image 482
Fabio Sogni Avatar asked Jan 24 '13 09:01

Fabio Sogni


1 Answers

  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)
like image 156
Ondrej Kvasnovsky Avatar answered Nov 20 '22 02:11

Ondrej Kvasnovsky