Tagged articles

Strategy Pattern

129 articles · Page 1 of 2
Java Tech Workshop
Java Tech Workshop
Aug 3, 2026 · Backend Development

A Ready‑to‑Use Spring Boot Template for Seamless Third‑Party Integration

The article explains why ad‑hoc third‑party integrations quickly become unmaintainable, identifies four common pain points, and presents a layered architecture using template method, strategy and factory patterns that abstracts common concerns such as retries, logging and signing, dramatically reducing duplicated code and maintenance effort.

Backend ArchitectureSpring BootStrategy Pattern
0 likes · 20 min read
A Ready‑to‑Use Spring Boot Template for Seamless Third‑Party Integration
Java Tech Workshop
Java Tech Workshop
Jul 31, 2026 · Backend Development

Building a Pluggable LLM Gateway with Spring Boot

The article explains why enterprise applications need a unified large‑model gateway, outlines a layered architecture using Spring Boot 3.x, strategy pattern and interface‑driven design, and provides production‑grade features such as retry, circuit‑breaker, token accounting and easy addition of new model providers.

GatewayLLMMicroservices
0 likes · 19 min read
Building a Pluggable LLM Gateway with Spring Boot
Tinker Programmer
Tinker Programmer
Jun 24, 2026 · Fundamentals

Master Strategy, Observer, and Chain of Responsibility with Spring & MQ examples

This article walks through the three core behavioral design patterns—Strategy, Observer, and Chain of Responsibility—explaining their intent, showing problematic anti‑patterns, providing step‑by‑step Spring and MQ code implementations, mapping them to real‑world frameworks, and offering interview‑style comparison questions to solidify understanding.

Chain of ResponsibilityDesign PatternsMessage Queue
0 likes · 19 min read
Master Strategy, Observer, and Chain of Responsibility with Spring & MQ examples
Tinker Programmer
Tinker Programmer
Jun 20, 2026 · Backend Development

Refactor Enterprise Code with Strategy & Factory: Two Tricks to Eliminate Endless if‑else

Learn how to replace sprawling if‑else logic in payment gateways and SaaS platforms by combining the Strategy and Factory patterns, with concrete Spring Boot examples, step‑by‑step code, and a progression from simple to abstract factories that enforce the Open‑Closed principle.

Design PatternsEnterprise ArchitectureFactory Pattern
0 likes · 10 min read
Refactor Enterprise Code with Strategy & Factory: Two Tricks to Eliminate Endless if‑else
samdeepthink
samdeepthink
Jun 18, 2026 · Fundamentals

Why Code Cleanliness Is a Professional Habit, Not Just a Quirk

The article argues that code cleanliness—careful naming, clear responsibilities, consistent abstraction levels, and purposeful design patterns—boosts maintainability and delivery efficiency, while warning against over‑formatting, premature abstraction, and needless refactoring of legacy code.

Software DesignStrategy Patternclean code
0 likes · 10 min read
Why Code Cleanliness Is a Professional Habit, Not Just a Quirk
Programmer1970
Programmer1970
May 19, 2026 · Interview Experience

What Do Interviewers Really Test When They Ask About Design Patterns?

The article shows that interviewers don’t just want you to list design patterns; they assess your ability to identify real scenarios, solve concrete problems, justify trade‑offs, and discuss implementation details, illustrated with payment and order‑processing examples in Java and Spring.

Chain of ResponsibilityDesign PatternsFactory Pattern
0 likes · 11 min read
What Do Interviewers Really Test When They Ask About Design Patterns?
samdeepthink
samdeepthink
May 9, 2026 · Backend Development

When You Can’t Understand Someone Else’s Code, Is It Their Skill or Yours?

The article explains that difficulty reading code often stems from unfamiliar design patterns and complex construction logic rather than poor code quality, illustrating with factory and strategy patterns in inventory systems, and provides a checklist to distinguish between genuinely bad code and gaps in a developer’s knowledge.

Code OrganizationDesign PatternsFactory Pattern
0 likes · 9 min read
When You Can’t Understand Someone Else’s Code, Is It Their Skill or Yours?
LuTiao Programming
LuTiao Programming
May 8, 2026 · Fundamentals

Why Knowing Hundreds of Design Patterns Still Breaks Your Code—and How an Engineering Decision Method Helps

Many developers learn dozens of design patterns but still end up with fragile, hard‑to‑maintain code; the article explains that the real key is to identify system problems first and apply a disciplined engineering decision method, illustrated with concrete Factory, Builder, Strategy, Template, Decorator, Adapter, Observer and Mediator examples.

Builder PatternDesign PatternsFactory Pattern
0 likes · 16 min read
Why Knowing Hundreds of Design Patterns Still Breaks Your Code—and How an Engineering Decision Method Helps
LuTiao Programming
LuTiao Programming
Apr 22, 2026 · Fundamentals

Stop Memorizing Design Patterns: Modern Strategy Pattern with Java 21+ Sealed Interfaces and Pattern Matching

The article critiques the classic interface‑plus‑N‑implementations Strategy Pattern for causing class explosion, then demonstrates how Java 17’s sealed interfaces and records together with Java 21’s pattern‑matching switch provide a more concise, type‑safe, and maintainable modern implementation.

Design PatternsJava 21Pattern Matching
0 likes · 7 min read
Stop Memorizing Design Patterns: Modern Strategy Pattern with Java 21+ Sealed Interfaces and Pattern Matching
Top Architect
Top Architect
Apr 22, 2026 · Backend Development

Unify Multi-Channel Login with Spring Boot Factory & Strategy Patterns

Learn how to replace tangled if‑else login code with a clean, extensible architecture using Spring Boot, combining the Factory pattern to instantiate strategy beans and the Strategy pattern to encapsulate each login method (password, WeChat, SMS, etc.), enabling easy addition of new authentication types.

Design PatternsFactory PatternLogin
0 likes · 14 min read
Unify Multi-Channel Login with Spring Boot Factory & Strategy Patterns
Cloud Architecture
Cloud Architecture
Mar 18, 2026 · Backend Development

10 Classic Spring Boot Design Patterns to Refactor Your Business Code

This article walks through ten classic design patterns—Factory, Proxy, Template Method, Strategy, Observer, Chain of Responsibility, Singleton, Builder, Adapter, and Decorator—showing how they are realized in Spring Boot 3.x with concrete e‑commerce, payment, and user‑system examples, and explains their benefits, trade‑offs, and best‑practice usage.

BuilderDesign PatternsFactory Pattern
0 likes · 39 min read
10 Classic Spring Boot Design Patterns to Refactor Your Business Code
Test Development Learning Exchange
Test Development Learning Exchange
Mar 15, 2026 · Backend Development

Build an Extensible Python Test Data Factory with Faker and Strategy Pattern

This guide presents a Python‑based, object‑oriented test data factory that leverages the Faker library and the strategy pattern to generate business‑rule‑aware, globally unique, and scenario‑driven data such as users and orders, with support for concurrency safety, extensibility, and future AI‑driven natural‑language commands.

AutomationPythonStrategy Pattern
0 likes · 12 min read
Build an Extensible Python Test Data Factory with Faker and Strategy Pattern
LuTiao Programming
LuTiao Programming
Feb 9, 2026 · Backend Development

Stop Memorizing Design Patterns—Use This Engineering Decision Tree to Solve Spring Boot Complexity

The article explains why design patterns often feel useless in Spring Boot projects, introduces a three‑branch decision tree that maps common sources of complexity to suitable patterns, and demonstrates a concrete refactor of an if‑else payment service into a clean, Spring‑managed strategy‑based solution.

Backend ArchitectureDesign PatternsSpring Boot
0 likes · 9 min read
Stop Memorizing Design Patterns—Use This Engineering Decision Tree to Solve Spring Boot Complexity
Top Architect
Top Architect
Feb 2, 2026 · Backend Development

How to Build an Extensible Multi‑Method Login System with Strategy & Factory Patterns in Spring Boot

This article walks through designing a flexible login module that supports password, WeChat, and SMS authentication by applying the Strategy and Factory patterns in a Spring Boot project, showing code examples, project structure, and best‑practice tips for clean, maintainable backend development.

Factory PatternLoginSpring Boot
0 likes · 14 min read
How to Build an Extensible Multi‑Method Login System with Strategy & Factory Patterns in Spring Boot
Data STUDIO
Data STUDIO
Jan 29, 2026 · Fundamentals

10 Python Design Patterns to Eliminate Spaghetti Code and Build Maintainable Projects

The article explains why architecture matters, introduces ten essential Python design patterns—such as Dependency Injection, Strategy, Builder, Event‑Driven, Repository, Mapper, Pipeline, Command, Specification, and Plugin Registry—with concrete code examples and practical advice to transform messy scripts into clean, scalable applications.

Builder PatternDesign PatternsPlugin system
0 likes · 44 min read
10 Python Design Patterns to Eliminate Spaghetti Code and Build Maintainable Projects
Senior Xiao Ying
Senior Xiao Ying
Jan 22, 2026 · Backend Development

Mastering Strategy and Factory Patterns in Spring Boot for Flexible Payments

This tutorial shows how to combine the Strategy and Factory patterns in a Spring Boot payment system, separating algorithm definition, creation, and execution to achieve a flexible, extensible, and maintainable architecture that adheres to the Open/Closed principle.

Design PatternsFactory PatternPayment Integration
0 likes · 7 min read
Mastering Strategy and Factory Patterns in Spring Boot for Flexible Payments
LuTiao Programming
LuTiao Programming
Jan 9, 2026 · Backend Development

Tame Messy Login Logic: 3‑Step Spring Boot Factory & Strategy Pattern for Multi‑Channel Auth

The article shows how tangled if‑else login code caused by adding password, SMS, WeChat, and Alipay authentication can be refactored using the Strategy and Factory patterns in Spring Boot, resulting in a clean, extensible, plug‑in‑style login module that requires no changes to existing code when new methods are added.

Design PatternsFactory PatternLogin
0 likes · 10 min read
Tame Messy Login Logic: 3‑Step Spring Boot Factory & Strategy Pattern for Multi‑Channel Auth
Java Companion
Java Companion
Dec 21, 2025 · Backend Development

Eliminate Messy Login Logic: Unified Multi‑Channel Authentication with Spring Boot Factory & Strategy Patterns

This article demonstrates how to replace tangled if‑else login code with a clean Spring Boot solution that combines the Factory and Strategy patterns, enabling easy addition of multiple authentication methods such as password, WeChat, SMS, and future providers while improving extensibility, readability, and testability.

Factory PatternSpring BootStrategy Pattern
0 likes · 12 min read
Eliminate Messy Login Logic: Unified Multi‑Channel Authentication with Spring Boot Factory & Strategy Patterns
Java Architect Essentials
Java Architect Essentials
Oct 30, 2025 · Backend Development

How Enums Can Eliminate Messy if‑else Chains in Java Payment Logic

This article explains why traditional if‑else payment routing is hard to maintain, demonstrates how Java enums combined with functional interfaces and the strategy pattern can centralize behavior, improve extensibility, and integrate cleanly with Spring, providing a robust, testable solution for payment channel selection.

Design PatternsEnumPayment Integration
0 likes · 10 min read
How Enums Can Eliminate Messy if‑else Chains in Java Payment Logic
Code Wrench
Code Wrench
Sep 28, 2025 · Backend Development

Mastering Higher-Order Functions in Go: Decorators, Strategies, and Pipelines

This article explains Go's higher‑order functions, covering their definition, common use‑cases such as decorators, strategy and pipeline patterns, practical implementation details, generic support, and tips for writing clean, performant functional code in real‑world projects.

Higher-Order FunctionsMiddlewareStrategy Pattern
0 likes · 7 min read
Mastering Higher-Order Functions in Go: Decorators, Strategies, and Pipelines
Architect
Architect
Sep 26, 2025 · Backend Development

Refactor Payment Logic: Replace if‑else with Java Enums & Strategy

This article demonstrates how to replace cumbersome if‑else chains in payment processing with Java enums that encapsulate behavior, leveraging functional interfaces, the strategy pattern, and Spring integration to achieve cleaner, extensible, and testable code while adhering to the Open/Closed principle.

Design PrinciplesEnumSpring
0 likes · 10 min read
Refactor Payment Logic: Replace if‑else with Java Enums & Strategy
Tech Freedom Circle
Tech Freedom Circle
Sep 19, 2025 · Interview Experience

Designing a Rock‑Solid High‑Availability Solution for Unreliable Third‑Party Services

When third‑party services frequently fail, this article walks through a systematic high‑availability design—including an ACL anti‑corruption layer, strategy‑pattern master‑slave routing, precise rate limiting, circuit‑breaker fallback, full observability, async degradation, and mock testing—to keep external dependencies as stable as a mountain.

ACLHigh AvailabilityStrategy Pattern
0 likes · 24 min read
Designing a Rock‑Solid High‑Availability Solution for Unreliable Third‑Party Services
JD Tech Talk
JD Tech Talk
Sep 18, 2025 · Fundamentals

Mastering the Strategy Pattern in Java: Real-World Spring Implementation

This article explains the Strategy (Policy) Pattern, illustrates its structure, and demonstrates a practical Spring-based implementation where different message types are processed by distinct strategy services, using an enum to map types to beans for flexible, interchangeable algorithms.

Design PatternsSpringStrategy Pattern
0 likes · 4 min read
Mastering the Strategy Pattern in Java: Real-World Spring Implementation
JD Cloud Developers
JD Cloud Developers
Sep 18, 2025 · Fundamentals

Mastering the Strategy Pattern in Spring: Dynamic Message Processing Explained

This article introduces the Strategy design pattern, explains its core concept of interchangeable algorithms, and demonstrates a practical Spring-based implementation that routes various message types to specific services using an enum‑driven bean lookup, enabling flexible updates to Elasticsearch for merchant search and analytics.

Design PatternsSpringStrategy Pattern
0 likes · 3 min read
Mastering the Strategy Pattern in Spring: Dynamic Message Processing Explained
macrozheng
macrozheng
Sep 12, 2025 · Backend Development

Master Java Design Patterns: Strategy, SPI, Chain of Responsibility & Rule Engine

Learn how to replace tangled if‑else logic with four elegant solutions—Strategy pattern, Java SPI, Chain of Responsibility, and a rule engine—complete with concepts, UML diagrams, Java code examples, advantages, drawbacks, and practical usage scenarios for building maintainable, extensible backend systems.

Chain of ResponsibilitySPIStrategy Pattern
0 likes · 23 min read
Master Java Design Patterns: Strategy, SPI, Chain of Responsibility & Rule Engine
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 16, 2025 · Backend Development

Build a Dynamic Rule Engine with Spring Boot 3: Strategy & Registry Patterns

This article explains why traditional if‑else logic hampers complex business rule maintenance and demonstrates how to create a flexible Spring Boot 3 rule engine using strategy and registry patterns, complete with interfaces, implementations, a registry, an engine, and a REST controller for testing.

Design PatternsSpring BootStrategy Pattern
0 likes · 8 min read
Build a Dynamic Rule Engine with Spring Boot 3: Strategy & Registry Patterns
Ubiquitous Tech
Ubiquitous Tech
Aug 13, 2025 · Backend Development

Designing a Generic TypeScript MCP Server Framework – Lesson 11

This article walks through building a reusable TypeScript MCP Server framework using strategy and factory patterns, showing project setup, core type definitions, a sample DeployHtml tool, a singleton registry, Express‑SSE integration, automatic tool loading, and a side‑by‑side comparison with a Java implementation.

ExpressFactory PatternMCP Server
0 likes · 17 min read
Designing a Generic TypeScript MCP Server Framework – Lesson 11
Architect
Architect
Jul 23, 2025 · Backend Development

How to Break Down Distributed Transactions for Reliable Microservices

This article explains the challenges of distributed consistency when a business operation writes to both MySQL and third‑party systems, presents a financial reimbursement case study, analyzes failure risks, and offers a practical solution that splits large transactions into small, retryable units using Spring and a task table.

MicroservicesMySQLSpring
0 likes · 10 min read
How to Break Down Distributed Transactions for Reliable Microservices
php Courses
php Courses
Jul 16, 2025 · Backend Development

Mastering Failure Handling in PHP: Strategies for Robust Backend Code

This article explains why rewriting logic on failure is essential for PHP applications, outlines common scenarios such as database connection, API calls, and file operations, provides concrete code examples, best‑practice guidelines, and an advanced strategy‑pattern approach to build resilient, user‑friendly backend systems.

Strategy Patternbackendbest practices
0 likes · 6 min read
Mastering Failure Handling in PHP: Strategies for Robust Backend Code
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 ResponsibilityDesign PatternStrategy Pattern
0 likes · 11 min read
Master the Chain of Responsibility Pattern: Concepts, Benefits, and Java Example
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 18, 2025 · Fundamentals

Strategy Design Pattern in Java: Definition, Structure, Example, and Refactoring

This article explains the behavioral Strategy design pattern, describes its definition and structure, demonstrates a real‑world e‑commerce discount scenario with both a tangled if‑else implementation and a clean refactoring using Java interfaces, concrete strategy classes, a context, and a client, and finally discusses its advantages and drawbacks.

Design PatternsStrategy Patternjava
0 likes · 9 min read
Strategy Design Pattern in Java: Definition, Structure, Example, and Refactoring
macrozheng
macrozheng
Mar 13, 2025 · Backend Development

Mastering the Strategy Pattern in Spring Boot: Clean, Extensible Code with Real Examples

This article walks through the concept and practical implementation of the Strategy design pattern in Spring Boot, showing how to define operation interfaces, create concrete strategy classes, use factories and Spring's IoC container for clean, maintainable, and extensible backend code.

Design PatternsStrategy Patternbackend development
0 likes · 9 min read
Mastering the Strategy Pattern in Spring Boot: Clean, Extensible Code with Real Examples
php Courses
php Courses
Feb 17, 2025 · Backend Development

Applying Strategy and Chain of Responsibility Patterns in Symfony: Deep Dive with PHP Code Examples

This article explains how the Strategy and Chain of Responsibility design patterns are applied within the Symfony framework, providing detailed PHP code examples, discussing their integration in core components, and highlighting the architectural benefits such as flexibility, loose coupling, and maintainability.

Chain of ResponsibilityDesign PatternsPHP
0 likes · 7 min read
Applying Strategy and Chain of Responsibility Patterns in Symfony: Deep Dive with PHP Code Examples
Java Backend Technology
Java Backend Technology
Feb 4, 2025 · Backend Development

How to Implement Real-Time Overdue Task Alerts with Redis Key Expiration and Strategy Pattern

This article explains how to use Redis key expiration notifications combined with a strategy pattern to create real‑time overdue reminders for workflow tasks, covering configuration, listener implementation, distributed locking, message handling, and practical usage in a SpringBoot project.

Key ExpirationSpringBootStrategy Pattern
0 likes · 13 min read
How to Implement Real-Time Overdue Task Alerts with Redis Key Expiration and Strategy Pattern
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.

Chain of ResponsibilityDesign PatternStrategy Pattern
0 likes · 16 min read
Understanding the Chain of Responsibility Pattern and Its Combination with Strategy Pattern in Java
Ubiquitous Tech
Ubiquitous Tech
Dec 17, 2024 · Backend Development

Refactoring E‑Commerce Login Using Strategy, Template, Chain‑of‑Responsibility & Decorator Patterns

The article examines how a growing e‑commerce login module becomes tangled with duplicated code and scattered logic, then demonstrates a step‑by‑step refactor using strategy‑factory, template method, chain‑of‑responsibility and decorator patterns to achieve clear responsibilities, extensibility, and easier maintenance.

Chain of ResponsibilityDecorator PatternDesign Patterns
0 likes · 18 min read
Refactoring E‑Commerce Login Using Strategy, Template, Chain‑of‑Responsibility & Decorator Patterns
Alibaba Cloud Developer
Alibaba Cloud Developer
Oct 14, 2024 · Backend Development

How to Build an Event-Driven Strategy Center for Full-Chain Marketing

This article explains the design and implementation of an event‑driven strategy‑center system for full‑chain marketing, covering architecture choices, process flow, domain modeling, strategy templates, code examples, and idempotency handling to achieve scalable and extensible marketing workflows.

Strategy Patternarchitectureevent-driven
0 likes · 11 min read
How to Build an Event-Driven Strategy Center for Full-Chain Marketing
Architect
Architect
Aug 30, 2024 · Backend Development

How to Streamline Contract Signing Using Strategy, Chain‑of‑Responsibility, and Annotations

This article walks through a Java Spring‑Boot implementation of a contract‑signing workflow, explains the original chain‑of‑responsibility design, shows its limitations, and demonstrates how to replace manual bean wiring with a strategy‑based annotation and enum configuration for flexible node management.

Chain of ResponsibilityContract SigningDesign Patterns
0 likes · 15 min read
How to Streamline Contract Signing Using Strategy, Chain‑of‑Responsibility, and Annotations
Architect's Guide
Architect's Guide
Aug 19, 2024 · Fundamentals

Applying the Strategy Pattern with Simple Factory in a Java Backend Service

This article explains how to use the Strategy pattern combined with a simple factory in a Spring‑based Java backend, showing interface definition, multiple arithmetic strategy implementations, a factory that registers them in a map, a service that selects a strategy at runtime, and a REST controller for testing.

SpringStrategy Patternbackend
0 likes · 6 min read
Applying the Strategy Pattern with Simple Factory in a Java Backend Service
Architecture Digest
Architecture Digest
Aug 12, 2024 · Fundamentals

Replacing If‑Else: Cleaner Code Strategies and Refactoring Techniques

This article explains why traditional if‑else statements often lead to complex, hard‑to‑maintain code and demonstrates several techniques—such as removing unnecessary else blocks, using fast returns, guard clauses, dictionary‑based dispatch, and the strategy pattern—to replace if‑else with cleaner, more extensible designs.

Design PatternsSoftware EngineeringStrategy Pattern
0 likes · 6 min read
Replacing If‑Else: Cleaner Code Strategies and Refactoring Techniques
php Courses
php Courses
Aug 9, 2024 · Backend Development

Applying the Strategy Design Pattern with the Open/Closed Principle in Laravel

This article explains how to apply the Strategy design pattern together with the Open‑Closed Principle in Laravel, showing step‑by‑step code examples for defining a strategy interface, implementing concrete payment strategies, and creating a context class that dynamically selects the appropriate payment gateway while keeping the system extensible and maintainable.

Design PatternsOpen-Closed PrincipleStrategy Pattern
0 likes · 12 min read
Applying the Strategy Design Pattern with the Open/Closed Principle in Laravel
Architect
Architect
Jul 24, 2024 · Fundamentals

Master Design Patterns: Real‑World Examples and Complete Java Implementations

This article introduces design patterns, lists the most common patterns such as Strategy, Factory, Singleton, Proxy, Factory Method, Observer, Template Method, and Adapter, and walks through concrete Java code examples, step‑by‑step explanations, and practical scenarios that demonstrate how each pattern solves specific design problems.

Design PatternsFactory PatternStrategy Pattern
0 likes · 23 min read
Master Design Patterns: Real‑World Examples and Complete Java Implementations
Selected Java Interview Questions
Selected Java Interview Questions
Jul 1, 2024 · Fundamentals

Java Design Patterns: Strategy, Factory, Singleton, Proxy, Observer, Template Method, Adapter and More

This article provides a comprehensive introduction to common Java design patterns—including Strategy, Factory, Singleton, Proxy, Observer, Template Method, and Adapter—explaining their concepts, typical use‑cases, and complete code implementations with Spring Boot integration for practical application development.

Design PatternsFactory PatternStrategy Pattern
0 likes · 20 min read
Java Design Patterns: Strategy, Factory, Singleton, Proxy, Observer, Template Method, Adapter and More
Code Ape Tech Column
Code Ape Tech Column
Jun 20, 2024 · Backend Development

Implementation of Contract Signing Process Using Chain of Responsibility, Strategy, and Composite Patterns in Java

This article explains a Java-based contract signing system that combines the Chain of Responsibility, Composite, and Strategy design patterns within a Spring Boot application, detailing the processing flow, project structure, key code implementations, and how annotations and enums simplify bean injection.

Chain of ResponsibilityDesign PatternsSpring Boot
0 likes · 16 min read
Implementation of Contract Signing Process Using Chain of Responsibility, Strategy, and Composite Patterns in Java
macrozheng
macrozheng
May 24, 2024 · Backend Development

Master Java Design Patterns: Strategy, Chain, Template, Observer, Factory & Singleton

This article explains the core concepts, typical business scenarios, definitions, and concrete Java implementations of six fundamental design patterns—Strategy, Chain of Responsibility, Template Method, Observer, Factory, and Singleton—showing how they improve code maintainability, extensibility, and adherence to SOLID principles.

Strategy Patternsingletonsoftware architecture
0 likes · 24 min read
Master Java Design Patterns: Strategy, Chain, Template, Observer, Factory & Singleton
Selected Java Interview Questions
Selected Java Interview Questions
May 12, 2024 · Backend Development

Optimizing Contract Signing with Strategy, Chain of Responsibility, and Composite Patterns in Java

This article explains how to improve a Java Spring Boot contract signing workflow by combining the Strategy pattern, Chain of Responsibility, and Composite patterns, detailing the process steps, project structure, code implementations, custom annotations, and dynamic bean injection to achieve a flexible and maintainable solution.

Chain of ResponsibilityDesign PatternsSpring Boot
0 likes · 13 min read
Optimizing Contract Signing with Strategy, Chain of Responsibility, and Composite Patterns in Java
Java Backend Technology
Java Backend Technology
Mar 25, 2024 · Fundamentals

5 Powerful Alternatives to If‑Else for Cleaner, Maintainable Code

This article explains why traditional if‑else statements often lead to complex, hard‑to‑read code and presents five practical techniques—including removing unnecessary else blocks, using fast returns, guard clauses, dictionary lookups, and the strategy pattern—to refactor and eliminate if‑else structures for more robust software design.

Code RefactoringSoftware DesignStrategy Pattern
0 likes · 8 min read
5 Powerful Alternatives to If‑Else for Cleaner, Maintainable Code
Architect
Architect
Mar 21, 2024 · Backend Development

Refactoring a Complex Order Process with a Three‑Layer Interface and Strategy Template

This article analyzes the problems of a scattered, poorly‑designed order‑processing codebase, proposes a three‑layer interface combined with a strategy‑template pattern, walks through concrete Java implementations, testing and gray‑release safeguards, and shows how the redesign improves readability, maintainability, and extensibility.

Design PatternsMicroservicesStrategy Pattern
0 likes · 15 min read
Refactoring a Complex Order Process with a Three‑Layer Interface and Strategy Template
Architect
Architect
Feb 5, 2024 · Backend Development

Applying the Strategy Pattern with Simple Factory in a Spring Boot Application

This article demonstrates how to apply the Strategy pattern combined with a simple factory in a Spring Boot application, showing interface definition, multiple arithmetic strategy implementations, a factory that registers beans, a service invoking strategies via a map, and a REST controller for testing, highlighting extensibility.

Spring BootStrategy Patternbackend
0 likes · 8 min read
Applying the Strategy Pattern with Simple Factory in a Spring Boot Application
DeWu Technology
DeWu Technology
Jan 24, 2024 · Backend Development

Dynamic Parameter Handling with Spring SpEL and Strategy Pattern

The article demonstrates replacing fragile if‑else channel logic with a Strategy pattern and Spring Expression Language, storing parameter mappings in a database so that new payment channels or Excel formats can be added simply by configuring SpEL expressions, achieving a flexible, maintainable, data‑driven solution.

Dynamic ConfigurationSpELStrategy Pattern
0 likes · 17 min read
Dynamic Parameter Handling with Spring SpEL and Strategy Pattern
DaTaobao Tech
DaTaobao Tech
Jan 15, 2024 · Backend Development

Refactoring Java Sale‑Type Parsing: From Simple Method to Design Patterns

Starting from a basic Java method that maps a sale‑type string to an integer, the article incrementally refactors the code by applying null‑safe utilities, constants, static methods, ternary/Optional expressions, enums with lookup maps, a combined relation enum, and finally a Strategy pattern with a container, illustrating how each step improves safety, readability, extensibility, and testability.

Code RefactoringDesign PatternsEnum
0 likes · 13 min read
Refactoring Java Sale‑Type Parsing: From Simple Method to Design Patterns
Selected Java Interview Questions
Selected Java Interview Questions
Jan 11, 2024 · Backend Development

Design and Implementation of a Flexible Data Permission System in Java

This article presents a comprehensive design and implementation of a customizable data permission framework for Java backend applications, detailing the requirements, rule table structure, strategy pattern handling, custom annotations, AOP integration, and practical examples with full source code snippets.

AOPCustom AnnotationData Permission
0 likes · 22 min read
Design and Implementation of a Flexible Data Permission System in Java
DaTaobao Tech
DaTaobao Tech
Dec 29, 2023 · Backend Development

Design Patterns and Practices for Fast, Stable Development in Taobao Innovation Projects

The article outlines how the Taobao “Calm Guard” project accelerates rapid‑iteration development by employing reusable patterns—including a Spring‑based Strategy registry, a hierarchical fatigue‑control framework, generic cache upsert via functional parameters, and precise AOP aspects—resulting in faster, more stable, and maintainable code.

AOPDesign PatternsSpring
0 likes · 29 min read
Design Patterns and Practices for Fast, Stable Development in Taobao Innovation Projects
php Courses
php Courses
Nov 17, 2023 · Fundamentals

Using the Strategy Pattern in PHP to Send Notifications

An overview of the Strategy design pattern demonstrates how to encapsulate notification-sending algorithms in independent PHP classes, allowing runtime selection among email, SMS, or FCM implementations without modifying client code, and highlights benefits such as flexibility, reusability, and testability.

Design PatternsNotificationPHP
0 likes · 5 min read
Using the Strategy Pattern in PHP to Send Notifications
Ubiquitous Tech
Ubiquitous Tech
Nov 10, 2023 · Backend Development

Java: Elegant Sitemap Generation Using 4 Design Patterns and the Open/Closed Principle

This article demonstrates how to generate website sitemap.xml files in Java by combining four design patterns—Strategy, Factory, Template Method, and Builder—along with the Open/Closed Principle, providing extensible, maintainable code illustrated with enums, configuration classes, and concrete implementations.

Design PatternsFactory PatternOpen-Closed Principle
0 likes · 16 min read
Java: Elegant Sitemap Generation Using 4 Design Patterns and the Open/Closed Principle
DaTaobao Tech
DaTaobao Tech
Nov 3, 2023 · Fundamentals

Mastering the Strategy Pattern: From Simple IF‑ELSE to Scalable Design

This article explains why hard‑coded if‑else logic hinders extensibility, introduces the Strategy pattern, shows its structure and Java implementation for data synchronization, then enhances the design with a Factory to decouple object creation, concluding with best‑practice recommendations.

Design PatternsFactory PatternObject-Oriented Design
0 likes · 8 min read
Mastering the Strategy Pattern: From Simple IF‑ELSE to Scalable Design
Java Backend Technology
Java Backend Technology
Oct 20, 2023 · Fundamentals

5 Better Alternatives to If‑Else for Cleaner, More Maintainable Code

This article explores five practical techniques to replace traditional if‑else statements—removing unnecessary else blocks, using value assignment, applying guard clauses, leveraging dictionaries, and employing strategy patterns—demonstrating how each approach improves readability, maintainability, and adheres to solid design principles.

Code RefactoringSoftware DesignStrategy Pattern
0 likes · 8 min read
5 Better Alternatives to If‑Else for Cleaner, More Maintainable Code
Java Interview Crash Guide
Java Interview Crash Guide
Oct 13, 2023 · Backend Development

Eliminate Complex if‑else Chains with Strategy and Chain‑of‑Responsibility Patterns in Java

This article demonstrates how to replace cumbersome if‑else or switch‑case logic in Java receipt processing with clean, extensible solutions using the Strategy pattern combined with a Map dictionary, and the Chain of Responsibility pattern, while preserving the Open/Closed principle.

Chain of ResponsibilityStrategy Patternjava
0 likes · 14 min read
Eliminate Complex if‑else Chains with Strategy and Chain‑of‑Responsibility Patterns in Java
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Sep 26, 2023 · Fundamentals

Understanding the Strategy Pattern in JavaScript

This article explains the Strategy design pattern, demonstrates its implementation in JavaScript through three code versions, discusses the drawbacks of naïve if‑else approaches, and outlines the pattern's advantages and disadvantages for creating flexible, maintainable code.

Design PatternsJavaScriptStrategy Pattern
0 likes · 6 min read
Understanding the Strategy Pattern in JavaScript
macrozheng
macrozheng
Sep 11, 2023 · Backend Development

Mastering Code Refactoring: From Repetition to Design Patterns in Java

This article walks through a step‑by‑step refactoring of repetitive Java code, illustrating how to extract common methods, use reflection, apply generics with lambda expressions, leverage inheritance and the template method pattern, and finally combine factory, template, and strategy patterns into a clean, reusable solution.

Design PatternsFactory PatternSpringBoot
0 likes · 13 min read
Mastering Code Refactoring: From Repetition to Design Patterns in Java
Architecture Digest
Architecture Digest
Sep 1, 2023 · Backend Development

Replacing if‑else with Strategy Pattern and Map‑Based Functional Interfaces in a Java Coupon Service

The article demonstrates how to refactor a Java coupon‑distribution service by first applying the Strategy design pattern and then using a Map of lambda expressions to replace bulky if‑else or switch statements, improving maintainability and readability while discussing their respective trade‑offs.

Design PatternsFunctional InterfaceLambda
0 likes · 7 min read
Replacing if‑else with Strategy Pattern and Map‑Based Functional Interfaces in a Java Coupon Service
Zhuanzhuan Tech
Zhuanzhuan Tech
Aug 16, 2023 · Backend Development

Refactoring the Game Account Order Process with a Three‑Layer Interface and Strategy‑Template Pattern

This article describes how a game‑account order system with scattered core code and no design patterns was refactored into a clean three‑layer interface architecture using a strategy‑template approach, detailing the design, implementation, testing, gray‑release strategy, and post‑deployment safeguards.

Backend ArchitectureDesign PatternsStrategy Pattern
0 likes · 12 min read
Refactoring the Game Account Order Process with a Three‑Layer Interface and Strategy‑Template Pattern
The Dominant Programmer
The Dominant Programmer
May 31, 2023 · Backend Development

SpringBoot Essentials: AES Encryption, Netty TCP Client, Redis Integration, and More

This article compiles a series of practical SpringBoot implementations—including AES encryption with Vue, a Netty‑based TCP client that parses hex data into MySQL, multiple Redis integration patterns, strategy‑factory designs, custom annotations for rate limiting, global exception handling, and scheduled tasks—each linked to detailed examples.

AESNettyRedis
0 likes · 5 min read
SpringBoot Essentials: AES Encryption, Netty TCP Client, Redis Integration, and More
Java Architect Essentials
Java Architect Essentials
May 23, 2023 · Fundamentals

Replacing If‑Else: Five Techniques from Basic to Advanced

This article explores why traditional if‑else statements often lead to complex, hard‑to‑maintain code and presents five progressive techniques—including removing unnecessary else blocks, using fast‑return guard clauses, converting to dictionaries, and applying the strategy pattern—to improve readability, extensibility, and adherence to SOLID principles.

Design PatternsSoftware EngineeringStrategy Pattern
0 likes · 6 min read
Replacing If‑Else: Five Techniques from Basic to Advanced
JD Retail Technology
JD Retail Technology
Apr 23, 2023 · Fundamentals

Design Patterns and Programming Paradigms: Concepts, Architecture Patterns, and Practical Applications

This article explores the relationship between design patterns and programming languages, explains various programming paradigms, compares design patterns with architectural patterns, outlines key design principles, and provides extensive Java code examples illustrating factory, strategy, template method, builder, proxy, chain of responsibility, and command patterns in practice.

Builder PatternDesign PatternsFactory Pattern
0 likes · 27 min read
Design Patterns and Programming Paradigms: Concepts, Architecture Patterns, and Practical Applications
Code Ape Tech Column
Code Ape Tech Column
Apr 6, 2023 · Backend Development

Applying the Open‑Closed Principle and Bitmask Design for Extensible System Architecture

The article explains the six SOLID design principles, emphasizes the importance of the Open‑Closed principle, and demonstrates how to achieve extensible database schemas and APIs using type fields, extendable JSON columns, bitmap role encoding, and strategy/template patterns with concrete Java code examples.

Database DesignDesign PatternsOpen-Closed Principle
0 likes · 15 min read
Applying the Open‑Closed Principle and Bitmask Design for Extensible System Architecture
DaTaobao Tech
DaTaobao Tech
Dec 23, 2022 · Backend Development

Applying Design Patterns to Taobao's Marketing Price Service for High Extensibility

To make Taobao’s high‑traffic marketing price service highly extensible, the team layered a responsibility‑chain flow with a mediator‑driven shared context and wrapped heterogeneous coupons via an adapter, while employing strategy and interpreter patterns, achieving loose coupling, rapid rule addition, and minimal impact on core code.

Chain of ResponsibilityDesign PatternsInterpreter Pattern
0 likes · 19 min read
Applying Design Patterns to Taobao's Marketing Price Service for High Extensibility
Selected Java Interview Questions
Selected Java Interview Questions
Nov 27, 2022 · Backend Development

Strategy Pattern in Java: Theory, Advantages, Drawbacks, and Practical Payment Service Implementation

This article explains the Strategy design pattern, its structure, advantages and drawbacks, and demonstrates a practical Java implementation for payment processing using Spring beans, including interface definitions, concrete payment strategies, and a controller that selects the appropriate strategy at runtime.

Design PatternsSpringStrategy Pattern
0 likes · 6 min read
Strategy Pattern in Java: Theory, Advantages, Drawbacks, and Practical Payment Service Implementation
Selected Java Interview Questions
Selected Java Interview Questions
Sep 15, 2022 · Fundamentals

Applying the Strategy Pattern in Java with Spring Integration

This article explains the Strategy design pattern in Java, demonstrates its integration with Spring using custom annotations, enums, and a context manager, provides complete code examples, discusses its advantages over traditional conditional logic, and shows how to easily add new strategies.

Design PatternsSpringStrategy Pattern
0 likes · 13 min read
Applying the Strategy Pattern in Java with Spring Integration
NetEase LeiHuo UX Big Data Technology
NetEase LeiHuo UX Big Data Technology
Jul 3, 2022 · Fundamentals

Why Some Design Patterns Should Be Forgotten When Using Python

This article explains why traditional object‑oriented design patterns such as Strategy, Factory Method, Singleton, and Iterator often become unnecessary or overly complex in Python, illustrating with concise code examples how Python’s first‑class functions, dynamic typing, and built‑in constructs can replace them for clearer, more maintainable solutions.

Design PatternsFactory MethodIterator
0 likes · 12 min read
Why Some Design Patterns Should Be Forgotten When Using Python
macrozheng
macrozheng
Jun 14, 2022 · Backend Development

Refactor Java Business Logic with Strategy, Factory, and Template Method Patterns

This article demonstrates step‑by‑step how to improve existing Java code by applying the Strategy, Factory, and Template Method design patterns, reducing duplicated if‑else branches, adhering to the Open‑Closed and Single‑Responsibility principles, and making the logic more extensible and maintainable.

Design PatternsFactory PatternStrategy Pattern
0 likes · 11 min read
Refactor Java Business Logic with Strategy, Factory, and Template Method Patterns
Top Architect
Top Architect
Apr 17, 2022 · Backend Development

Using the Strategy Pattern to Simplify Complex if‑else Logic in Order Processing with Java Spring Boot

This article demonstrates how to replace verbose if‑else statements in an order‑processing system with a clean Strategy Pattern implementation, using custom annotations, a handler context, and Spring Boot components, providing complete code examples and a concise summary of the approach.

Design PatternsSpring BootStrategy Pattern
0 likes · 10 min read
Using the Strategy Pattern to Simplify Complex if‑else Logic in Order Processing with Java Spring Boot
Meituan Technology Team
Meituan Technology Team
Mar 10, 2022 · Backend Development

Design Patterns in Practice: Strategy, State, Observer, Builder, and Decorator Patterns

Through a teacher‑student dialogue, the article demonstrates how the Strategy (with Adapter), State, Observer, Builder, and Decorator patterns can be applied to reward distribution, task management, and activity modeling, illustrating how these patterns decouple logic, enhance extensibility, and improve code maintainability.

Builder PatternDecorator PatternDesign Patterns
0 likes · 24 min read
Design Patterns in Practice: Strategy, State, Observer, Builder, and Decorator Patterns
Code Ape Tech Column
Code Ape Tech Column
Feb 8, 2022 · Backend Development

Refactoring Long if...else Chains in Java Using Design Patterns and Spring

This article explains why lengthy if...else statements in Java payment services violate the Open‑Closed and Single‑Responsibility principles and demonstrates several refactoring techniques—including annotations, dynamic bean naming, template methods, strategy‑factory, and chain‑of‑responsibility patterns—using Spring to eliminate the conditional logic.

Design PatternsSpringStrategy Pattern
0 likes · 15 min read
Refactoring Long if...else Chains in Java Using Design Patterns and Spring