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 composition to develop custom components

If extending VerticalLayout is a problem, a possible solution is to not extend any class at all. However, in that case, we wouldn't get a Component, but a class of which instances cannot be added to the components tree. What about extending a more suitable component in the hierarchy? Let's start with interfaces. The following figure shows some of the top interfaces in the hierarchy:

Going up the hierarchy, we find the Component interface which has more than 20 methods that would require an implementation. The other interfaces inherit these 20+ methods and add some more. Fortunately, Vaadin provides abstract implementations for these interfaces. The following figure shows some of the equivalent implementations:

AbstractComponent is the default implementation of Component. Many Vaadin components directly extend this class...