Think twice before overriding Object.equals()

Overriding the Object.equals(Object) method, and its “companion” Object.hashCode(), provides your classes with some superpowers, but they are also one of the most common sources of problems that I see new and sometimes also more experienced Java and Vaadin developers struggling with. Some developers routinely override these, often for the wrong reasons; others do it accidentally via code generation tooling. I like to use Project Lombok, but beware of its @Data annotation!

Subscribe to our newsletter

Be the first to learn about new Vaadin resources and tips

Top fullstack Java UI framworks 2024

The best Java UI frameworks for full stack development in 2024

A framework is a collection of predefined code that developers use to create applications. Given Java’s endurance as the programming language of choice for decades, it has many frameworks with pre-existing libraries, classes, and functions. Developers can build applications without having to write ...
Fortify Your Java Web Apps: Expert Security Tips You Can't Afford to Miss

Best practices for Java web application security

Java is platform-independent, robust, and scalable – and it’s widely used across business and enterprise. But is Java secure? At Vaadin, we know that Java is secure by design, but we also know that, just like any other component of the secure development process, security comes down to how Java is ...
Creating Custom Form Fields in Vaadin

Creating well-behaving form fields using CustomField

Developing well-structured Vaadin applications is essentially composing a lot of well-named custom components. Some of those components have a few more responsibilities than giving order and structure to your codebase – namely fields, the components you use in your forms to edit the properties of ...
Application Modernization: 4 Can’t-Miss Tips for a Successful Transition

Four strategies and best practices for successful app modernization

Cutting-edge applications are necessary to maintain a competitive edge in the post-COVID era. Users today expect lightning-fast load times, intuitive interfaces, and accessibility from any device at any time. Born-in-the-cloud companies can use everything from serverless to artificial intelligence ...
4 Simple ways to display geospatial features in Vaadin Flow UIs

Four ways to display geospatial features in Vaadin Flow UIs

Java is a commonly used platform to edit geospatial data. There is almost an overload of various tools and libraries available. There are a number of UI widgets for Vaadin that allow you to plot and even edit geospatial information. The unique architecture of Vaadin Flow also allows you to build ...
Embrace This Game-Changing Programming Language for Enterprise Applications

Four reasons to choose Java for enterprise application development

The enterprise environment presents a distinct set of demands: scalability to manage large workloads, extremely robust security, and seamless integration with legacy systems. Within this distinct set of demands, Java offers compelling advantages to the enterprise. In this article, we explain why ...
Kotlin and Vaadin logos side by side in white

Build modern web apps 100% in Kotlin

Build modern web apps in 100% Java is the tagline often used for Vaadin Flow. By changing the language, this could actually apply to Kotlin as well, known for its Kotlin-to-JavaScript transpilation. Kotlin code can be transpiled to JavaScript for execution in the browser, so one could argue that no ...
Graphic of a desktop screen with code and the text

Looking for a Java Swing alternative? Consider Vaadin’s modern UI framework

Discover how Vaadin's modern UI framework offers a seamless and advanced alternative to Java Swing for developing desktop and web applications. Is Java Swing still being used? Java Swing was once the go-to for creating desktop applications, but as technology has evolved, it's starting to show its ...
Responsive Web Design with Java and Vaadin Flow

Building responsive websites with Java and Vaadin Flow

Responsive web design is an approach to building web applications that dynamically change the size or orientation of the visible elements for ideal viewing on viewports of various sizes. At various breakpoints (developer-defined numerical values of viewpoint dimensions), one may notice menus ...