Twelve-Factor Application: Configuration in Spring

The Twelve-Factor application methodology is a collection of best practices that are designed to enable applications to be developed with portability and resilience when deployed. In this post, we’ll cover the third factor, Config. We’ll also see how the spring ecosystem contributes to helping developers achieve this factor. The Twelve-Factor application manifesto advocates on externalizing […]

Core Java: Date and Time

Since Java 8, Oracle completely rebuilt its Date/Time API. The new API is supposed to replace the old one. The new API which is located in the java.time package is thread-safe because most of the new classes are immutable, meaning that, after the object is constructed, it cannot be modified. This is especially useful when […]

Java Generics: Type Erasure & Wildcards

Specifying the generic type allows Java to perform type checking at compile-time. But when using generics in your code, due to “Type Erasure” that occurs at compile-time, generic type parameters are converted to the Object type. This makes generic type parameters unable to call other methods except for the Object ones. What if we want […]

Concurrency: Thread Safety In Java

What is Thread safety? To save you the time from looking up to Wikipedia here is the definition: Thread safety is a computer programming concept applicable to multi-threaded code. Thread-safe code only manipulates shared data structures in a manner that ensures that all threads behave properly and fulfill their design specifications without unintended interaction. What […]

Core Java: Comparator vs. Comparable

When working with custom objects, we often want to compare them based on some pre-defined criteria. That’s why we use the Comparable interface to implement a natural ordering for our custom objects. Also, we often need to specify a total ordering if there is no natural ordering implemented by our custom object or override the […]

Introduction to AOP and Spring AOP

1. What is AOP? To save you the time from looking up to Wikipedia here is the definition: aspect-oriented programming (AOP) is a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns. It does so by adding additional behavior to existing code (an advice) without modifying the code itself, instead […]