4

I am new to vaadin, couple of days back i have downloaded vaadin dashboard demo application.

http://demo.vaadin.com/dashboard/ vaadin quickticket demo application

And i found it amazing and become a fan of vaadin.

I am swing developer and about to start new project using vaadin. I am confused about database communication to vaadin. I am using MySql database.

As i did not stared writing code, can some one guide me which approach would be best.

  1. Use vaadin with grails
    • fast in development use spring and hibernate. Do it impact any performance as there is number of layer?
    • I have no idea about grails, if it best with vaadin then i will learn it.
  2. Directly use TableQuery and SQLContanier.
  3. Use Hibernate independently to fetch the data from database.
  4. Use JSON and make api call to another webservices to get the data . as the vaadin quickticket demo application is doing.

Which approch should i use or can anyone guide me which could be the best practices with vaadin with MySql database.

Should i used grails with vaadin i am developing dashboard application for tracking inventory. Will it cause any major issue with performance or speed.

8
  • 2
    there is no silver bullet for this. is your data model already modeled? are there already hibernate configs? are you planning on using the Table component or just want to show some html? i doubt you will get sane advice without telling your exact problem.
    – cfrick
    Aug 19, 2014 at 16:17
  • i am using mysql as a database currently this database is getting used by C# frontend. now i want to migrate my application into java web based application. i can say i am writing this application from scratch with same database DDL and proc. so i will have write all DAO and services logic and all again, and i am open to write it again :) . So i need advice on this should i go with grails + vaadin so in future i don't need to migrate again. Please let me know if you need more information. Aug 19, 2014 at 16:39
  • you might first look into GORM grails.org/doc/latest/guide/GORM.html if mapping your data is feasable or worth the efford (gorm features vs hastle to do the mapping). serving domain (domain in grails means DAO and related methods) as JSON/XML is rather easy - but it is not very usuable for a "common" vaadin up, which usually uses only server-side-code. if you have lots of data going into selects/tables you might end up write a container in vaadin, that maps into gorm -- or you write all your DAO for yourself using groovy's sql groovy.codehaus.org/api/groovy/sql/Sql.html
    – cfrick
    Aug 19, 2014 at 16:51
  • will it make any difference if i use SQLContainer or GORM ? as of now GORM is having learning curve for me but i have gone through couple of blog, people suggest GORM is good if you learn it and it will help you in fast development. do you think GORM can used in place of SQLContainer? what about performance ? Aug 19, 2014 at 18:32
  • there simply is no silver bullet. GORM will make it easier to deal with you writing data scentric services -- sqlcontainer will only help you with wiring data into the UI. and for performance: measure it! there is no technology out there, that some stupid useage can not bring down to a grinding halt. no one will be able to give you even guesswork with the given infos.
    – cfrick
    Aug 19, 2014 at 18:49

1 Answer 1

2

I have decided to go with vaddin7 + grails as this provide good support for ORM and logging , CURD opration so i don't need to write all database logic from begin.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.