Java

Open Source Java Projects Move Closer Toward Consensus

When it comes to Java virtual machines, there has never been a shortage of proprietary and open-source options that developers have been employing to build a wide range of enterprise applications. However, the adoption of open-source Java platforms has not been as widespread as many providers of these platforms have hoped, mainly because of fragmentation within the Java community. To try and address that issue,...

Full-Text Search with Apache Lucene 5.3.x/5.4.x

Before we delve into Apache Lucene, the following are the most important terms that you need to be familiar with. This will also help you clarify a few terms before getting into search or information retrieval: We'll start with Apache Lucene 5.3.x/5.4.y. The most important aspects of Lucene are mentioned under each heading. Apache Lucene introduction Apache Lucene is a high-performance, full-featured text search engine library written...

Complex Event Processing and Correlation with Drools Fusion 6.x

Complex event processing is used to process a large stream of information and can be used for real-time event monitoring or correlation. Events can be processed in two ways, either in 'stream' mode or in 'cloud' mode. The following image illustrates the differences between the two modes: The continuous flow of information or events can be classified into one of these brackets (or even both)...

Business Rules Engines with Drools Expert 6.x

Business rules management systems (BRMS) are needed to execute one or more rules in an enterprise or software system. The ability to maintain and execute rules as separate from the application code is the greatest advantage of such rules engines. Business rules engines are a form of expert system, which allows for human expert-like decision-making abilities. Business rules engines are primarily of two types and...

Developing SOAP Web Services with Apache CXF and JiBX

Here we'll look at developing SOAP Web services using Apache CXF and JiBX. It may be helpful to start with an overview of SOAP Web services architecture, so we'll begin with the diagram below, plus some SOAP terminology. SOAP Web Services - Architecture Advantages of Apache CXF Apache CXF is currently the most widely used framework, and is preferred over Axis. Here's why: It separates the JAX-WS code...

API Documentation in Spring with Swagger

Documenting an application is an essential point of any project that is often overlooked. When working as a team, poor documentation can make the work of other developers very hard. Documenting APIs, in turn, is no different. Spring Boot, one of the most used frameworks in Java for API development, presents an easy way to integrate with Swagger. From the official website definition: Swagger is a powerful...

Software Design Patterns Using Java: Adapters and More

We looked at a number of software design patterns in the first part of this series. Here we'll continue our Java implementation of the design principles outlined by Elisabeth Freeman, Kathy Sierra and the "Gang of Four" authors. Adapter Pattern What do you do if you need to use a hairdryer in a different part of the world, each with different socket types? I would seek an adapter!...

Introduction to Software Design Patterns Using Java

I was going through the book "Head First Design Patterns" by Elisabeth Freeman and Kathy Sierra and came up with my own examples to understand their software design concepts better. You'll find several design examples below, along with sample Java code implementing the designs. This also builds on the earlier work of the "Gang of Four" authors of "Design Patterns: Elements of Reusable Object-Oriented...

Avoiding Math Confusion in Your Programs

Across the internet, there are posts asking what the correct answer is for what seems like a simple math problem. These generally result in hundreds or thousands of responses arguing the correct answer. For example, what is the value of X using the following math problem? X = 6 / 2(1+2) While a multitude of answers are often seen for this problem, the results generally center...

The Java Switch Statement Undergoes Big Changes

If you've not been paying attention to the Java language closely, then you might have overlooked some changes that have occurred to a basic language keyword. The switch statement has gotten a bit of attention and has been given some new capabilities. Consider a piece of code using the switch statement: String month = "October"; int days = 0; ...

Latest Articles