Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Data-Centric Applications with Vaadin 8
Data-Centric Applications with Vaadin 8

Data-Centric Applications with Vaadin 8: Develop and maintain high-quality web applications using Vaadin

eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Data-Centric Applications with Vaadin 8

Modularization and Main Screens

The main purpose of modularization is to decrease the complexity of a system. By dividing the functionality into many modules, developers can forget about parts of the system that are not relevant to the functionality under development. It also enables a more powerful deployment process by, for example, allowing activation of features depending on environments or customers, and the creation of third-party modules to customize and extend the capabilities of the application.

This chapter demonstrates how to modularize your applications to make them more manageable and maintainable, and how to implement a main screen that supports the registration of new modules at runtime.

This chapter covers the following topics:

  • Modularization of Vaadin applications
  • Implementation of an application's main screens
...

Technical requirements

You will be required to have Java SE Development Kit and Java EE SDK version 8 or later. You also need Maven version 3 or later. A Java IDE with Maven support, such as IntelliJ IDEA, Eclipse, or NetBeans is recommended. Finally, to use the Git repository of this book, you need to install Git.

The code files of this chapter can be found on GitHub:
https://github.com/PacktPublishing/Data-centric-Applications-with-Vaadin-8/tree/master/chapter-02

Check out the following video to see the code in action:
https://goo.gl/VnLouE

Creating a multi-module Maven project

A multi-module Maven project aggregates several Maven projects into a single one. In this chapter, we will create three modules that form the whole application:

  • webapp: A Vaadin web application packaged as a WAR file that includes everything needed to deploy it to a server such as Tomcat, Wildfly, Jetty, or any other Java server
  • api: A Java API packaged as a JAR used by the webapp and any functional module
  • example-module: An example functional module that uses the api JAR to add functionality to the application

All these modules are aggregated into a single Maven project with the name chapter-02. Let's start by creating this aggregator project by using the pom-root Maven archetype. Run the following in a terminal:

mvn archetype:generate \
-DarchetypeGroupId=org.codehaus.mojo.archetypes \
-DarchetypeArtifactId=pom-root \
-DarchetypeVersion...

Implementing an application's main screen

Let's start by implementing a concrete component: A main screen, something every web application needs. Please keep in mind that there's not only one way of implementing main screens. The example presented here may be good for your own application, or it might inspire you to develop even more sophisticated implementations.

The main screen in this example consists of a header, a menu, and a working area where other components are shown when the user selects an option from the main menu. To the external world, this component should include the following functionality:

  • Adding components to the header
  • Adding components to the working area
  • Adding options to the main menu
  • Adding listeners to respond to menu actions
  • Getting components from the working area and the header
...

Modularizing Vaadin applications

In this book, we use the term module to refer to a software component that can be independently developed and deployed. In that sense, a modularized application can be customized and extended without distributing or modifying the source code of the original application. For our purposes, when a new module is deployed, it must register with the application. The functionality of the module is incorporated into the application at runtime.

Keep in mind that there are also Maven modules. This book uses the full term Maven module or Maven project when referring to this kind of modules.

Identifying alternatives for modularization

There are several mechanisms and ways of implementing modularized applications in Java. For example, you can use OSGi if you need to provide hot deployment—that is, the capability of deploying and un-deploying modules at runtime. Another option is Service Provider Interface (SPI), a set of standard interfaces and classes included in Java SE that help with the development of extensible applications. You can even use Contexts and Dependency Injection (CDI) or an inversion of control framework such as the one provided by the Spring Framework to develop a custom module system based on the injection mechanism. Moreover, you could go down to the Java Reflection API to create instances of classes not known at compile time.

Because explaining all these alternatives is out of the scope of this book, we'll use the simplest alternative...

Summary

In this chapter, we developed a self-packaged UI component (a main screen component), created a multi-module Maven project, and learned how to implement application-specific modules that are discovered and registered with a Vaadin application at run-time. While explaining these concepts, we also saw some Java 8 and Vaadin 8 snippets of code that highlighted good practices such as making your code more maintainable and extensible.

In the next chapter, you will learn how to implement a login form with multi-language capabilities.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • •A one-stop book to enhance your working knowledge with Vaadin.
  • •Explore and implement the architecture of Vaadin applications.
  • •Delve into advanced topics such as data binding, authentication and authorization to improvise your application’s performance.

Description

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.

Who is this book for?

If you area Software developer with previous experience with Vaadin and would like to gain more comprehensive and advanced skills in Vaadin web development, then this book is for you.

What you will learn

  • •Modularize your Vaadin applications with Maven
  • •Create high quality custom components
  • •Implement robust and secure authentication and authorization mechanisms
  • •Connect to SQL databases efficiently
  • •Design robust CRUD (Create, Read, Update, Delete) views
  • •Generate stunning reports
  • •Improve resource consumption by using lazy loading

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 30, 2018
Length: 202 pages
Edition : 1st
Language : English
ISBN-13 : 9781783288854
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Apr 30, 2018
Length: 202 pages
Edition : 1st
Language : English
ISBN-13 : 9781783288854
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 108.97
Vaadin 7 UI Design By Example: Beginner's Guide
€41.99
Data-Centric Applications with Vaadin 8
€29.99
Spring Boot 2.0 Cookbook
€36.99
Total 108.97 Stars icon
Banner background image

Table of Contents

10 Chapters
Creating New Vaadin Projects Chevron down icon Chevron up icon
Modularization and Main Screens Chevron down icon Chevron up icon
Implementing Server-Side Components with Internationalization Chevron down icon Chevron up icon
Implementing Authentication and Authorization Chevron down icon Chevron up icon
Connecting to SQL Databases Using JDBC Chevron down icon Chevron up icon
Connecting to SQL Databases Using ORM Frameworks Chevron down icon Chevron up icon
Implementing CRUD User Interfaces Chevron down icon Chevron up icon
Adding Reporting Capabilities Chevron down icon Chevron up icon
Lazy Loading Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(2 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Manuel Rey Jan 30, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Iniciare con este framework recomendado por bluemix de ibm
Amazon Verified review Amazon
ivonne remon Nov 14, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
nice reference
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.