Structural and Behavioral Design Patterns
5.6 Composite Pattern
5.6.1 Overview
This image is very familiar, and the above diagram can be seen as a file system. This kind of structure is called a tree structure. In a tree structure, you can call a method to traverse the entire tree, and when you find a leaf node, you can perform relevant operations on the leaf node. You can think of thi ...
Posted on Wed, 20 May 2026 05:29:56 +0000 by ryanbutler
The Interpreter Pattern: A Comprehensive Guide
Ovevriew
The Interpreter pattern is a behavioral design pattern that defines a grammatical representation for a language and provides an interpreter to handle this grammar. It's particularly useful when you need to evaluate sentences or expressions in a specific language.
When to Use
The Interpreter pattern is most effective in the following si ...
Posted on Mon, 18 May 2026 23:48:50 +0000 by pythian
Behavioral Design Patterns: Chain of Responsibility and Command in Java
Chain of Responsibility Pattern
The Chain of Responsibility pattern decouples request senders from receivers by passing requests along a chain of handlers. Each handler either processes the request or forwards it to the next handler in the chain. This pattern is useful for scenarios like approval workflows, logging systems, or HTTP interceptors ...
Posted on Mon, 18 May 2026 13:39:38 +0000 by CookieDoh