Category : Articles

Sorting is common functionality required by many applications. Questions like: How do we sort in Java? or What should we use as sorting algorithm? need to answered before we can perform any kind of sorting. Definitely we are not the first ones who require this feature and others have already done it before for us. So we can simple use the Java API provided to perform sorting.

Albert Attard
Author: 3 years ago

Spring provides a simple API to work with SQL called JdbcTemplate (JavaDoc). This is a very popular class as it simplifies the code when dealing with databases. The JdbcTemplate does not provide transaction support out-of-the-box and in this article we will see how to make use of transactions.

Albert Attard
Author: 3 years ago

A question that some developers ask is, with many List (Java Doc) implementations, which one should one uses? The correct answer to this question is, it depends. In this article we compared various lists implementations and measured their performance when executing some common actions. Some implementations performed poorly when compared to the others are highlighted in the first two tests. This does not mean that those that did not do well should never be used. On the contrary, all implementations have their place and here we only considered single threading environment. Before using any given list, stop and think how this list is going to be used and run some tests like the ones we saw here before jumping into any hasty conclusions.

Albert Attard
Author: 3 years ago

Dependency injection is quite popular and there are many articles about this in the Internet. Most of these articles focus on a specific technology and show you how to use dependency injection. This article focuses on why we use dependency injection in order to help the reader understanding the idea and concept behind dependency injection.

Albert Attard
Author: 3 years ago

Maven is a framework, or an application if you may, which helps you manage a project’s lifecycle. For those new to Maven, usually we have our IDE such as Eclipse, NetBeans or SpringSource Tool Suite (STS), to handle the creation, compilation and deploying of projects. Instead, we can use Maven independent from the development environment (to some extent), to manage the project’s lifecycle. In this article we will see how Maven can help use in managing dependencies and creating a final product which can be deployed to a production system.

Albert Attard
Author: 4 years ago

Spring 3.1 introduced a new and simply way to cache results. In this article we will see how we can use the new Spring caching mechanism and how we can use it within projects. The readers of this article are expected to have some basic knowledge about Spring and the dependency injection (or as it also referred to: inversion of control).

Albert Attard
Author: 4 years ago

In Java 5, a new set of classes related to concurrency was added to the Java API, mostly authored by the famous Doug Lea. These include the ExecutorService (Java Doc) and the Future (Java Doc) classes to name a few, all part of the concurrency framework which was introduced in the same version of Java (Concurrency Utilities Overview). This article describes a problem related with stopping a group or Future in time. It first shows the problem and then proposes a simple solution.

Albert Attard
Author: 4 years ago