Tagged articles
112 articles
Page 2 of 2
Xianyu Technology
Xianyu Technology
Jul 14, 2020 · Backend Development

Applying the Responsibility Tree Pattern for Versioned API Refactoring

To refactor a versioned API plagued by nested guards, the article proposes the Responsibility Tree pattern—a hybrid of Chain of Responsibility and Strategy—that routes requests through hierarchical handlers based on parameters, yielding cleaner code, easier debugging, and scalable extension for future versions.

API VersioningChain of ResponsibilityDesign Patterns
0 likes · 12 min read
Applying the Responsibility Tree Pattern for Versioned API Refactoring
Meituan Technology Team
Meituan Technology Team
Mar 19, 2020 · Backend Development

Applying Design Patterns and Domain‑Driven Design in Meituan Takeaway Marketing System

The Meituan Takeaway Marketing team shows how combining domain‑driven design with classic patterns such as Factory Method, Strategy, State and Responsibility Chain creates an extensible, maintainable reward system that adapts to rapidly changing business rules while keeping the domain model clean and SOLID‑compliant.

Design PatternsDomain‑Driven DesignFactory Method
0 likes · 25 min read
Applying Design Patterns and Domain‑Driven Design in Meituan Takeaway Marketing System
58 Tech
58 Tech
Feb 14, 2020 · Backend Development

Finite State Machine Based Advertisement Status Management in the LEGO Advertising Platform

This article systematically introduces a finite state machine (FSM) based solution for managing advertisement status in the LEGO advertising platform, detailing the background challenges, problem review, two design alternatives (strategy‑factory pattern and configuration‑driven approach), their advantages, disadvantages, and a final recommendation.

AdvertisementConfiguration ManagementFSM
0 likes · 11 min read
Finite State Machine Based Advertisement Status Management in the LEGO Advertising Platform
Programmer DD
Programmer DD
Jan 11, 2020 · Fundamentals

Mastering the Strategy Pattern: When and How to Use It in Java

This article explains the Strategy design pattern, its definition, roles, UML diagram, Java code examples, real‑world applications such as payment integration and compression, and provides guidance on when to use it, its advantages, drawbacks, and how to simplify it with Java 8 lambdas.

Design PatternsJavaLambda
0 likes · 16 min read
Mastering the Strategy Pattern: When and How to Use It in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 30, 2019 · Backend Development

Eliminating Complex if‑else Logic with Strategy and Factory Patterns in a Spring‑Based Java Application

This article explains how excessive if‑else statements in business code hurt readability and maintainability, and demonstrates how to replace them with the Strategy and Factory design patterns integrated with Spring, using a food‑delivery discount example and complete Java code snippets.

Design PatternsFactory PatternJava
0 likes · 12 min read
Eliminating Complex if‑else Logic with Strategy and Factory Patterns in a Spring‑Based Java Application
macrozheng
macrozheng
Oct 29, 2019 · Backend Development

Eliminate Complex if‑else with Strategy & Factory Patterns in Spring

This article explains how to replace tangled if‑else logic in business code with the Strategy and Factory design patterns, integrates them into a Spring application, and demonstrates the resulting improvements in readability, maintainability, and extensibility for discount calculations.

Factory PatternJavaStrategy Pattern
0 likes · 13 min read
Eliminate Complex if‑else with Strategy & Factory Patterns in Spring
Programmer DD
Programmer DD
May 28, 2019 · Backend Development

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

This article explains how to apply the Strategy pattern within a Spring project, covering background, learning objectives, step‑by‑step code examples for query services A, B, and C, the three‑part invocation process, and both list‑based and map‑based configurations.

Backend DevelopmentDesign PatternsJava
0 likes · 3 min read
Mastering the Strategy Pattern in Spring: Real-World Java Examples