Dabaoshi
Author

Dabaoshi

Practical utilities

49
Articles
0
Likes
24
Views
0
Comments
Recent Articles

Latest from Dabaoshi

49 recent articles
Dabaoshi
Dabaoshi
Aug 12, 2026 · Fundamentals

Why Mediator, Visitor, and Interpreter Are the Rarest Design Patterns (And When to Avoid Them)

This article examines the three least‑used behavioral design patterns—Mediator, Visitor, and Interpreter—by explaining the problems each solves, showing core implementations with order‑page examples, highlighting their narrow applicability, common pitfalls, and why developers should often steer clear of them.

Design PatternsSoftware Architecturebehavioral
0 likes · 12 min read
Why Mediator, Visitor, and Interpreter Are the Rarest Design Patterns (And When to Avoid Them)
Dabaoshi
Dabaoshi
Aug 11, 2026 · Fundamentals

Why the Iterator Pattern Is the Most Used Yet Unnoticed Design Pattern in Java

The article explains how the Iterator pattern, built into Java as Iterable and Iterator interfaces, lets you traverse any collection uniformly without exposing its internal structure, demonstrates the fail‑fast mechanism, and shows when custom collections should implement Iterable.

CollectionDesign PatternIterable
0 likes · 13 min read
Why the Iterator Pattern Is the Most Used Yet Unnoticed Design Pattern in Java
Dabaoshi
Dabaoshi
Aug 11, 2026 · Fundamentals

Command Pattern: Turning Operations into Objects for Undo, Redo, and Queuing

The article explains how the Command pattern encapsulates a request as an object, enabling storage, queuing, undo/redo, and decoupling between request senders and executors, with concrete Java examples and guidance on when the pattern is appropriate.

Command PatternDecouplingDesign Patterns
0 likes · 13 min read
Command Pattern: Turning Operations into Objects for Undo, Redo, and Queuing
Dabaoshi
Dabaoshi
Aug 10, 2026 · Fundamentals

State Pattern Explained: Turning Conditional Logic into Flowing State Transitions

The article demonstrates how the State design pattern replaces tangled if‑else state checks with dedicated state classes, using an order lifecycle example to compare it with Strategy, explain role responsibilities, transition driving mechanisms, and guidelines for when to apply the pattern.

JavaObject-OrientedState Machine
0 likes · 15 min read
State Pattern Explained: Turning Conditional Logic into Flowing State Transitions
Dabaoshi
Dabaoshi
Aug 10, 2026 · Fundamentals

Chain of Responsibility Pattern: Build Scalable, Extensible Validation Chains

The article explains the Chain of Responsibility design pattern, showing how to replace tangled nested if‑checks in order‑validation logic with a series of independent handler objects linked together, and demonstrates its implementation, variations, real‑world uses in filters, interceptors, and guidelines for when the pattern is appropriate.

Chain of ResponsibilityDesign PatternJava
0 likes · 15 min read
Chain of Responsibility Pattern: Build Scalable, Extensible Validation Chains
Dabaoshi
Dabaoshi
Aug 9, 2026 · Fundamentals

Observer Pattern: Decoupling Order Payment Success Actions via Publish‑Subscribe

The article explains the Observer pattern by first showing the problems of hard‑coding post‑payment actions, then detailing how defining a subject, observer interface, and concrete observers decouples the system, discusses push vs pull notification models, and illustrates real‑world uses in Spring events, GUI listeners, and message queues.

DecouplingJavaObserver Pattern
0 likes · 14 min read
Observer Pattern: Decoupling Order Payment Success Actions via Publish‑Subscribe
Dabaoshi
Dabaoshi
Aug 9, 2026 · Fundamentals

Template Method Pattern: Fix the Skeleton, Vary the Steps

The article explains the Template Method design pattern, showing how to lock a fixed process skeleton in a parent class while delegating variable steps to subclasses, contrasting it with the Strategy pattern and illustrating its use in real‑world frameworks.

Design PatternFinalHook Method
0 likes · 14 min read
Template Method Pattern: Fix the Skeleton, Vary the Steps
Dabaoshi
Dabaoshi
Aug 8, 2026 · Fundamentals

Understanding JVM Class Loading: Mechanisms, Delegation, and Custom ClassLoaders

This article walks through the full lifecycle of a Java class—from loading, verification, preparation, and resolution to initialization, usage, and unloading—explains active versus passive references, the parent‑delegation model, JDK 8‑to‑17 module‑system changes, and shows how to write a custom ClassLoader for class isolation.

Class LoadingClassLoaderCustom ClassLoader
0 likes · 26 min read
Understanding JVM Class Loading: Mechanisms, Delegation, and Custom ClassLoaders
Dabaoshi
Dabaoshi
Aug 8, 2026 · Fundamentals

Strategy Pattern: Replacing Conditional Branches with Pluggable Algorithms

The article explains how the Strategy design pattern solves the maintenance nightmare of tangled if‑else or switch statements by extracting each algorithm into its own strategy class, detailing the roles, selection mechanisms, Java examples, and when the pattern is appropriate.

ComparatorDependency InjectionDesign Patterns
0 likes · 14 min read
Strategy Pattern: Replacing Conditional Branches with Pluggable Algorithms
Dabaoshi
Dabaoshi
Aug 8, 2026 · Fundamentals

Bridge Pattern – How to Avoid Multiplicative Class Explosion in Structural Design

The article explains how the Bridge design pattern separates two orthogonal dimensions—such as order type and notification channel—into independent hierarchies, replacing inheritance‑driven class explosion with compositional bridges, and demonstrates its rationale, code, real‑world examples, and differences from similar patterns.

Bridge PatternComposition over InheritanceDesign Patterns
0 likes · 14 min read
Bridge Pattern – How to Avoid Multiplicative Class Explosion in Structural Design