12 Jun 2025
DZone Java Zone
Beyond Java Streams: Exploring Alternative Functional Programming Approaches in Java
Few concepts in Java software development have changed how we approach writing code in Java than Java Streams. They provide a clean, declarative way to process collections and have thus become a staple in modern Java applications. However, for all their power, Streams present their own challenges, especially where flexibility, composability, and performance optimization are priorities.
What if your programming needs more expressive functional paradigms? What if you are looking for laziness and safety beyond what Streams provide and want to explore functional composition at a lower level? In this article, we will be exploring other functional programming techniques you can use in Java that do not involve using the Streams API.
12 Jun 2025 2:00pm GMT
11 Jun 2025
DZone Java Zone
Java Enterprise Matters: Why It All Comes Back to Jakarta EE
Enterprise Java has been a foundation for mission-critical applications for decades. From financial systems to telecom platforms, Java offers the portability, stability, and robustness needed at scale. Yet as software architecture shifts toward microservices, containers, and cloud-native paradigms, the question naturally arises: is Jakarta EE still relevant?
For modern Java developers, the answer is a resounding yes. Jakarta EE provides a standardized, vendor-neutral set of APIs for building enterprise applications, and its evolution under the Eclipse Foundation has been a case study in open innovation. It bridges traditional enterprise reliability with the flexibility needed for today's distributed systems, making it an essential tool for developers who want to build scalable, secure, and cloud-ready applications.
11 Jun 2025 7:00pm GMT
09 Jun 2025
DZone Java Zone
Kung Fu Code: Master Shifu Teaches Strategy Pattern to Po – The Functional Way
"There is no good or bad code. But how you write it… that makes all the difference." - Master Shifu
The sun had just touched the tips of the Valley of Peace. Birds chirped, the wind whispered tales of warriors, and Po-the Dragon Warrior-was busy trying to write some Java code. Yes, you read that right.
09 Jun 2025 1:00pm GMT
06 Jun 2025
DZone Java Zone
How to Create a Custom React Component in Vaadin Flow
Vaadin Flow is a Java-based, backend-driven UI framework that is best suited for admin UIs, where the number of active users is predictable and bounded. Within this controlled context, the UI state can be managed on the backend, sharing only the necessary diffs with the user for rendering.
From a developer's perspective, all UI configuration remains in Java code. There is no need to manually create separate REST endpoints, as the UI component state is managed directly within Java.
06 Jun 2025 8:00pm GMT
How to Identify the Underlying Causes of Connection Timeout Errors for MongoDB With Java
Java developers and MongoDB are like Aladdin and the Genie from Arabian Nights. Developers rub the lamp with their wildest NoSQL wishes, and MongoDB swoops in, granting Spring Boot microservices and REST APIs the magic they need to soar. But every so often, a Jafar-like menace swoops in, forcing our Aladdin (Java devs) to wrestle with sleepless nights. One such villainous foe is the connection timeout, locking APIs in a cave of wonders with no escape, leaving developers yearning for a magic carpet fix.
So, what's a connection timeout error? Imagine Aladdin, the developer, sending Abu, his trusty monkey, to fetch a shiny treasure-data-from MongoDB's palace vault. Abu's got 30 seconds to scamper over and back. But if the palace is packed with guards (server overload), the gates are jammed shut (network issues), or Abu's running to the wrong hideout (bad address), and he doesn't make it in time. That's a timeout: MongoClient can't grab the data, the mission fails, and your app's stuck with a MongoTimeoutException, leaving your API as empty-handed as Aladdin without his loot. In simple terms, it's when your MongoClient-the trusty bridge between your Java app and MongoDB-can't reach the server before the clock runs out.
06 Jun 2025 2:00pm GMT
04 Jun 2025
DZone Java Zone
Supercharge Your Java Apps With AI: A Practical Tutorial
Artificial intelligence (AI) offers great potential for software applications by providing options like natural language processing, image recognition, and predictive analysis, which can be integrated within software.
This tutorial aims to empower developers to unlock advanced functionalities by providing a blend of theoretical insights and practical, code-centric examples, allowing for seamless integration of AI in their Java applications.
04 Jun 2025 1:00pm GMT
03 Jun 2025
DZone Java Zone
Beyond Bytecode: Exploring the Relationship Between JVM, JIT, and Performance
In computing, the execution of programs written in high-level languages requires that the source code be compiled to a low-level or native language. This compilation is referred to as Ahead-of-Time (AOT) and is typically done during build time. Effectively reducing the work to be done during runtime.
In case of Java, the AOT produces an intermediate binary, viz. bytecode, which is then translated to native machine code during execution by the Java Virtual Machine (JVM). This is in line with Java's philosophy of Write-Once-Run-Anywhere (WORA), or simply put, platform independence.
03 Jun 2025 2:00pm GMT
29 May 2025
DZone Java Zone
Monoliths, REST, and Spring Boot Sidecars: A Real Modernization Playbook
Forget the idea that modernization has to mean rewriting everything. The real work happens in the in-between, where REST meets SOAP, where sidecars live beside WAR files, and where code changes are political before they're technical.
Especially in high-stakes, compliance-bound environments like healthcare, government, and labor systems, modernization doesn't look like a revolution. It looks like a careful negotiation.
29 May 2025 5:00pm GMT
Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 3: Understanding Janus
Graph databases are increasingly popular in modern applications because they can model complex relationships natively. Graphs provide a more natural representation of connected data from recommendation systems to fraud detection. Our previous articles explored graph databases broadly and delved into Neo4j. In this third part, we focus on JanusGraph, a scalable and distributed graph database.
Unlike Neo4j, JanusGraph supports multiple backends and leverages Apache TinkerPop, a graph computing framework that introduces a standard API and query language (Gremlin) for various databases. This abstraction makes JanusGraph a flexible choice for enterprise applications.
29 May 2025 2:00pm GMT
28 May 2025
DZone Java Zone
Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 2: Understanding Neo4j
Graph databases have rapidly gained popularity in modern software architecture, as systems increasingly rely on relationships, recommendations, and connected data. From social media platforms and fraud detection systems to recommendation engines and knowledge graphs, graph databases offer a powerful way to model and traverse complex relationships that are hard to express efficiently in relational databases.
This second part of the series narrows the focus to Neo4j, the market's most prominent graph database engine. We'll explore its architecture, query language (Cypher), and see how Java developers can leverage Eclipse JNoSQL 1.1.8 to integrate it seamlessly into Java applications.
28 May 2025 9:00pm GMT
Simpler Data Transfer Objects With Java Records
In very general terms, data transfer objects (DTOs) are structures that allow packing data when information is exchanged among applications or processes. While business objects or even entities own both state and behavior, DTOs should have only state. I personally see them as the apparel that the domain, the application's "center of purity," puts on when engaging in interactions with the "exterior."
Java records, on the other hand, prove very useful when data-oriented structures are needed, as a lot of boilerplate code is removed.
28 May 2025 8:00pm GMT
How to Introduce a New API Quickly Using Micronaut
In the first two articles of this series (part 1 and part 2), I demonstrated how quickly an idea can become a reality using Spring Boot, the framework I have used for over 10 years to establish new services. I stepped out of my comfort zone in the last article (part 3) when I used Quarkus for the first time, which offered a really nice CLI to assist with the development process.
I would like to close out this short series with another framework that's new (to me), called Micronaut.
28 May 2025 11:00am GMT
27 May 2025
DZone Java Zone
Introducing Graph Concepts in Java With Eclipse JNoSQL
When we talk about databases today, we face a landscape of diversity. Gone are the days of a one-size-fits-all solution. We live in an era of polyglot persistence, where the guiding principle is to use the most appropriate data model for each use case. This article focuses on graph databases, their structure, practical applications, and how Java developers can leverage Eclipse JNoSQL and Jakarta Data to work seamlessly with them.
Graph databases enable richer and more natural modeling of connected data. Unlike traditional relational databases that require complex joins to represent relationships, graph databases make relationships first-class citizens. A graph model organizes data into vertices (nodes) and edges (relationships). Both vertices and edges can hold properties, and edges are directional, adding semantic meaning to how data points connect.
27 May 2025 3:00pm GMT
Using Java Stream Gatherers To Improve Stateful Operations
In the AngularPortfolioMgr project, the logic for calculating the percentage difference between stock quotes is a stateful operation, since it requires access to the previous quote.
With Java 24, Stream Gatherers
are now finalized and offer a clean way to handle such stateful logic within the stream itself.
27 May 2025 1:00pm GMT
22 May 2025
DZone Java Zone
Chat With Your Knowledge Base: A Hands-On Java and LangChain4j Guide
Disclaimer: This article details an experimental project built for learning and demonstration purposes. The implementation described is not intended as a production-grade solution. Some parts of the code were generated using JetBrains' AI Agent, Junie.
Large language models (LLMs) like GPT-4, Llama, and Gemini have revolutionized how we interact with information. However, their knowledge is generally limited to the data they were trained on. What if you need an AI assistant that understands your specific domain knowledge - your company's internal documentation, product specs, or operational data from a complex system?
22 May 2025 1:00pm GMT
21 May 2025
DZone Java Zone
How to Merge HTML Documents in Java
Java developers are often handed the challenge of consolidating documents in efficient file processing workflows. With this prompt, HTML might not be the first document format that comes to mind - we might think of "file processing" as pertaining to robust, "business-y" formats like PDF or Excel first and foremost - but HTML's importance in many modern enterprise environments can't be understated. Whether it's a question of processing data pulled together from multiple online sources, piecing scraped web pages together, or consolidating custom web-based reports, programmatically combining and packaging HTML content is often highly relevant.
In this article, we'll take a closer look at what it means to merge HTML content programmatically, and we'll point out some of the specific challenges Java developers can expect to encounter in this endeavor. Towards the end, we'll touch on some open-source libraries and third-party APIs we can use to build HTML merging capabilities into a file processing workflow, carefully weighing the benefits of each approach.
21 May 2025 9:00pm GMT