31 Oct 2024
DZone Java Zone
Faster Startup With Spring Boot 3.2 and CRaC, Part 2
This is the second part of the blog series "Faster Startup With Spring Boot 3.2 and CRaC," where we will learn how to warm up a Spring Boot application before the checkpoint is taken and how to provide configuration at runtime when the application is restarted from the checkpoint.
Overview
In the previous blog post, we learned how to use CRaC to start Spring Boot applications ten times faster using automatic checkpoints provided by Spring Boot 3.2. It, however, came with two significant drawbacks:
31 Oct 2024 12:00pm GMT
30 Oct 2024
DZone Java Zone
Java Is Greener on Arm
Even those not particularly interested in computer technology have heard of microprocessor architectures. This is especially true with the recent news that Qualcomm is rumored to be examining the possibility of acquiring various parts of Intel and Uber is partnering with Ampere Computing.
Hardware and software are evolving in parallel, and combining the best of modern software development with the latest Arm hardware can yield impressive performance, cost, and efficiency results.
30 Oct 2024 9:00pm GMT
How to Get Plain Text From Common Documents in Java
In this article, we'll learn how to extract plain text strings from a few of the most common file types (PDF, DOCX, XSLX, PPTX) we can expect to deal with on a day-to-day basis as programmers in an enterprise environment.
We'll briefly review when to use plain text extraction methods over Optical Character Recognition (OCR) text extraction methods, and we'll discuss some use cases for retrieving plain text in a real-world scenario. Ultimately, we'll cover a few open-source APIs that are perfect for handling plain text extraction on a one-off basis, at the end we'll demonstrate a proprietary API that saves time by automatically detecting each different file type before extracting plain text content.
30 Oct 2024 7:00pm GMT
Hot Class Reload in Java: A Webpack HMR-Like Experience for Java Developers
In the world of software development, time is everything. Every developer knows the frustration of waiting for a full application restart just to see a small change take effect. Java developers, in particular, have long dealt with this issue. But what if you didn't have to stop and restart every time you updated a class? Enter Hot Class Reload (HCR) in Java - a technique that can keep you in the flow, reloading classes on the fly, much like Hot Module Reload (HMR) does in JavaScript.
In this guide, we'll walk through how to implement HCR and integrate it into your Java development workflow. By the end, you'll have a powerful new tool to reduce those long, unproductive restart times.
30 Oct 2024 2:00pm GMT
29 Oct 2024
DZone Java Zone
Enhance User Experience With a Formatted Credit Card Input Field
In this article, I will guide you on how to create a credit card input by extending existing ZK components. Moreover, I'll apply a customized ZK JavaScript widget to format the card numbers in groups of four digits, improving readability and user experience. Additionally, we'll integrate a custom JavaScript widget to ensure that only numeric input is accepted.
This guide is ideal for web developers needing a dedicated input field for credit card information. Using the ZK UI Framework as an example, I'll walk you through creating a well-structured, readable credit card input box.
29 Oct 2024 5:00pm GMT
Top Takeaways From Devoxx Belgium 2024
In October 2024, I visited Devoxx Belgium and again it was an awesome event! I learned a lot and received quite some information which I do not want to withhold from you. In this blog, you can find my takeaways from Devoxx Belgium 2024!
Introduction
Devoxx Belgium is the largest Java conference in Europe. This year, it was already the 21st edition. As always, Devoxx is being held in the fantastic theatres of Kinepolis Antwerp. Each year, there is a rush on the tickets. Tickets are released in several batches, so if you did not have a ticket during the first batch, you will get another chance.
29 Oct 2024 2:00pm GMT
28 Oct 2024
DZone Java Zone
Filtering Java Collections via Annotation-Driven Introspection
Since Java 8, the programming workload of iterating over collections and selecting a subcollection (filtering) based on defined constraints (predicates) has been considerably simplified using the new Stream API. Despite this new feature, some scenarios can still overwhelm developers by requiring them to implement a significant amount of very specific code to meet the filtering conditions. A common example in enterprise systems is the need to filter:
". . . a collection where each object is an element of a large graph and the attributes to be considered in the filters belong to distinct objects."
28 Oct 2024 9:00pm GMT
24 Oct 2024
DZone Java Zone
Summary of the AJAX Frameworks Comparison
In previous weeks, I've analyzed several libraries and frameworks that augment the client with AJAX capabilities.
In this post, I'll compare them across several axes.
24 Oct 2024 6:00pm GMT
High-Speed Real-Time Streaming Data Processing
From data ingestion to reporting, the primary goal is to convert data into actionable information. Online data is growing at a much faster rate than data processing speeds. For businesses to stay competitive, data must be readily available for making informed decisions as early as possible. Live data streaming software is becoming a vital part of data infrastructures to get data to processing systems as early as possible. While different streaming software are available, it is crucial to understand the domain context and available infrastructure.
Each business use case is unique and should be treated with white-glove treatment. The critical thing to remember is that cheap, fast, and good will never make a feasible combination. The affordable solution may be quick but not good; a fast solution may be good but not cheap, and so on. An ideal example of this concept would be real-time streaming data processing.
24 Oct 2024 4:00pm GMT
22 Oct 2024
DZone Java Zone
Implement Hibernate Second-Level Cache With NCache
In this tutorial, we'll explore implementing a second-level cache in Hibernate using NCache.
We'll set up a Java application with Hibernate. Then we'll configure NCache as the second-level cache. Finally, we'll test the implementation to see how caching reduces the database load and improves performance.
22 Oct 2024 7:00pm GMT
21 Oct 2024
DZone Java Zone
How to Implement Client-Side Load Balancing With Spring Cloud
It is common for microservice systems to run more than one instance of each service. This is needed to enforce resiliency. It is therefore important to distribute the load between those instances. The component that does this is the load balancer. Spring provides a Spring Cloud Load Balancer library. In this article, you will learn how to use it to implement client-side load balancing in a Spring Boot project.
Client and Server Side Load Balancing
We talk about client-side load balancing when one microservice calls another service deployed with multiple instances and distributes the load on those instances without relying on external servers to do the job. Conversely, in the server-side mode, the balancing feature is delegated to a separate server, that dispatches the incoming requests. In this article, we will discuss an example based on the client-side scenario.
21 Oct 2024 6:00pm GMT
Dust: Open-Source Actors for Java
Virtual Threads
Java 21 saw the supported introduction of virtual threads. Unlike regular Java threads (which usually correspond to OS threads), virtual threads are incredibly lightweight, indeed an application can create and use 100,000 or more virtual threads simultaneously.
This magic is achieved by two major changes to the JVM:
21 Oct 2024 12:00pm GMT
17 Oct 2024
DZone Java Zone
Vaadin: The Battery-Included, Server-Side AJAX Framework
I've written a lot about Vaadin. I was so enthusiastic that I wrote the first book about it (besides the Book of Vaadin), its updated edition for Vaadin 7, and a companion website. Still, I'm amazed that so many people in the JVM world have never heard of it.
In this post, I'd like to introduce Vaadin in the context of AJAX and SSR.
17 Oct 2024 2:45pm GMT
16 Oct 2024
DZone Java Zone
How to Convert HTML to DOCX in Java
There's a far smaller audience of folks who understand the intricacies of HTML document structure than those who understand the user-friendly Microsoft (MS) Word application. Automating HTML-to-DOCX conversions makes a lot of sense if we frequently need to generate well-formatted documents from dynamic web content, streamline reporting workflows, or convert any other web-based information into editable Word documents for a non-technical business audience.
Automating HTML-to-DOCX conversions with APIs reduces the time and effort it takes to generate MS Word content for non-technical users. In this article, we'll review open-source and proprietary API solutions for streamlining HTML-to-DOCX conversions in Java, and we'll explore the relationship between HTML and DOCX file structures that makes this conversion relatively straightforward.
16 Oct 2024 3:00pm GMT
15 Oct 2024
DZone Java Zone
Mastering Date/Time APIs: Challenges With Java's Calendar and JDK Date/Time APIs
In this article, we'll address four problems covering different date-time topics. These problems are mainly focused on the Calendar API and on the JDK Date/Time API.
Disclaimer: This article is an abstract from my recent book Java Coding Problems, Second Edition.
15 Oct 2024 9:00pm GMT
09 Oct 2024
DZone Java Zone
Modify JSON Data in Postgres and Hibernate 6
This is another article in the series related to supporting the Postgres JSON functions in a project using the Hibernate framework with version 6. The topic for the article is modification operations on JSON records. As in the previous article, it is worth mentioning that Postgres might now have such comprehensive operations as other NoSQL databases like MongoDB for JSON modification (although, with the proper function constructions, it is possible to achieve the same effect). It still suits most projects that require JSON modification. Plus, with transaction support (not support in a NoSQL database at such a level), it is a pretty good idea to use Postgres with JSON data. Of course, NoSQL databases have other benefits that might suit better projects.
There are generally many articles on Postgres' support for JSON. This article focuses on integrating this support with the Hibernate 6 library.
09 Oct 2024 4:00pm GMT