1. Overview In this tutorial, we'll investigate Java's built-in support for the observer pattern. When we try to implement the observer pattern, we...
Continue Reading1. Overview The Observer pattern allows us to establish a communication channel between two parties: the subject and observer. It's also known as t...
Continue Reading1. Overview In this tutorial, we'll look at how we can apply the decorator pattern using Lombok's @Delegate annotation. 2. Why Use @Delegate? Let's...
Continue Reading1. Code Reuse with Multiple Decorators? In this tutorial, we're going to look at how we can use forwarding decorators to enable code reuse when we ...
Continue Reading1. Overview There are mainly two ways to add new responsibility to a class: inheritance and composition. With inheritance, we rely on the subclasse...
Continue Reading1. Task In this task, we 'll explore the Java dynamic proxy mechanism. In essence, we'll secure an application service using the JDK dynamic proxie...
Continue Reading1. Overview In this article, we'll secure an existing service using the proxy pattern. We'll perform the authorization checks according to the curr...
Continue Reading1. Overview In this tutorial, we'll introduce caching to an existing service using the proxy pattern. So the service calls will return the cached r...
Continue Reading1. Overview In this tutorial, we'll examine the use cases of the Proxy Pattern and how we can implement it in Java. 2. When To Use A proxy is a sur...
Continue Reading1. Overview Should strategy classes be stateless or stateful? This is a question related to API design and may have different meanings for differen...
Continue Reading