Tag

design pattern

1 views collected around this technical thread.

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.

JavaOpenAPISpring
0 likes · 7 min read
Implementing a Chain of Responsibility for an OpenAPI Interface Using Spring and Custom Components
Selected Java Interview Questions
Selected Java Interview Questions
Mar 21, 2025 · Backend Development

Solving Coupling Issues with a Dedicated TPS Microservice and Feign Integration

The article explains how high coupling caused by multiple front‑end controllers and repetitive back‑end push‑service code can be eliminated by introducing a dedicated TPS microservice that encapsulates third‑party integrations and exposes a unified Feign interface for all business systems.

JavaMicroservicebackend
0 likes · 6 min read
Solving Coupling Issues with a Dedicated TPS Microservice and Feign Integration
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.

JavaMyBatis-PlusREST API
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.

decoratordesign patternprogramming
0 likes · 7 min read
Implementing a Python Singleton with Decorators
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.

JavaStrategy Patternbackend
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 PoolJavaObject pool
0 likes · 14 min read
Object Pool Pattern: Principles, Apache Commons Pool Implementation, and Practical Use Cases
Code Ape Tech Column
Code Ape Tech Column
Dec 25, 2024 · Fundamentals

Applying the Service Locator Pattern for Extensible File Parsers in Spring

This article demonstrates how to replace tightly‑coupled if‑else or switch‑case logic with the Service Locator Pattern in a Spring application, allowing new file‑type parsers such as XML to be added without modifying client code, thereby adhering to the Open/Closed principle.

Factory BeanJavaService Locator
0 likes · 7 min read
Applying the Service Locator Pattern for Extensible File Parsers in Spring
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.

HandlerJavaSpring
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.

ModulePythonThread Safety
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.

Javabackendcode refactoring
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.

JavaSpringState Machine
0 likes · 13 min read
Understanding the State Pattern and Implementing Order Workflow with Spring State Machine
Selected Java Interview Questions
Selected Java Interview Questions
Sep 24, 2024 · Fundamentals

Understanding the Singleton Pattern: Lazy and Eager Implementations in Java

This article explains the Singleton design pattern, compares lazy and eager implementations in Java, discusses thread‑safety issues with double‑checked locking, presents complete code examples, and outlines the advantages, disadvantages, and appropriate use‑cases for singletons.

Eager InitializationJavaLazy Initialization
0 likes · 11 min read
Understanding the Singleton Pattern: Lazy and Eager Implementations in Java
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.

JavaSpringbackend
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.

JavaKafkaSpring
0 likes · 13 min read
Design and Implementation of a General Asynchronous Processing SDK for Java Backend
Architect
Architect
Aug 19, 2024 · Backend Development

Applying the Chain of Responsibility Pattern for Product Validation and Workflow Management

This article explains the Chain of Responsibility design pattern, demonstrates its use in multi‑step product validation and expense‑approval workflows with concrete Java examples, shows how to configure and assemble handlers dynamically, and discusses the pattern's advantages and drawbacks.

JavaValidationbackend development
0 likes · 19 min read
Applying the Chain of Responsibility Pattern for Product Validation and Workflow Management
Code Ape Tech Column
Code Ape Tech Column
Aug 9, 2024 · Backend Development

Design and Implementation of a Java Rule Engine with AND/OR Logic

This article explains how to refactor a simple if‑else based user‑application rule check into a modular Java rule engine that supports AND/OR short‑circuit evaluation, detailing the design, abstract and concrete rule classes, a fluent service builder, and a test example.

Code ExampleJavaShort-Circuit
0 likes · 8 min read
Design and Implementation of a Java Rule Engine with AND/OR Logic
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.

DatabaseJavaKafka
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.

Javachain of responsibilitydesign pattern
0 likes · 10 min read
Understanding the Chain of Responsibility Design Pattern with Java Examples