Tagged articles
121 articles
Page 1 of 2
Architect's Guide
Architect's Guide
Apr 28, 2026 · Backend Development

Tired of Endless if‑else? Try a Rule Engine for Cleaner Logic

The article shows how a growing list of if‑else checks for user eligibility becomes hard to maintain, then walks through designing and implementing a Java rule engine—defining rule abstractions, building an AND/OR executor, and demonstrating usage with concrete examples, while discussing its advantages and drawbacks.

BackendCode ExampleJava
0 likes · 7 min read
Tired of Endless if‑else? Try a Rule Engine for Cleaner Logic
Ray's Galactic Tech
Ray's Galactic Tech
Oct 28, 2025 · Fundamentals

Mastering the Chain of Responsibility Pattern: Clean Task Delegation & Decoupling

This article explains the Chain of Responsibility design pattern, its core concepts, typical use‑cases such as approval workflows and logging, provides step‑by‑step Java examples—including a basic leave‑request system and an advanced builder‑based chain—covers real‑world framework integrations, compares it with other patterns, and lists practical pros, cons, and best‑practice tips.

Chain of ResponsibilityDecouplingJava
0 likes · 10 min read
Mastering the Chain of Responsibility Pattern: Clean Task Delegation & Decoupling
Data STUDIO
Data STUDIO
Aug 27, 2025 · Fundamentals

Building a Lightweight State Machine with Python Enum

This article demonstrates how to implement a clear, maintainable state machine for a publishing workflow using Python's Enum type, covering state definitions, forward and backward transitions, validation, entry actions, and visualisation without external dependencies.

Pythondesign patternenum
0 likes · 7 min read
Building a Lightweight State Machine with Python Enum
Architect
Architect
Aug 26, 2025 · Backend Development

Mastering the Chain of Responsibility Pattern for Scalable Backend Validation

This article explains the Chain of Responsibility design pattern, outlines its typical application scenarios, and demonstrates two practical implementations—a multi‑step product creation validation and an expense‑approval workflow—showing how to configure, assemble, and execute handler chains dynamically in Java.

Chain of ResponsibilityJavadesign pattern
0 likes · 20 min read
Mastering the Chain of Responsibility Pattern for Scalable Backend Validation
Code Ape Tech Column
Code Ape Tech Column
Jun 19, 2025 · Fundamentals

Master the Chain of Responsibility Pattern: Concepts, Benefits, and Java Example

This article explains the Chain of Responsibility design pattern, detailing its definition, key characteristics, integration with the Strategy pattern, and practical Java code examples—including abstract interfaces, handlers, context management, and execution flow—illustrating how to build flexible, decoupled processing pipelines for complex business logic.

Chain of ResponsibilityJavaSoftware Architecture
0 likes · 11 min read
Master the Chain of Responsibility Pattern: Concepts, Benefits, and Java Example
Code Ape Tech Column
Code Ape Tech Column
May 20, 2025 · Backend Development

Dynamic Chain of Responsibility in Spring: A Practical Implementation

This article explains how to split a multi‑function OpenAPI endpoint into independent steps using the responsibility‑chain pattern in Spring, detailing the abstract component, context sharing, bean retrieval via ApplicationContext, and a controller that dynamically orders execution through a query parameter, with full code examples.

Chain of ResponsibilityJavaLiteFlow
0 likes · 9 min read
Dynamic Chain of Responsibility in Spring: A Practical Implementation
Selected Java Interview Questions
Selected Java Interview Questions
Apr 29, 2025 · Backend Development

Implementing a Chain of Responsibility for an OpenAPI Interface Using Spring and Custom Components

This article explains how to split a multi‑function OpenAPI interface into independent components using the chain‑of‑responsibility pattern in Spring, detailing the abstract base class, concrete handlers, a shared context, execution order configuration, and a test controller with full code examples.

BackendChain of ResponsibilityOpenAPI
0 likes · 7 min read
Implementing a Chain of Responsibility for an OpenAPI Interface Using Spring and Custom Components
Java Tech Enthusiast
Java Tech Enthusiast
Mar 7, 2025 · Backend Development

Implementing a Responsibility Chain Pattern with Spring Boot and MyBatis Plus

The article demonstrates how to build a dynamic Chain of Responsibility in a Spring Boot and MyBatis‑Plus application by defining an abstract handler, implementing concrete @Component beans that modify a shared Lombok‑based context, retrieving them via an ApplicationContext‑aware proxy utility, and invoking them in a client‑specified order through a REST endpoint, while suggesting LiteFlow as a production alternative.

JavaREST APISpring Boot
0 likes · 9 min read
Implementing a Responsibility Chain Pattern with Spring Boot and MyBatis Plus
Python Programming Learning Circle
Python Programming Learning Circle
Mar 5, 2025 · Fundamentals

Implementing a Python Singleton with Decorators

This article explains the singleton design pattern in Python, demonstrates how to implement it using a decorator with a wrapper class, provides step‑by‑step code examples, discusses its advantages, appropriate use cases, and cautions against overuse.

DecoratorPythonSingleton
0 likes · 7 min read
Implementing a Python Singleton with Decorators
Top Architecture Tech Stack
Top Architecture Tech Stack
Feb 20, 2025 · Backend Development

Implementing the Chain of Responsibility Pattern for Product Validation and Workflow Approval in Java

This article explains the Chain of Responsibility design pattern, demonstrates its application in multi‑step product validation and expense‑approval workflows with detailed Java code, configuration handling, Spring bean injection, and discusses its advantages and drawbacks.

Chain of ResponsibilityJavadesign pattern
0 likes · 21 min read
Implementing the Chain of Responsibility Pattern for Product Validation and Workflow Approval in Java
Selected Java Interview Questions
Selected Java Interview Questions
Jan 14, 2025 · Backend Development

Understanding the Chain of Responsibility Pattern and Its Combination with Strategy Pattern in Java

This article explains the Chain of Responsibility design pattern, its core concepts, characteristics, and problems it solves, then demonstrates how to combine it with the Strategy pattern through detailed Java code examples that illustrate a product‑up‑shelf validation workflow and a generic request‑handling scenario.

BackendChain of ResponsibilityJava
0 likes · 16 min read
Understanding the Chain of Responsibility Pattern and Its Combination with Strategy Pattern in Java
Code Ape Tech Column
Code Ape Tech Column
Dec 27, 2024 · Backend Development

Object Pool Pattern: Principles, Apache Commons Pool Implementation, and Practical Use Cases

This article explains the object pool design pattern, its working mechanism, advantages and disadvantages, and provides step‑by‑step Java code using Apache Commons Pool along with real‑world examples for web servers and game development to improve performance and resource management.

Apache Commons PoolResource Managementdesign pattern
0 likes · 14 min read
Object Pool Pattern: Principles, Apache Commons Pool Implementation, and Practical Use Cases
Architect's Guide
Architect's Guide
Nov 14, 2024 · Backend Development

Implementing the Chain of Responsibility Pattern for Product Validation in Java

This article explains the Chain of Responsibility design pattern, demonstrates its application in a product creation workflow with concrete Java code, shows how to configure and assemble handlers dynamically using Spring, and discusses the pattern's advantages, drawbacks, and testing scenarios.

BackendChain of ResponsibilityHandler
0 likes · 20 min read
Implementing the Chain of Responsibility Pattern for Product Validation in Java
Python Programming Learning Circle
Python Programming Learning Circle
Nov 5, 2024 · Fundamentals

Implementing the Singleton Pattern in Python: Multiple Approaches and Thread Safety

This article explains the Singleton design pattern in Python, covering various implementation methods—including modules, decorators, classic classes, __new__ method, and metaclasses—while demonstrating thread‑safety concerns and solutions with locking, and provides complete code examples for each approach.

DecoratorMetaclassSingleton
0 likes · 10 min read
Implementing the Singleton Pattern in Python: Multiple Approaches and Thread Safety
Java Tech Enthusiast
Java Tech Enthusiast
Sep 28, 2024 · Backend Development

Avoiding Low Cohesion Bugs by Centralizing Repayment Logic in Java

The article explains how adding a new reducePrincipal field to the RepayPlan class caused existing interfaces to miscalculate remaining principal, and demonstrates fixing the low‑cohesion bug by centralizing the updated calculation in a RepaymentCalculator utility so future changes occur in one place.

Code RefactoringJavadesign pattern
0 likes · 4 min read
Avoiding Low Cohesion Bugs by Centralizing Repayment Logic in Java
Java Architect Essentials
Java Architect Essentials
Sep 24, 2024 · Backend Development

Understanding the State Pattern and Implementing Order Workflow with Spring State Machine

This article explains the State design pattern, demonstrates its Java implementation with example code, introduces Spring State Machine concepts, and provides a complete step‑by‑step guide to building and testing an order status workflow using Spring State Machine, including configuration, listeners, services, and a controller.

JavaOrder Workflowdesign pattern
0 likes · 13 min read
Understanding the State Pattern and Implementing Order Workflow with Spring State Machine
Lobster Programming
Lobster Programming
Sep 12, 2024 · Backend Development

Mastering the Chain of Responsibility Pattern in Java Spring: A Step‑by‑Step Guide

This article explains the Chain of Responsibility design pattern using a real‑world iron‑chain analogy, then demonstrates a complete Java Spring implementation for order validation, including interface definition, abstract base class, concrete handlers, Spring configuration, service, and controller code.

Chain of ResponsibilityJavadesign pattern
0 likes · 6 min read
Mastering the Chain of Responsibility Pattern in Java Spring: A Step‑by‑Step Guide
Top Architect
Top Architect
Sep 3, 2024 · Backend Development

Design and Implementation of a General Asynchronous Processing SDK for Java Backend

This article introduces a reusable asynchronous processing SDK for Java backend systems, explaining its purpose, advantages, underlying principles, component choices, design patterns, database schema, configuration options, usage instructions, and best‑practice notes, while providing complete code snippets and deployment details.

AsyncBackendKafka
0 likes · 13 min read
Design and Implementation of a General Asynchronous Processing SDK for Java Backend
Top Architect
Top Architect
Jul 31, 2024 · Backend Development

Design and Implementation of a Generic Asynchronous Processing SDK for Spring Applications

This article introduces a Spring‑based asynchronous processing SDK that leverages annotations, transaction event listeners, Kafka, XXL‑Job, and a dedicated database to achieve non‑blocking execution, fault tolerance, and eventual consistency while preserving transaction integrity and providing a clear configuration and usage guide.

BackendKafkadatabase
0 likes · 12 min read
Design and Implementation of a Generic Asynchronous Processing SDK for Spring Applications
Architecture Digest
Architecture Digest
Jul 30, 2024 · Fundamentals

Understanding the Chain of Responsibility Design Pattern with Java Examples

This article explains the Chain of Responsibility design pattern, its typical use cases, demonstrates a flawed nested‑if implementation for a multi‑level game, and then shows step‑by‑step refactorings—including an abstract handler, concrete handlers, and a factory‑based dynamic chain—using Java code examples.

Chain of ResponsibilityJavaSoftware Architecture
0 likes · 10 min read
Understanding the Chain of Responsibility Design Pattern with Java Examples
Architect's Guide
Architect's Guide
May 26, 2024 · Backend Development

Applying Abstract Methods, Anonymous Inner Classes, and Future Pattern for Highly Abstracted Java Service Design

The article demonstrates how to achieve high abstraction in Java by using abstract methods overridden by subclasses, passing behavior through anonymous inner classes, and implementing an asynchronous Future pattern with listeners to handle request results, providing complete code examples for each technique.

Abstract ClassAsynchronousBackend Development
0 likes · 8 min read
Applying Abstract Methods, Anonymous Inner Classes, and Future Pattern for Highly Abstracted Java Service Design
Bilibili Tech
Bilibili Tech
May 7, 2024 · Frontend Development

Design and Implementation of a Unified Front-End Request Library Based on Middleware Pattern

Bilibili created a unified front‑end request library using a Koa‑style middleware “onion” architecture—ConfigCtrl, AssembleCtrl, and RequestCtrl—to standardize error handling, cut code redundancy, improve performance, and provide consistent, extensible API calls across SSR/CSR, Vue2/Vue3, and in‑app H5 environments.

HTTPRequest libraryTypeScript
0 likes · 16 min read
Design and Implementation of a Unified Front-End Request Library Based on Middleware Pattern
php Courses
php Courses
Apr 10, 2024 · Fundamentals

What Is the State Pattern? Explanation and PHP Implementation Example

The article introduces the State design pattern as a behavioral pattern that lets objects change their behavior when their internal state changes, compares it with the Strategy pattern, and provides a detailed PHP example illustrating its components and usage.

Software ArchitectureState Patternbehavioral pattern
0 likes · 5 min read
What Is the State Pattern? Explanation and PHP Implementation Example
Selected Java Interview Questions
Selected Java Interview Questions
Apr 9, 2024 · Backend Development

Applying the Chain of Responsibility Pattern for Multi‑Level Product Validation and Workflow in Java

This article explains the Chain of Responsibility design pattern, demonstrates its use for multi‑step product validation and a reimbursement workflow in Java with Spring, provides UML diagrams, configuration handling, concrete handler implementations, client execution code, and discusses the pattern’s advantages and drawbacks.

BackendChain of ResponsibilityJava
0 likes · 18 min read
Applying the Chain of Responsibility Pattern for Multi‑Level Product Validation and Workflow in Java
FunTester
FunTester
Mar 5, 2024 · Backend Development

Building a Lightweight Java Object Pool Without Commons‑Pool2

This article walks through the design and implementation of a simple, thread‑safe object pool in Java using a LinkedBlockingQueue, explains the underlying concepts such as factory pattern and queue trimming, and provides a complete code example with a test script and output analysis.

BackendJavaconcurrency
0 likes · 7 min read
Building a Lightweight Java Object Pool Without Commons‑Pool2
Architect
Architect
Feb 15, 2024 · Backend Development

Mastering State Patterns with Spring State Machine: From Theory to Order Workflow

This article explains the classic State design pattern, demonstrates a traffic‑light example, compares Spring State Machine with COLA, and walks through building a complete order‑status workflow in Spring Boot using enums, configuration, listeners, services, and a test controller, while highlighting trade‑offs and alternatives.

BackendJavaOrder Workflow
0 likes · 14 min read
Mastering State Patterns with Spring State Machine: From Theory to Order Workflow
政采云技术
政采云技术
Jan 16, 2024 · Fundamentals

Understanding Finite State Machines: Definitions, Usage, Advantages, and Their Relation to Domain‑Driven Design

This article explains what a finite state machine (FSM) is, illustrates it with a car transmission example, outlines its components and diagramming, discusses its technical pros and cons, explores business benefits, and examines how state machines relate to domain‑driven design.

Domain-Driven DesignFinite State MachineSoftware Architecture
0 likes · 13 min read
Understanding Finite State Machines: Definitions, Usage, Advantages, and Their Relation to Domain‑Driven Design
php Courses
php Courses
Dec 9, 2023 · Backend Development

Using Value Objects in PHP 8.1/8.2 to Improve Code Quality

The article explains how the Value Object pattern, combined with PHP 8.1/8.2 features like readonly properties and named arguments, can eliminate primitive‑type validation duplication, prevent parameter‑order mistakes, and ensure immutability, thereby making PHP code more robust, maintainable, and self‑documenting.

ImmutablePHPType Safety
0 likes · 12 min read
Using Value Objects in PHP 8.1/8.2 to Improve Code Quality
php Courses
php Courses
Nov 30, 2023 · Backend Development

Best Practices and Performance Optimization for the Singleton Pattern in PHP

This article explains the Singleton design pattern in PHP, covering best‑practice guidelines such as a private constructor, static accessor methods, and static instance storage, and presents performance‑enhancing techniques like lazy instantiation and safe serialization/deserialization with illustrative code examples.

PHPSingletonbest practices
0 likes · 5 min read
Best Practices and Performance Optimization for the Singleton Pattern in PHP
Selected Java Interview Questions
Selected Java Interview Questions
Nov 12, 2023 · Backend Development

Implementing the Chain of Responsibility Pattern for Login Risk Management in Java

This article explains the Chain of Responsibility design pattern and demonstrates how to apply it in a Java backend to evaluate login risk factors such as password errors, unusual login times, IP whitelist violations, and abnormal login locations, providing full code examples and execution flow.

BackendChain of ResponsibilityJava
0 likes · 16 min read
Implementing the Chain of Responsibility Pattern for Login Risk Management in Java
DaTaobao Tech
DaTaobao Tech
Nov 1, 2023 · Fundamentals

Understanding the Chain of Responsibility Design Pattern

The Chain of Responsibility pattern links a series of handler objects so that a request can be passed along until one processes it, decoupling sender and receiver, supporting dynamic composition, runtime flexibility, and the Open/Closed principle, as illustrated by a Java leave‑approval workflow.

Chain of ResponsibilityCode ExampleJava
0 likes · 12 min read
Understanding the Chain of Responsibility Design Pattern
Test Development Learning Exchange
Test Development Learning Exchange
Oct 28, 2023 · Fundamentals

Understanding the Object Factory Design Pattern with Python Examples

Object Factory is a design pattern that centralizes object creation, enhancing decoupling, extensibility, and management of instances, and this article explains its principles, benefits, and provides five Python code examples illustrating various scenarios such as type-based creation, configuration-driven instantiation, logging factories, singleton factories, and object caching.

Factory MethodObject FactoryPython
0 likes · 7 min read
Understanding the Object Factory Design Pattern with Python Examples
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 27, 2023 · Backend Development

Applying the Chain of Responsibility Pattern in Spring MVC Interceptors

This article explains how the Chain of Responsibility design pattern is implemented within Spring MVC interceptors, detailing the request flow, interceptor lifecycle methods, and practical differences from the classic GoF definition, while also exploring other typical use cases of the pattern.

Backend DevelopmentChain of ResponsibilityInterceptor
0 likes · 10 min read
Applying the Chain of Responsibility Pattern in Spring MVC Interceptors
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 24, 2023 · Backend Development

Applying the Chain of Responsibility Design Pattern in Spring MVC Interceptors

This article explains how the Chain of Responsibility design pattern is employed within Spring MVC interceptors, detailing the interceptor lifecycle, code implementation, differences from the classic GoF definition, and broader use cases such as authentication, logging, and order processing.

Backend DevelopmentChain of ResponsibilityInterceptor
0 likes · 10 min read
Applying the Chain of Responsibility Design Pattern in Spring MVC Interceptors
php Courses
php Courses
Oct 16, 2023 · Backend Development

Best Practices and Performance Optimization of the Singleton Pattern in PHP

This article explains the Singleton pattern in PHP, detailing best practices such as private constructors and static access methods, and presents performance optimizations including lazy instantiation and proper serialization handling, accompanied by concrete code examples.

Backend DevelopmentPHPPerformance Optimization
0 likes · 6 min read
Best Practices and Performance Optimization of the Singleton Pattern in PHP
vivo Internet Technology
vivo Internet Technology
Sep 20, 2023 · Backend Development

Chain of Responsibility Pattern: Implementation and Applications in Open Source Frameworks

The article explains the Chain of Responsibility design pattern, compares its two implementation styles—chain‑driven and processor‑self‑driven—and demonstrates how open‑source frameworks such as Spring Interceptor, Servlet Filter, Dubbo, and Sentinel employ the pattern to achieve low coupling, high extensibility, and flexible request processing.

Chain of ResponsibilityDubboServlet Filter
0 likes · 19 min read
Chain of Responsibility Pattern: Implementation and Applications in Open Source Frameworks
Test Development Learning Exchange
Test Development Learning Exchange
Jul 7, 2023 · Fundamentals

Understanding the Object Factory Design Pattern with Python Examples

This article explains the Object Factory design pattern, its benefits such as decoupling, extensibility, and centralized instance management, and demonstrates five practical Python examples covering basic product creation, configuration‑driven factories, logger factories, singleton factories, and object caching factories.

Factory MethodObject FactoryPython
0 likes · 7 min read
Understanding the Object Factory Design Pattern with Python Examples
Code Ape Tech Column
Code Ape Tech Column
Jun 30, 2023 · Backend Development

Applying the Service Locator Pattern to Decouple File Parsers in Spring

This article demonstrates how to replace tightly‑coupled if‑else or switch‑case parser selection with the Service Locator Pattern in a Spring Java application, enabling easy addition of new file‑type parsers without modifying client code and adhering to the open‑closed principle.

DecouplingJavaParser
0 likes · 8 min read
Applying the Service Locator Pattern to Decouple File Parsers in Spring
Programmer DD
Programmer DD
May 24, 2023 · Fundamentals

Mastering the Chain of Responsibility Pattern: From Flawed IF Chains to Elegant Handlers

This article explains the Chain of Responsibility design pattern, shows why naïve nested if‑statements are problematic, demonstrates a step‑by‑step refactor using linked handlers, introduces an abstract handler hierarchy, and finally presents a factory‑based dynamic configuration for scalable request processing in Java.

Chain of ResponsibilitySoftware Architecturedesign pattern
0 likes · 12 min read
Mastering the Chain of Responsibility Pattern: From Flawed IF Chains to Elegant Handlers
MaGe Linux Operations
MaGe Linux Operations
May 23, 2023 · Fundamentals

Mastering the Singleton Pattern in Python: Thread‑Safe Implementations

This article explains the purpose of the Singleton pattern, demonstrates multiple Python implementations—including module‑based, decorator, class‑based, __new__ method, and metaclass approaches—covers thread‑safety with locking, and provides complete code examples for each technique.

MetaclassSingletondesign pattern
0 likes · 10 min read
Mastering the Singleton Pattern in Python: Thread‑Safe Implementations
Python Programming Learning Circle
Python Programming Learning Circle
May 13, 2023 · Fundamentals

Implementing the Singleton Pattern in Python: Modules, Decorators, Classes, __new__ Method, and Metaclasses

This article explains the Singleton design pattern in Python, describing why a single instance may be needed, and demonstrates five implementation techniques—including module-level singletons, decorators, class methods, the __new__ method, and metaclasses—while addressing thread‑safety concerns with locking mechanisms.

MetaclassSingletondesign pattern
0 likes · 10 min read
Implementing the Singleton Pattern in Python: Modules, Decorators, Classes, __new__ Method, and Metaclasses
Architecture Digest
Architecture Digest
Feb 18, 2023 · Fundamentals

Understanding the Factory Pattern: Simple Factory, Factory Method, and Abstract Factory with Real-world Examples

This article explains the three main factory design patterns—Simple Factory, Factory Method, and Abstract Factory—detailing their concepts, typical use cases such as document parsing and browser automation, and providing complete Java‑style code examples to illustrate each pattern's implementation and benefits.

Factory PatternJavaObject-Oriented
0 likes · 12 min read
Understanding the Factory Pattern: Simple Factory, Factory Method, and Abstract Factory with Real-world Examples
DaTaobao Tech
DaTaobao Tech
Feb 1, 2023 · Fundamentals

Template Method Design Pattern: Concepts, Implementation, and Usage

The Template Method pattern defines an algorithm’s fixed skeleton in an abstract class while delegating variable steps to subclasses via abstract or hook methods, enabling reusable, maintainable code through a final template method, concrete implementations, and practical examples such as online shopping and JDK’s AbstractList, with benefits of encapsulation and extensibility but potential complexity from inheritance.

JavaSoftware EngineeringTemplate Method
0 likes · 10 min read
Template Method Design Pattern: Concepts, Implementation, and Usage
Code Ape Tech Column
Code Ape Tech Column
Jan 31, 2023 · Backend Development

Applying the Service Locator Pattern to Decouple File Parsers in Java

This article explains how to replace tightly‑coupled if‑else or switch‑case logic for selecting file parsers (JSON, CSV, XML) with a Service Locator Pattern using Spring's ServiceLocatorFactoryBean, demonstrating a clean, extensible solution that follows the Open/Closed principle.

BackendJavaService Locator
0 likes · 8 min read
Applying the Service Locator Pattern to Decouple File Parsers in Java
php Courses
php Courses
Jan 17, 2023 · Backend Development

Implementing the Chain of Responsibility Design Pattern in PHP with Hyperf

This article demonstrates how to implement the Chain of Responsibility design pattern in PHP using the Hyperf framework, detailing the file structure, core classes such as IndexController, HandlerInterface, AbstractHandler, and concrete handlers, and includes a unit test example to verify the workflow.

Backend DevelopmentChain of ResponsibilityHyperf
0 likes · 7 min read
Implementing the Chain of Responsibility Design Pattern in PHP with Hyperf
Code Ape Tech Column
Code Ape Tech Column
Dec 26, 2022 · Backend Development

Applying the Chain of Responsibility Pattern for Multi‑Level Product Validation and Workflow in Java

This article explains the Chain of Responsibility design pattern, demonstrates its use in multi‑step product creation validation and expense‑approval workflows with concrete Java/Spring code, and discusses configuration, dynamic composition, advantages, drawbacks, and testing scenarios.

BackendChain of ResponsibilityJava
0 likes · 21 min read
Applying the Chain of Responsibility Pattern for Multi‑Level Product Validation and Workflow in Java
Top Architect
Top Architect
Nov 23, 2022 · Backend Development

Chain of Responsibility Pattern in Java: Design, Implementation, and Practical Example

This article explains the Chain of Responsibility design pattern, demonstrates its use for request validation and processing in Java backend applications, provides complete code examples—including abstract handler, concrete validators, business logic, and a test harness—while discussing its advantages, drawbacks, and real‑world analogues such as servlet filters.

Chain of ResponsibilityJavaSoftware Architecture
0 likes · 11 min read
Chain of Responsibility Pattern in Java: Design, Implementation, and Practical Example
Sohu Tech Products
Sohu Tech Products
Oct 19, 2022 · Fundamentals

Understanding the Observer Pattern with Go Code Examples

This article explains the Observer (publish‑subscribe) pattern, illustrates it with a humorous dialogue, provides complete Go interface and struct implementations for subjects and observers, shows sample client code and output, and discusses practical refactoring using the pattern for configuration changes.

GoObserver PatternPublish-Subscribe
0 likes · 8 min read
Understanding the Observer Pattern with Go Code Examples
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 8, 2022 · Frontend Development

Understanding the Singleton Pattern in JavaScript: Concepts, Implementations, and Real‑World Applications

This article explains the singleton design pattern, shows standard and lazy implementations in JavaScript with code examples, discusses reducing global variable pollution, and demonstrates practical usage in popular front‑end libraries such as Vuex, Ant Design message, and Axios request cancellation.

JavaScriptSingletonVuex
0 likes · 11 min read
Understanding the Singleton Pattern in JavaScript: Concepts, Implementations, and Real‑World Applications
Cognitive Technology Team
Cognitive Technology Team
Oct 5, 2022 · Fundamentals

Various Singleton Pattern Implementations in Java

This article explains multiple Java singleton implementations—including eager initialization, static block, lazy initialization, double‑checked locking, static inner‑class holder, and enum—detailing their code, thread‑safety characteristics, advantages, and limitations such as reflection and serialization issues.

JavaSingletondesign pattern
0 likes · 7 min read
Various Singleton Pattern Implementations in Java
Huolala Tech
Huolala Tech
Sep 13, 2022 · Frontend Development

Mastering the Chain of Responsibility Pattern: From Classic Story to Front‑End Code

This article explains the Chain of Responsibility design pattern, illustrates it with a historical Three Kingdoms story, shows progressive refactorings from procedural code to abstract handlers in TypeScript, and demonstrates practical front‑end scenarios such as flexible location retrieval.

Chain of ResponsibilityOOPSoftware Architecture
0 likes · 10 min read
Mastering the Chain of Responsibility Pattern: From Classic Story to Front‑End Code
Python Programming Learning Circle
Python Programming Learning Circle
Aug 10, 2022 · Fundamentals

Implementing Thread‑Safe Singleton Pattern in Python

This article explains the purpose of the Singleton design pattern, demonstrates multiple Python implementations—including module‑level singletons, decorators, class‑based approaches, __new__ method, and metaclass techniques—and shows how to add thread‑safety with locks to ensure only one instance exists across concurrent executions.

DecoratorLockMetaclass
0 likes · 10 min read
Implementing Thread‑Safe Singleton Pattern in Python
macrozheng
macrozheng
Aug 5, 2022 · Backend Development

Transform IF Chains into Scalable Java: Master the Responsibility Pattern

This article explains the Chain of Responsibility design pattern in Java, illustrating its use for multi‑level approval workflows during high‑traffic events, provides step‑by‑step code implementations, refactors naive IF logic into modular link classes, and demonstrates testing, highlighting benefits for clean, extensible backend architecture.

Backend DevelopmentChain of ResponsibilityJava
0 likes · 21 min read
Transform IF Chains into Scalable Java: Master the Responsibility Pattern
Architect's Tech Stack
Architect's Tech Stack
Jul 19, 2022 · Backend Development

Asynchronous Excel Import with Thread Pool and AOP in Java

This article explains how to handle large Excel uploads in Java by offloading parsing and validation to a thread pool, using the Template Method pattern to reduce boilerplate, and finally applying a custom AOP annotation to manage logging, error handling, and asynchronous execution in a clean, reusable way.

Javaaopasynchronous processing
0 likes · 10 min read
Asynchronous Excel Import with Thread Pool and AOP in Java
Java Backend Technology
Java Backend Technology
Jun 16, 2022 · Fundamentals

Mastering the Chain of Responsibility Pattern: From Pitfalls to Clean Implementations

This article explains the Chain of Responsibility design pattern, illustrates common misuse with a multi‑if game‑level example, and then shows step‑by‑step refactorings—including linked handlers, an abstract base class, a factory and enum‑based configuration—to produce clean, extensible Java code.

Chain of ResponsibilitySoftware Architecturedesign pattern
0 likes · 12 min read
Mastering the Chain of Responsibility Pattern: From Pitfalls to Clean Implementations
Selected Java Interview Questions
Selected Java Interview Questions
Jun 8, 2022 · Backend Development

Elegant and Efficient Singleton Implementations in Java

This article explores various Java singleton patterns—including eager initialization, static blocks, lazy initialization, double‑checked locking, volatile variables, static inner‑class holder, and serialization handling—explaining their mechanisms, thread‑safety concerns, and how to choose the most appropriate implementation for robust, high‑performance backend systems.

Singletondesign patternthread safety
0 likes · 10 min read
Elegant and Efficient Singleton Implementations in Java
Python Programming Learning Circle
Python Programming Learning Circle
Mar 31, 2022 · Fundamentals

Understanding Python Objects and Class Decorators

This article explains Python's object model, showing that numbers, strings, lists, tuples, sets, dictionaries, functions, classes, and modules are all objects, and then thoroughly introduces decorators, describing their design‑pattern nature, typical uses such as logging and profiling, and demonstrates class‑decorator implementation with practical examples.

Objectsclass-decoratordecorators
0 likes · 3 min read
Understanding Python Objects and Class Decorators
政采云技术
政采云技术
Mar 8, 2022 · Frontend Development

Understanding and Using Decorators in JavaScript (Frontend Development)

This article introduces JavaScript decorators, explains their relation to the decorator design pattern, shows how to configure Babel for decorator support, demonstrates class and method decorator syntax with detailed code examples, and discusses practical usage scenarios and execution order in modern front‑end projects.

ClassDecoratorbabel
0 likes · 13 min read
Understanding and Using Decorators in JavaScript (Frontend Development)
macrozheng
macrozheng
Jul 19, 2021 · Fundamentals

Mastering the Chain of Responsibility Pattern in Java: A Practical Guide

This article explains the Chain of Responsibility design pattern, outlines its four roles, demonstrates a real‑world Java implementation for encrypted request handling, and shows how to build an extensible processing chain that improves code readability and maintainability.

Backend DevelopmentChain of ResponsibilityJava
0 likes · 10 min read
Mastering the Chain of Responsibility Pattern in Java: A Practical Guide
Senior Brother's Insights
Senior Brother's Insights
Jun 23, 2021 · Fundamentals

Mastering the Builder Pattern: From Theory to Real Java Code

This article explains the Builder design pattern, detailing its definition, roles, Java implementation with code examples, practical use cases, advantages and drawbacks, comparison with the Factory pattern, and a real‑world illustration using JDK’s StringBuilder, helping developers understand when and how to apply it.

Builderdesign patternsoftware-architecture
0 likes · 14 min read
Mastering the Builder Pattern: From Theory to Real Java Code
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jun 6, 2021 · Fundamentals

Understanding the Chain of Responsibility Design Pattern with Real‑World Stories and Java Implementations

This article explains the Chain of Responsibility design pattern by linking a historical story of Guan Yu’s five passes with an OA leave‑approval workflow, provides a clear definition, discusses its pros and cons, and presents comprehensive Java code examples illustrating abstract handlers, concrete handlers, and client usage.

Chain of ResponsibilityJavaOO Design
0 likes · 12 min read
Understanding the Chain of Responsibility Design Pattern with Real‑World Stories and Java Implementations
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 20, 2021 · Backend Development

Template Method Design Pattern in Java: Theory, Implementation, and Framework Applications

This article explains the Template Method design pattern, illustrating its algorithm skeleton and step customization with Java code examples, and demonstrates real‑world applications in Spring, MyBatis, and other backend frameworks, highlighting advantages, drawbacks, and practical implementation details.

Backend DevelopmentJavaMyBatis
0 likes · 12 min read
Template Method Design Pattern in Java: Theory, Implementation, and Framework Applications
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Feb 18, 2021 · Fundamentals

Comprehensive Guide to the Singleton Pattern in Java: Implementations, Pitfalls, and the Secure Enum Solution

This article explains various Java singleton implementations—including eager, lazy, double‑checked locking, static inner class, and enum—demonstrates their thread‑safety issues, shows how reflection and serialization can break them, and presents the enum approach as a truly safe solution.

JavaReflectionSingleton
0 likes · 11 min read
Comprehensive Guide to the Singleton Pattern in Java: Implementations, Pitfalls, and the Secure Enum Solution
php Courses
php Courses
Nov 6, 2020 · Backend Development

Understanding and Implementing the Facade Pattern in ThinkPHP 5.1

This article explains the Facade feature introduced in ThinkPHP 5.1, demonstrates how to use it for static‑style method calls, shows step‑by‑step code examples, discusses the underlying __callStatic and createFacade mechanisms, and provides best‑practice recommendations for managing multiple facades in complex projects.

Facadedependency-injectiondesign pattern
0 likes · 11 min read
Understanding and Implementing the Facade Pattern in ThinkPHP 5.1
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 14, 2020 · Fundamentals

Singleton Pattern – Ensuring a Unique Instance in Java

This article explains the definition, class diagram, and multiple Java implementations of the Singleton pattern—including eager, lazy, double‑checked locking, static inner class, and enum approaches—while discussing thread safety, volatile usage, and practical considerations.

Javadesign patternenum
0 likes · 9 min read
Singleton Pattern – Ensuring a Unique Instance in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 9, 2020 · Fundamentals

Understanding the Template Method Design Pattern with Java Examples

This article explains the Template Method design pattern, illustrating its structure with Java code examples—including an abstract Drinks class, concrete Tea and Coffee subclasses, hook methods, and real‑world usages in JDK sorting and Spring's application context—while highlighting advantages, drawbacks, and typical scenarios.

Hook MethodJavaTemplate Method
0 likes · 12 min read
Understanding the Template Method Design Pattern with Java Examples
21CTO
21CTO
Aug 19, 2020 · Backend Development

Eliminate If‑Else Chains with Enum‑Based Strategy in Java

This article demonstrates how to replace cumbersome if‑else statements with a clean enum‑driven design in Java, using an abstract rule class, concrete channel implementations, and an enhanced enumeration that binds each channel to its processing logic, adhering to the open‑closed principle.

JavaOpen/Closed Principledesign pattern
0 likes · 5 min read
Eliminate If‑Else Chains with Enum‑Based Strategy in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Aug 5, 2020 · Fundamentals

Understanding the Singleton Pattern in Java: Concepts, Implementations, and Applications

This article introduces the Singleton design pattern in Java, explains its purpose of ensuring a single class instance, presents multiple implementation approaches—including eager, lazy, double-checked locking, static inner class, and enum—with code examples, and discusses practical usage scenarios and recommendations.

JavaObject-Orientedconcurrency
0 likes · 7 min read
Understanding the Singleton Pattern in Java: Concepts, Implementations, and Applications
Architecture Digest
Architecture Digest
Jul 18, 2020 · Backend Development

Understanding How Spring Handles Circular Dependencies and Its Core Principle

This article explains Spring's three‑level cache mechanism for resolving circular dependencies in singleton beans, demonstrates a simplified implementation with Java code, draws an analogy to the classic two‑sum algorithm, and highlights the essential idea behind circular dependency handling.

circular-dependencydependency-injectiondesign pattern
0 likes · 9 min read
Understanding How Spring Handles Circular Dependencies and Its Core Principle
Programmer DD
Programmer DD
Jun 7, 2020 · Fundamentals

Master the Command Pattern: Decouple Actions for Flexible Software Design

Learn how the Command pattern separates request issuance from execution, introducing roles like Command, ConcreteCommand, Receiver, Invoker, and Client, and see real‑world analogies and examples such as Hystrix and Java’s ThreadPoolExecutor that illustrate its widespread use in modern software.

Command PatternDecouplingSoftware Architecture
0 likes · 4 min read
Master the Command Pattern: Decouple Actions for Flexible Software Design