Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

best practice

Niyas Manzoor
1 decade ago May 06, 2010 6:43am
Marko Grönroos
1 decade ago May 06, 2010 8:03am

In trivially simple applications you might do everything in the application class, but for almost any real application you should modularize the application better. Composition, usually with CustomComponent, and inheritance are the basic techniques.

The application class of a non-tiny application does normally the following tasks:

  • Initialize database connection (often shared between sessions)
  • Initialize business data (often shared between sessions)
  • Manage internationalization (current locale and resource bundles)
  • Handle cookies and such
  • Launch the user interface (typically through a view manager)

Check out one example.

Niyas Manzoor
1 decade ago May 06, 2010 9:03am