O'Reilly logo

Vaadin 7 Cookbook by Ondrej Kvasnovsky, Jaroslav Holan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Login form with Model View Presenter

In this recipe, we will implement a login form using the Model View Presenter (MP) pattern.

We want to introduce a Vaadin application applying the MVP pattern in this recipe and therefore the login form will be of low complexity. The login form will consist of two text fields and a login button. When a user clicks on the login button, the request is forwarded to the presenter. The presenter calls the service in order to fetch a user from the database. Then the presenter notifies the user interface about the success or the failure.

Note

Basic information about Model View Presenter pattern can be found on Wikipedia at http://en.wikipedia.org/wiki/Model-view-presenter.

More detailed description of MVP pattern ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required