Web Development

Vaadin Community Award

A word of thanks

I have recently been awarded the Vaadin Community Award for my talks and publications on the Vaadin framework, as well as my community support on Stack Overflow and the Vaadin Discord (don’t hesitate to drop me a line!), something which I am very grateful for. Being part of the Vaadin community has been, and is, a very fulfilling journey! Today I would like to tell you a little about the object of this incredible adventure, and how you can use it on your own IT journey.

Who or What is Vaadin you might ask

> Vaadin is the Finnish word for a reindeer doe. It is also the name of one of the most versatile and efficient Java full-stack web application frameworks in existence, featuring rich UI-building capabilities. A framework, as opposed to a library, is a complete solution, containing all the tools and guidelines to build your entire application. This includes automation for the connection to your application’s back end, handling vital tasks such as authentication, database connectivity, and data validation. Vaadin is also an actively maintained open-source software, with a well-established community. Are you a Java developer who has been dreaming of developing feature-rich web GUIs, using nothing but Java code? Now you can! No HTML or JavaScript required!

Development on Vaadin began in 2001. The fact that it is one of the older Java frameworks does not however mean that it is outdated, as its active community-based development has ensured a constant modernization of the software, with new technologies being integrated continuously. Notable technology integrations were AJAX in 2005, Google Web Toolkit in 2009, Web Components in 2017, the Vaadin Components and Flow development framework in 2019, and Spring and TypeScript in 2020. As a result, we now have a mature, modern, and very versatile Java framework, one which is up to a multitude of tasks.

Apart from its free open-source version, Vaadin is also available as a commercial version. In its commercial version, Vaadin comes with its own, Selenium-based, testing tools, which are grouped in the Vaadin Testbench. The Testbench allows for extensive testing on the UI layer.

Java for web applications

Vaadin features a server-driven architecture. The view-logic is implemented in Java code, while the remainder of the code resides in the database. The client-side in the browser incorporates web components, HTML templates, and the CSS theme. On the server-side, we have the Vaadin front controller, which is a Spring Boot HTTP Servlet, that sends the aforementioned artifacts to the client, handles client HTTP requests, and sends its responses in JSON. Note that the web components and the CSS theme used can be the built-in ones or your own, custom-developed ones.

The servlet also contains the UI code to provide the UI logic. It communicates with the back-end server to use its business logic and access its persistent data. In other words, both the application logic and the business logic are running on the server itself. The client only uses the browser to display the output, by reading the JSON response and updating the page elements accordingly. Communication between server and client includes pull as well as push capabilities. The latter allows for the push notification of the client if changes occur regarding the server’s state or data.

Vaadin’s page livecycle utilizes a rendered single-page application at runtime, instead of using server-side rendering. Classical single-page solutions maintain the page state on the client-side, with the server just supplying the data. Vaadin however maintains the page state on the server. Using client-side rendering reduces the server load while maintaining the page state server-side allows for greater security and integrity.

Developing Vaadin web applications is possible from two approaches; using either the Vaadin Flow or Vaadin Fusion frameworks. Vaadin Flow offers a typesafe Java UI component API on the server-side, using Web Components. This eliminates the need for a REST API and enables the UI to directly access any services or repositories. As all of the UI logic is located on the server, its exposure to attacks is at a minimum level.

Vaadin Fusion, on the other hand, offers the integration of a Spring Boot Java Backend with a fully reactive TypeScript frontend. The type-safe server access simplifies secure data access from the client-side, while your app can be secured using Spring Security and then deployed as a standalone JAR archive file.

Simple and efficient data binding

Data binding is bidirectional; any UI changes on either the server or the client-side are instantaneously synced to the other. Routing with path variables, i.e. bookmarks, is a fully supported mode of navigation. Vaadin uses a grid to display data on web pages, while the pages themselves are lazy-loaded.

Are you intending to use an SQL database in your backend? SQL can easily be integrated using JOOQ, which allows for embedding typesafe SQL queries in your Java code. This allows Vaadin to query nearly all currently existing SQL databases. It can then use this data to generate tables based on the JOOQ records. Automatic bindings, initial conditions, and sortings are all possible.

Perfectly suited for data-centric applications

With such tooling, your data-centric enterprise application, such as an ERP system coupled with a webshop, is a prime use case for the Vaadin web application framework. Using Vaadin, a suitable UI can be generated using UI data straight from your backend’s database. Vaadin comes with a well-sized library of comprehensive and robust UI components. All of these components are based on existing standards, with their code being well-structured and easy to update or tailor.

The security of your data is ensured by Vaadin’s minimal attack surfaces: With the UI logic running on your server, common client-side attacks are impossible to execute. Accordingly, all validations are performed on the server. Vaadin also stores a component tree in the HTTP session, containing the state of the UI, thus providing an additional layer of security.

We can help you with introducing with or migrating to Vaadin

Allow us to help you with integrating Vaadin with your existing IT applications, or migrating your desktop or web application infrastructure to Vaadin. Boost the performance and the integrity of your data-centric enterprise applications to the next level by migrating from your JSP, JSF, or JavaScript framework. Being a full-stack framework means that Vaadin can take care of the application backend as well as the application frontend. Your Java developers can implement the high-level functionality on both sides, without having to worry about the low-level functions and their issues. The Vaadin team maintains the framework while guaranteeing compatibility between updates, thus significantly reducing the maintenance burden on your IT organization.

Note that any application created in Vaadin is natively supported to run on all modern browsers. All of Vaadin’s components are standards-based, thus providing forward compatibility as well as flexibility in future projects. This provides your application with a long lifespan while ensuring that it remains up-to-date.

Why use Vaadin’s commercial version? Apart from your team getting additional tools, such as the Vaadin Testbench, you will also be receiving their stellar enterprise support, which features round-the-clock access to personal chat with their experts. This can save you and your developers an immense amount of time, especially when the going in a project gets tough. The optional warranty additionally bolsters your peace of mind.

Summary

Vaadin is a comprehensive framework that can enable your Java developers to begin and complete the development of a full-stack application out of the box, without the need for any additional tools. This full-stack property ensures that communication from the clients to your database is handled and secured by the Vaadin framework, without the need to develop a separate server-side application. Surfaces of attack are thus minimized. All of Vaadin’s developments are driven by the needs of its userbase, and Vaadin features a very long LTS lifespan. Direct access to Vaadin’s support is available, as well as to its leadership and product teams. Do not hesitate to contact us for more information on how you can make use of the Vaadin framework!

Published on Java Code Geeks with permission by Simon Martinelli, partner at our JCG program. See the original article here: Vaadin Community Award

Opinions expressed by Java Code Geeks contributors are their own.

Simon Martinelli

Simon Martinelli is a passionate Java, performance optimization and application integration expert and an active member of the Java community process (JSR-352 Java Batch and JSR-354 Money and Currency API). He is the owner of 72 Services LLC and an adjunct professor at Berne University of Applied Science in Switzerland, teaching software architecture and design and persistence technologies
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Back to top button