Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
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.
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):
- MembershipApplication.java (the application class)
- ScreenManager.java (a really application-specific implementation of the view manager pattern)
- MainScreen.java (a main screen with a menu, etc.)
- On-line demo - it allows you to create an administrator account and get to the main screen. The application is "rather unfinished" - only the Users tab actually works.
Couple of starting points: