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)

Using extensions to develop a UI component

Let's explore how to implement a login form component. The first idea that comes to mind when starting to develop a UI component is to extend, in the Java sense, an existing component. Most of the time, the natural choice is to extend a layout component such as VerticalLayout or HorizontalLayout. For example, a login form usually includes at least a username field, a password field, a login button, and a remember me checkbox, with all of them aligned vertically. So, let's start by directly extending VerticalLayout.

Extending VerticalLayout

The following snippet of code shows a typical way of extending VerticalLayout to implement a UI component, in this case, the login form...