Tag

State Pattern

1 views collected around this technical thread.

Architect
Architect
Jun 13, 2025 · Fundamentals

Mastering the State Pattern: Real‑World Java Examples and Spring State Machine

This article explains the State (State Machine) pattern, its typical scenarios such as order processing and elevator control, presents a complete Java implementation with abstract, concrete, and context classes, demonstrates how to model order workflows using Spring State Machine, compares related patterns, and discusses the pattern’s advantages and drawbacks.

JavaSpring State MachineState Machine
0 likes · 14 min read
Mastering the State Pattern: Real‑World Java Examples and Spring State Machine
macrozheng
macrozheng
Feb 28, 2025 · Fundamentals

Mastering the State Pattern: Real‑World Java Examples and Best Practices

This article explains the State (State Machine) design pattern, its typical use cases, core roles, and practical Java implementations—including a login‑state example and a Spring StateMachine order workflow—while also comparing it with related patterns and outlining its advantages and drawbacks.

JavaState MachineState Pattern
0 likes · 16 min read
Mastering the State Pattern: Real‑World Java Examples and Best Practices
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.

PHPState Patternbehavioral pattern
0 likes · 5 min read
What Is the State Pattern? Explanation and PHP Implementation Example
Architect
Architect
Nov 29, 2022 · Backend Development

Design and Implementation of a Coupon System for a Rental Platform

This article details the business flow, database schema, micro‑service architecture, caching strategies, state‑machine implementation, and concurrency handling for building a robust coupon system that enables merchants to bind coupons to rental listings and attract end‑users.

Database DesignState Patternbackend architecture
0 likes · 19 min read
Design and Implementation of a Coupon System for a Rental Platform
DaTaobao Tech
DaTaobao Tech
Jun 27, 2022 · Mobile Development

Applying Design Patterns to Optimize the Scan Feature Architecture

The Taobao Scan feature was refactored by applying the Responsibility‑Chain, State, and Proxy design patterns, separating view and logic layers, introducing a fluent pipeline API, modular state handling, and a global proxy, which together dramatically improved code maintainability, extensibility, testability, and reduced development risk.

Proxy PatternState Patternarchitecture
0 likes · 13 min read
Applying Design Patterns to Optimize the Scan Feature Architecture