Proxy Pattern vs Decorator Pattern

This post explores the differences between the Proxy Design Pattern and the Decorator Design Pattern.

November 4, 2019

Proxy Design Pattern

The Proxy Design Pattern provides a surrogate or placeholder for another object to control access to it. It acts as a stand-in for another object.

October 27, 2019

Decorator Design Pattern

The Decorator design pattern attaches additional responsibilities to an object dynamically. It is an alternative to subclassing for extending functionality.

October 23, 2019

Three Ways to Sort a List in Java

In this blog post, we will see three ways to sort a list in Java. We will see how to sort in ascending and in reversed order.

October 13, 2019

Collectors groupingBy with Examples

The Collectors groupingBy is a static utility method in the Collectors class. It is used to group the stream elements by a key. In this blog post, we will look at the Collectors groupingBy with examples.

October 6, 2019

Java 8 Collectors toMap with Examples

In this blog post, I will demonstrate the Java 8 Collectors.toMap method with examples and how it’s used to fold a stream into a map.

September 29, 2019

Google Guava Iterators

Google Guava is a Java library belonging to the Guava project of Google. In this post, we will look at the Google Guava Iterators utility class.

September 23, 2019

Observer Pattern using Java’s Observable

The Observer Design Pattern enables the subject to notify its observers when its state changes. In this post, we implement it using Java’s Observable class.

September 16, 2019

Observer Design Pattern

The Observer Design Pattern defines a one-to-many dependency between objects so that when the subject’s changes state, all of its observers are notified.

August 26, 2019

Joiner in Google Guava

Google Guava is a Java library belonging to the Guava project of Google. We will look at the Joiner Utility class in the Google Guava library.

August 20, 2019