Book Image

Data-Centric Applications with Vaadin 8

By : Alejandro Duarte
Book Image

Data-Centric Applications with Vaadin 8

By: Alejandro Duarte

Overview of this book

Vaadin is an open-source Java framework used to build modern user interfaces. Vaadin 8 simplifies application development and improves user experience. The book begins with an overview of the architecture of Vaadin applications and the way you can organize your code in modules.Then it moves to the more advanced topics about advanced topics such as internationalization, authentication, authorization, and database connectivity. The book also teaches you how to implement CRUD views, how to generate printable reports, and how to manage data with lazy loading. By the end of this book you will be able to architect, implement, and deploy stunning Vaadin applications, and have the knowledge to master web development with Vaadin.
Table of Contents (11 chapters)

Implementing public and private views

Frequently, web applications have two main screens. One for visitors who are not authenticated, and one for users who are authenticated. It makes sense to implement the UI in a way that reflects this exactly. The idea is to create two custom components (using the Composite class); one for public access, and one for authenticated users. So, for now, let's suppose we have a custom PublicComponent class that shows the login form and a PrivateComponent that shows something like the following:

When the user is successfully authenticated, the PrivateComponent is shown. When the Logout button is clicked, the user should be redirected to the PublicComponent. The Vaadin UI implementation (VaadinUI in this chapter's example) should reflect the fact that there are two main screens that can be shown depending on whether the user is authenticated...