Big Apps

Hi,

Is there any best practices/patterns to develop a big application in Vaadin?

I mean, all the samples, examples and screenshots I saw of apps that were developed in Vaadin are 1-2 screen applications. I have a project under evaluation that will probably evolve to a huge app (many screens, forms, flows, user interactions, etc.).

Vaadin seems to be a perfect match for the UI requirements but I really don’t see how I could plan this application in an almost (at least as far as I could see from the examples) monolithic Application superclass.

Don’t get me wrong. So far I am just amazed with Vaadin. Over the years I’ve been developing applications using MVC frameworks and maybe I am still narrow sighted by the “old school”.

Any tips? Examples?

I would really appreciate.

Thanks in advance.

Alexandre Jacques

Well, the basic approach is to “divide and conquer” the UI logic to smaller independent components. The application class should not really do much else but create the top-level components and handle application parameters, cookies, possibly open a database connection, and so on.

The
view manager
(or screen manager) is one of the most commonly used patterns, where you have a component that manages a set of alternative views or screens. You can make a view manager that handles various situations such as visiting a help view and returning back to the base view.

Another common pattern is a multi-step flow such as in wizards. The patterns depend a lot on your application’s work flow.

A very unfinished example (based on the old IT Mill Toolkit):

Couple of starting points:

  • Take a look of Sampler source code. It has quite a few screens.
  • Take a look of
    Navigator component
    . It provides lazy initialization as well as bookmarking and window handling for views. (
    demo
    ,
    src
    )