Tagged articles
13 articles
Page 1 of 1
Architect
Architect
Sep 1, 2025 · Fundamentals

Master the State Pattern: Java Basics to Spring StateMachine Order Flow

This article explains the State design pattern, illustrates its advantages over traditional conditional logic, provides a complete Java implementation with abstract state, concrete states, and context classes, demonstrates a real‑world order processing scenario using Spring StateMachine, and discusses related patterns, benefits, and drawbacks.

Design PatternsJavaState Pattern
0 likes · 19 min read
Master the State Pattern: Java Basics to Spring StateMachine Order Flow
macrozheng
macrozheng
Jun 18, 2025 · Fundamentals

Mastering the State Pattern: Theory, Java Examples, and Real‑World Order Workflow

This article explains the State (State Machine) pattern, its typical scenarios, core roles, and provides complete Java implementations—including a user login example and a Spring StateMachine‑driven order processing workflow—while comparing it with related patterns and outlining its pros and cons.

Design PatternsJavaSoftware Architecture
0 likes · 15 min read
Mastering the State Pattern: Theory, Java Examples, and Real‑World Order Workflow
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 Pattern
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.

Software ArchitectureState Patternstate machine
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.

Software ArchitectureState Patternbehavioral pattern
0 likes · 5 min read
What Is the State Pattern? Explanation and PHP Implementation Example
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
Programmer DD
Programmer DD
Dec 27, 2023 · Backend Development

Mastering State Machines in Spring: From Design Patterns to Order Workflows

This article explains the State design pattern, compares Spring State Machine with alternatives, and provides a complete Java example that models order status transitions using Spring Statemachine, including code, configuration, listeners, services, and test execution.

Design PatternsOrder WorkflowState Pattern
0 likes · 15 min read
Mastering State Machines in Spring: From Design Patterns to Order Workflows
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.

Backend ArchitectureCoupon SystemDatabase design
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.

Design PatternsMobile DevelopmentProxy Pattern
0 likes · 13 min read
Applying Design Patterns to Optimize the Scan Feature Architecture
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
ELab Team
ELab Team
Sep 10, 2021 · Frontend Development

Mastering the State Pattern: Light Switch to Finite State Machines in JS

This article explains why using if‑else for state handling violates the Open‑Closed Principle, introduces the State design pattern with a light‑switch example, demonstrates its implementation in JavaScript (including class‑based and functional FSM libraries), and compares it to the Strategy pattern.

Design PatternsFinite State MachineJavaScript
0 likes · 17 min read
Mastering the State Pattern: Light Switch to Finite State Machines in JS
JavaEdge
JavaEdge
Oct 4, 2020 · Fundamentals

When Objects Change Behavior: Mastering the State Design Pattern

The State pattern lets an object alter its behavior when its internal state changes, by encapsulating state-specific logic in separate classes and delegating behavior through a context, improving maintainability and flexibility in object-oriented systems.

BehavioralDesign PatternsJava
0 likes · 10 min read
When Objects Change Behavior: Mastering the State Design Pattern
21CTO
21CTO
Oct 9, 2019 · Fundamentals

Mastering OOP in C: Implement the State Pattern with Real Code

This article walks you through applying object‑oriented concepts in C by implementing the State design pattern, covering class simulation with structs, inheritance via macros, lifecycle management, polymorphism, and a complete client example that demonstrates state transitions for a water model.

CDesign PatternsMemory Management
0 likes · 13 min read
Mastering OOP in C: Implement the State Pattern with Real Code