Wednesday, April 7, 2010

A cool Vaadin application on Google App Engine

Vaadin, as we all know is a rapidly growing GWT based Java Web Framework. The coolest feature of Vaadin is that there is no client/server concept as it is in GWT. The developer can freely code anything "anywhere" and Vaadin will handle all the client/server related stuffs. 

One of our existing in-house production application is built using GWT and causing lot of difficulties for developers in terms of understanding the model and designing the proper application. So to retain all the GWT features and offload the additional burdens we (as such I) have decided to move to the Vaadin and redesign the existing application.

To convince the technical and management team and for demonstration purpose I developed a small application in Vaadin and uploaded it to the Google Application Engine (click here) so that others can also get the idea and at the same time I can load test the application and get all the execution details from the App Engine dashboard.  

The application contains a simple functionality where in which the user can design her custom entry forms, enter/save form data and finally view the saved data in a table. The application was built in few hours only so it doesn't have "next big ground breaking idea" or the nice GUI but Vaadin provides fairly nice UI which can work for any application to start with.

To speed up the development I extended the basic Form functionality to a Generic Form so that UI Forms can be created not only from Java Beans but from java.util.Map also. The reason to choose this is because some of our applications are purely data centric where in which numbers of UI forms are presented to users; however the fields in every form can very even after application deployment so to reduce the repetitive development effort I have taken the model where in which forms not only can be generated at runtime but can behave line a normal pre-coded form in most of the cases.

There are still many points to resolve before we finally switch over to Vaadin as our web application development framework but with the growing popularity of the framework and new initiative like Vaadin Directory acceptance would not be much difficult.

Vaadin demo application url: http://vaadincoolapp.appspot.com/

25 comments:

  1. how to make model,view and controler in grails with vaadin application

    ReplyDelete
  2. and how we can find controler will work when application willbe working properly

    from krunal patel now i am strat with grails with vaadin application

    ReplyDelete
  3. grails has a plugin for vaadin with which u can integrate vaadin and grails together. this link Grails Plugin explains the integration process.


    I could not understand your second question.

    ReplyDelete
  4. Is it possible for you to share your source code for your demo vaadin app?

    ReplyDelete
  5. yes definitely. soon post the source link.

    ReplyDelete
  6. thanks, i just wanna see how vaadin widgets are bound to data

    ReplyDelete
  7. sorry for the delayed response.

    here is the svn link http://goo.gl/q6Oz

    ReplyDelete
  8. Very helpful article! I saw the src, thanks very much! Do you know of any implementation where data source is from a real data base like Google App Engine's database?

    ReplyDelete
  9. thanks pepe for going through the code.

    Are you looking for a Vaadin application where data source is BigTable?

    ReplyDelete
  10. Yes dhaval, can you refer any Vaadin implementation that uses BigTable?

    ReplyDelete
  11. pepe, vaadin application is like a normal java application and if deployed in AppEngine and requires database the only option is BigTable only.

    As soon as you add the App Engine deployment in the Vaadin Project all the required services will be available to you like memcache, user, raw database.

    So now you just need to know the syntax of BigTable which you can get from the Google Code site.

    If you can wait for few more days this application is not storing anywhere which i am planning to store in BigTable only and will share the source

    ReplyDelete
  12. At last I have changed the back-end storage to Google BigTable with Low-level DataStore API.

    The full source is available at http://goo.gl/ovcx

    ReplyDelete
  13. Hi Dhawal,
    Have you tried Vaadin for any production ready systems? and how's the performance, iam on the verge of starting with Vaadin..Vaadin has all the prospects of the NEXT BIG THING in RIA world..

    ReplyDelete
  14. Hello kk, we are building a production app with vaadin which is expected to run 24/7. Although the application is for internal use but its complex and will be used from different places across countries.

    When we started the evaluation the only known application was blackbeltfactory.com. so we followed the prototype approach and implemented a small part of the application as a prototype. That worked reasonably fine and convinced us to go further.

    I suggest that you first properly check the blackbeltfactory.com and rate it against various parameters like performance and usability. And if possible develop a small prototype for testing which can be developed in a week or so.

    As of now we are quite happy with vaadin and also planning to use it in future applications. As u correctly mentioned vaadin has all and right prospects to earn big in RIA.

    Please fill free to ask in case of any other queries.

    ReplyDelete
  15. Hi Dhaval,


    FYI.

    A GAEContainer class is already available, but still in incubation. It's a Container.Indexed implementation by the way. I hope Vaadin folks will make more of these Container interfaces.

    Good luck!

    ReplyDelete
  16. Hi

    I tried to download the souce of your application but I am asked for a username/password

    Coudl you help on that please?

    Thanks a lot for sharing

    Laurent

    ReplyDelete
  17. Hi Laurent,

    Its guest/guest.

    Thanks for stopping by. Let me know in case of any queries.

    ReplyDelete
  18. Sorry Laurent I gave you wrong authentication accidently. The repository is made private. I will post the new source link.

    ReplyDelete
  19. here is the new source link http://bit.ly/h69MwS

    ReplyDelete
  20. Hi Surat

    Thanks a lot for sharing your code. The link works great now.

    Laurent

    ReplyDelete
  21. A very helpful demo when, like me, I'm trying to get to grips with Vaadin on GAE. Thanks for sharing.

    Jon

    ReplyDelete
  22. hi can you guide me regarding how to use database on GAE my vaadin app currently use oracle 10g and sql container how can this be hosted to GAE also I need to know if there is way to export my existing data to GAE ... please drop mail at richi.arora@gmail.com

    ReplyDelete
  23. Hi Dhaval,

    How do I add Vaadin to an existing GAE application? The Vaadin plugin does provide a Vaadin Project Wizard, but that is for new projects only...What do I do if I want to add Vaadin to an existing Google App Engine Application?

    Thanks,
    Arvind.

    ReplyDelete