Tuesday, August 3, 2010

Initial Thoughts on Vaadin : Not so much a GWT complement more of a replacement.

I have had the intention for a while now to try and comment on the Vaadin framework.  The website, plugins and demos exude confidence for this comprehensive toolset.  After a commentator on my last post  suggested that I try the framework, I took this advice and proceeded through the tutorials.

The address book tutorial is a great introduction to the framework, the web application demonstrated is quite comprehensive and is fairly boiler-plate code free.  Check out my finished application here: http://thinktaxi.appspot.com.  I, like most developers, dream of the ultimate framework where we can get on with just programming the logic of the application and the boiler place code is handled beautifully and efficiently by the abstraction the framework provides.  It is like the search for the Holy Grail, except of course I hope one day that this framework may actually exist.

Vaadin is advertised as being: "Built on GWT-based widgets, Vaadin applications support all Ajax-capable browsers, with no plugins."  This is a true statement but after completing the tutorial I feel that this needs further explanation.  Vaadin runs completely on the server, using GWT as a container.  The integration of GWT and Vaadin appears to be quite separate.  An initial peruse around the documentation may lead you to think that Vaadin is a set of GWT-Widgets that can be used to dress up your typical GWT application.  This assumption maybe false.  I say maybe because I am fully expecting a Vaadin expert to correct my assumption here.  Vaadin is almost completely separate to GWT and shouldn't really be considered to be part of it.

So, Vaadin runs on the server, which allows you to write complete Java code, a "benefit" when compared to GWT in which you are allowed to use certain Java libraries in the client code.  However the downside is that everything you do in Vaadin involves a trip to the server.  This in itself is a crucial point and raises the question.  How efficient can Vaadin be if everything requires a round trip?   An additional downside is that you are learning a whole new architecture system on top of GWT.  Which restricts your future solutions if your companies knowledge base is Vaadin only.

Anyway I am not a hater.  Although I am a GWT fanboy so Vaadin lovers prepare to feel the love. What applications might make Vaadin a good solution.  Well I think the quick small utility type applications that maybe used on an intranet or for just one company might be the answer.  In business, typically the speed of development and deployment is more important than how well your application performs.  The function of the application may never reach more than 100 users, so the load on the application will never be high.  I was very impressed by the speed and complexity of the application developed through the tutorial and I could see many benefits for RAD development.

In summary Vaadin good for small business development, but it is not a GWT framework contribution and shouldn't be considered as such (If you made that assumption like I did).


  1. I think you got it right. Vaadin is a server-side component framework focusing on speed of development while GWT is used on client-side to render the rich user experience. It is good idea to make all new Vaadin component as a standlalone GWT widgets too - to benefit both frameworks. For a scalability analysis see: http://vaadin.com/blog/-/blogs/server-side-ria-scalability

  2. I share your thoughts. I've never seen Vaadin as a GWT library, but I agree that writing code in Vaadin is really pleasant, nevertheless it is much slower than pure GWT.

    I've just tried Vaadin to write some code, not to create a production application, but I'm afraid that creation of custom components (in GWT) is needed to fix cases where performance is not enough.

  3. The relation between Vaadin and GWT is: 1) Vaadin uses GWT internally to implement rendering, 2) Vaadin can be extended - new re-usable widgets can be implemented - with GWT.

    GWT and Vaadin optimizes different things: GWT tries to minimize server-load by moving as much as possible to client, Vaadin tries to minimize development time by keeping most of the code in the server. For most cases server-side programming gives good performance, but for some situations (animations, interactive graphs, ..) client-side programming is needed - in those situations one must implement a new widget to Vaadin. Fortunately this is really easy.

    Scalability of Vaadin's server-side model depends on application. It is typical to be able to handle tens of thoudands concurrent users per server. Depending on your application, this might translate to millions of daily users - per server.

  4. IMO, Vaadin uses GWT for two things: component development and marketing purpose.

    Vaadin has its own lifecycle that means it is hard to use GWT made by other vendors, such as SmartGWT and ExtGWT.

    The worst is there is no way to write any client code that GWT really aims for and good at. From their demo, the only think an application developer can do is to send JavaScript codes to the client and the JavaScript code has no way to access any component (due to GWT name mangling adn lifecycle difference)

    All application code runs at the server. Unless you want to write a component, there is no connection to GWT at all.

  5. You said:
    "In business, typically the speed of development and deployment is more important than how well your application performs. The function of the application may never reach more than 100 users, so the load on the application will never be high."

    I have to disagree. Speed of development and deployment is important but the importance of the performance of your application exceeds that. The customer is paying for an application which is bound to certain SLA requirements.

  6. On speed of deployment versus application performance:

    Performance is always an important issue when designing any type of IT application. Its position in the priority list is different depending on the application type. After working for a variety of business which utilise bespoke in-house IT software, their main concern is always on how fast the software can be developed. The need to have an application perform well is secondary to that, unless it becomes a problem. Vaadin is an ideal solution in this arena, its speed of development is impressive. In the greater software development world with applications like Gmail, Hotmail and Salesforce, performance is one of the highest priorities because these applications will get many thousands of users, and performance should be incorporated to the very core of every design decision.

    I guess we are saying similar things and I agree that there is a minimum level of performance that is required in any software application. Our choice of framework is based on how the application is to be used and I would be wary about choosing a server-centric framework over one which only contacts the server when it needs to.

    Thanks for your comment and the interest in the article.


    Therefore my conclusion that Vaadin is useful in the bespoke software

  7. I would agree with your thoughts on Vaadin; I've only recently come across it myself and thought I should have a look because I'm in the process of selecting a framework for a major GWT project.

    For a small application without many users, I can see the rapid development benefits. However, I'm looking to build a network management application that may eventually have 100s of simultaneous users and they'll want real-time event notification (read comet, websockets etc.).

    Vaadin is pretty nifty, but you'd have to be sure that it's the right tool for the job.


  8. Nice article, good comment input. What are the options for a big business application?