News

The Observable design pattern is used in many important Java APIs. One well-known example is a JButton that uses the ActionListener API to execute an action. In this example, we have an ...
the Decorator design pattern proves far more flexible than inheritance. In this article, I first introduce the Decorator pattern, starting with an example that shows how to use Java’s I/O ...
We discuss some of the most common design patterns in Java and how they can help you ... the if-else block of the above example would be replaced by multiple factory classes (one for each subclass).
Another Java pattern matching example is with the when clause. This clause introduces guarded patterns, with which developers can write for more sophisticated pattern-matching logic. Consider the ...
Event sourcing is an architectural software pattern that's useful to design complex and distributed systems ... in terms of the execution of all the moves (events) in the game. For example, aspiring ...