Tagged articles
63 articles
Page 1 of 1
James' Growth Diary
James' Growth Diary
May 17, 2026 · Backend Development

Deep Dive into the buildTool Factory and Its Fail‑Closed Default Values

The article explains how the buildTool factory injects conservative default safety flags (Fail‑Closed), dramatically reduces boilerplate for the 30‑plus methods required by Claude Code's Tool interface, and combines TypeScript compile‑time checks with Zod runtime validation, illustrated with GlobTool, BashTool and FileEditTool examples, while discussing trade‑offs and design recommendations.

Code GenerationFactory PatternFail-Closed
0 likes · 16 min read
Deep Dive into the buildTool Factory and Its Fail‑Closed Default Values
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.

AuthenticationDesign PatternsFactory Pattern
0 likes · 14 min read
Unify Multi-Channel Login with Spring Boot Factory & Strategy Patterns
java1234
java1234
Mar 24, 2026 · Backend Development

Key Design Patterns Used in the Spring Framework

This article explains how Spring employs five core design patterns—Factory, Singleton, Proxy, Observer, and Template Method—detailing their roles, code examples, and how they contribute to Spring's modular, extensible architecture.

Design PatternsFactory PatternObserver
0 likes · 8 min read
Key Design Patterns Used in the Spring Framework
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.

AuthenticationBackendFactory Pattern
0 likes · 12 min read
Eliminate Messy Login Logic: Unified Multi‑Channel Authentication with Spring Boot Factory & Strategy Patterns
Open Source Tech Hub
Open Source Tech Hub
Oct 10, 2025 · Backend Development

Master PHP 8's match Expression: Safer, Cleaner Alternatives to switch

This guide explains PHP 8's match expression, highlighting its strict comparison, return capabilities, and practical examples—including basic rewrites, conditional branches, enum integration, and a driver factory pattern—to help developers replace switch statements with more robust code.

Code RefactoringEnumsFactory Pattern
0 likes · 5 min read
Master PHP 8's match Expression: Safer, Cleaner Alternatives to switch
Java Architect Essentials
Java Architect Essentials
Jul 21, 2025 · Backend Development

Boost Java Object Creation Speed: 3 Proven Techniques to Cut Overhead

This article explains why using the plain new operator is far faster than reflection, shows how an object pool can dramatically reduce memory usage and allocation time, and demonstrates a factory‑plus‑cache pattern that eliminates most repetitive new calls, delivering up to three‑fold performance gains.

BackendFactory PatternJava
0 likes · 6 min read
Boost Java Object Creation Speed: 3 Proven Techniques to Cut Overhead
Lin is Dream
Lin is Dream
May 21, 2025 · Backend Development

Mastering Design Patterns for Scalable Middleware Services

This article explores how to apply core design patterns—Observer, Factory, Proxy, and Template Method—in Java middleware development, illustrating each pattern with practical code snippets and explaining the design rationale for building maintainable, extensible, and flexible services.

Backend DevelopmentFactory PatternObserver Pattern
0 likes · 8 min read
Mastering Design Patterns for Scalable Middleware Services
php Courses
php Courses
Apr 10, 2025 · Backend Development

Common Design Patterns in PHP Web Service Development

This article introduces essential design patterns for PHP web service development, such as Factory, Singleton, Observer, Strategy, and Dependency Injection, explains their implementation with code examples, discusses their benefits for code reuse, maintainability, and scalability, and offers guidance on selecting appropriate patterns in modern PHP frameworks.

Design PatternsFactory PatternObserver
0 likes · 8 min read
Common Design Patterns in PHP Web Service Development
Architect
Architect
Nov 17, 2024 · Backend Development

How to Refactor a Multi‑Tenant Service to Reduce Coupling and Code Bloat

The article presents a real‑world case of a multi‑tenant system whose business logic was tightly coupled across tenants, leading to a massive service class, and demonstrates how applying Domain‑Driven Design, the Dependency Inversion Principle, and the Factory pattern can restructure the code into isolated tenant‑specific actions, improving maintainability and testability.

Backend ArchitectureCode RefactoringDependency Inversion
0 likes · 6 min read
How to Refactor a Multi‑Tenant Service to Reduce Coupling and Code Bloat
DaTaobao Tech
DaTaobao Tech
Jul 31, 2024 · Fundamentals

A Java-Based Scenario Execution Framework Using Design Patterns

The article presents a Java‑based scenario execution framework that leverages design patterns, annotations, enums and a generic factory to replace repetitive if/else branches with abstract scene interfaces and concrete implementations, enabling developers to add new business cases by simply creating a class and enum constant while the infrastructure automatically discovers and wires it, improving extensibility, readability and code quality.

Design PatternsFactory PatternJava
0 likes · 13 min read
A Java-Based Scenario Execution Framework Using Design Patterns
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.

AdapterDesign PatternsFactory 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 18, 2024 · Backend Development

Exploring Nine Design Patterns in MyBatis: Builder, Factory, Singleton, Proxy, Decorator, Adapter, Composite, Template Method, and Iterator

This article examines nine design patterns employed within MyBatis—Builder, Factory, Singleton, Proxy, Decorator, Adapter, Composite, Template Method, and Iterator—detailing their roles, source code examples, and how they facilitate configuration parsing, SQL execution, and caching in the framework.

Builder PatternDesign PatternsFactory Pattern
0 likes · 18 min read
Exploring Nine Design Patterns in MyBatis: Builder, Factory, Singleton, Proxy, Decorator, Adapter, Composite, Template Method, and Iterator
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 PatternJava
0 likes · 20 min read
Java Design Patterns: Strategy, Factory, Singleton, Proxy, Observer, Template Method, Adapter and More
Architect
Architect
May 20, 2024 · Backend Development

Unlocking MyBatis: 10+ Design Patterns Powering Its Architecture

This article dissects MyBatis's source code, revealing how more than ten classic design patterns—such as Factory, Singleton, Builder, Adapter, Proxy, Composite, Decorator, Template, Strategy, and Iterator—are applied to decouple complex scenarios, improve extensibility, and streamline ORM operations.

AdapterBackend DevelopmentBuilder
0 likes · 11 min read
Unlocking MyBatis: 10+ Design Patterns Powering Its Architecture
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 4, 2024 · Backend Development

Refactoring Cloud Disk Upload Logic with Domain-Driven Design: Models, Factories, and Repositories

The article examines the difficulties of applying Domain-Driven Design to a cloud‑disk file‑upload scenario, demonstrates how to simplify the code by extracting business models, introducing factories and repositories, and explains how these patterns clarify the separation between business and technical concerns.

Domain-Driven DesignFactory PatternJava
0 likes · 20 min read
Refactoring Cloud Disk Upload Logic with Domain-Driven Design: Models, Factories, and Repositories
FunTester
FunTester
Mar 26, 2024 · Backend Development

Building a Simple Java Object Pool with LinkedBlockingQueue and Factory Interface

This article describes how to build a lightweight custom object pool in Java using a LinkedBlockingQueue and a factory interface, detailing its design, implementation, code examples, and a test script that demonstrates borrowing, returning, and size control of pooled objects.

Factory Patternconcurrencylinkedblockingqueue
0 likes · 7 min read
Building a Simple Java Object Pool with LinkedBlockingQueue and Factory Interface
Selected Java Interview Questions
Selected Java Interview Questions
Mar 7, 2024 · Backend Development

Evolving an Order Processing System with Design Patterns: From Chain of Responsibility to Distributed Asynchronous Flow

This article walks through a real‑world order‑processing case, demonstrating how successive design‑pattern refinements—starting with the Chain of Responsibility, then adding Factory, Proxy, Template Method, Observer and distributed messaging—enable multi‑tenant, asynchronous, and scalable backend workflows.

Chain of ResponsibilityDesign PatternsFactory Pattern
0 likes · 15 min read
Evolving an Order Processing System with Design Patterns: From Chain of Responsibility to Distributed Asynchronous Flow
Sohu Tech Products
Sohu Tech Products
Mar 6, 2024 · Fundamentals

JavaScript Design Patterns: A Comprehensive Guide

This guide explains JavaScript design patterns—creational, structural, and behavioral—detailing common examples such as Singleton, Factory, Module, Decorator, Observer, Strategy, and more, and shows how applying these proven solutions can make code clearer, more flexible, maintainable, and scalable.

Behavioral PatternsCreational PatternsDesign Patterns
0 likes · 28 min read
JavaScript Design Patterns: A Comprehensive Guide
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 PatternJava
0 likes · 8 min read
Mastering the Strategy Pattern: From Simple IF‑ELSE to Scalable Design
Java Architect Essentials
Java Architect Essentials
Oct 23, 2023 · Backend Development

Design Patterns Employed in the MyBatis Framework

This article analyzes the MyBatis source code, illustrating how it applies a variety of design patterns—including Factory, Singleton, Builder, Adapter, Proxy, Composite, Decorator, Template, Strategy, and Iterator—to solve complex architectural challenges and improve modularity, extensibility, and maintainability.

Backend DevelopmentDesign PatternsFactory Pattern
0 likes · 8 min read
Design Patterns Employed in the MyBatis Framework
Code Ape Tech Column
Code Ape Tech Column
Oct 2, 2023 · Backend Development

Design Patterns Used in the MyBatis Framework

This article reviews the various design patterns—creational, structural, and behavioral—employed within MyBatis's source code, illustrating each pattern with diagrams and explaining their roles in simplifying factory creation, singleton configuration, builders, adapters, proxies, decorators, templates, strategies, and iterators.

Backend DevelopmentDesign PatternsFactory Pattern
0 likes · 12 min read
Design Patterns Used in the MyBatis Framework
Java Interview Crash Guide
Java Interview Crash Guide
Sep 19, 2023 · Backend Development

How MyBatis Leverages 10+ Design Patterns to Simplify Complex Scenarios

The article examines how MyBatis applies a variety of creational, structural, and behavioral design patterns—such as Factory, Singleton, Builder, Adapter, Proxy, Composite, Decorator, Template, Strategy, and Iterator—to decouple its over‑twenty‑thousand‑line codebase, improve modularity, and handle complex ORM tasks efficiently.

AdapterBackend DevelopmentBuilder
0 likes · 8 min read
How MyBatis Leverages 10+ Design Patterns to Simplify Complex Scenarios
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 PatternJava
0 likes · 13 min read
Mastering Code Refactoring: From Repetition to Design Patterns in Java
Selected Java Interview Questions
Selected Java Interview Questions
Jun 15, 2023 · Backend Development

How Spring IOC Reduces Coupling: From Direct Instantiation to Interfaces, Factory Method, and Reflection

This article explains the concept of coupling, demonstrates how traditional object creation leads to high coupling, and shows how using interfaces, the factory pattern, and reflection—culminating in Spring IOC—can dramatically lower coupling, improve reuse, and simplify maintenance in Java backend development.

Backend DevelopmentCouplingFactory Pattern
0 likes · 8 min read
How Spring IOC Reduces Coupling: From Direct Instantiation to Interfaces, Factory Method, and Reflection
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 PatternCode ExamplesDesign Patterns
0 likes · 27 min read
Design Patterns and Programming Paradigms: Concepts, Architecture Patterns, and Practical Applications
Architecture Digest
Architecture Digest
Feb 18, 2023 · Fundamentals

Understanding the Factory Pattern: Simple Factory, Factory Method, and Abstract Factory with Real-world Examples

This article explains the three main factory design patterns—Simple Factory, Factory Method, and Abstract Factory—detailing their concepts, typical use cases such as document parsing and browser automation, and providing complete Java‑style code examples to illustrate each pattern's implementation and benefits.

Factory PatternJavaObject-Oriented
0 likes · 12 min read
Understanding the Factory Pattern: Simple Factory, Factory Method, and Abstract Factory with Real-world Examples
Top Architect
Top Architect
Feb 16, 2023 · Backend Development

Understanding Dependency Injection and IoC in Spring: From Direct Instantiation to Factory Pattern and Reflection

This article explains why dependency injection reduces coupling compared with direct object creation, walks through traditional instantiation, interface programming, factory methods, and reflection, and shows how Spring IoC combines these techniques to manage object lifecycles and improve code maintainability.

Factory PatternIoCJava
0 likes · 8 min read
Understanding Dependency Injection and IoC in Spring: From Direct Instantiation to Factory Pattern and Reflection
Java Captain
Java Captain
Feb 7, 2023 · Backend Development

A Sarcastic Critique of Overengineered Enterprise Java Architecture

The article humorously deconstructs an overly complex Java enterprise setup, illustrating how excessive use of interfaces, abstract classes, factories, dependency injection, XML configuration, and heavyweight IDE tooling leads to bloated, hard‑to‑maintain code that ultimately fails in production.

Design PatternsFactory PatternJava
0 likes · 5 min read
A Sarcastic Critique of Overengineered Enterprise Java Architecture
ITPUB
ITPUB
Dec 12, 2022 · Fundamentals

Why Factories Matter in Go DDD: Clean Object Creation and Validation

This article explains how introducing factories in Domain‑Driven Design with Go separates object creation logic from domain responsibilities, hides implementation details, enforces invariants, and improves validation, while showing practical code patterns and design‑pattern choices for simple and complex domain objects.

DDDDomain-Driven DesignFactory Pattern
0 likes · 15 min read
Why Factories Matter in Go DDD: Clean Object Creation and Validation
DaTaobao Tech
DaTaobao Tech
Oct 27, 2022 · Backend Development

Applying the Strategy Pattern in Java Backend Development: Best Practices and Iterations

The article demonstrates how to replace fragile if‑else shop‑ranking logic in a Java backend with the Strategy pattern, progressing from simple factories and enums to Spring‑auto‑wired and generic factories, highlighting improved extensibility, reduced coupling, Open‑Closed compliance, and the trade‑off of added abstraction complexity.

Backend DevelopmentFactory PatternGenerics
0 likes · 16 min read
Applying the Strategy Pattern in Java Backend Development: Best Practices and Iterations
DaTaobao Tech
DaTaobao Tech
Sep 21, 2022 · Fundamentals

Factory Pattern: Simple Factory, Factory Method, and Abstract Factory – Concepts, Code, UML, Pros & Cons

The article explains the Factory design pattern family—Simple Factory, Factory Method, and Abstract Factory—showing how each separates object creation from use, presents Java code and UML examples, and compares their advantages such as decoupling and Open/Closed compliance against drawbacks like increased complexity and class proliferation.

Factory PatternJavaObject-Oriented
0 likes · 19 min read
Factory Pattern: Simple Factory, Factory Method, and Abstract Factory – Concepts, Code, UML, Pros & Cons
Baidu Geek Talk
Baidu Geek Talk
Sep 2, 2022 · Fundamentals

Understanding Factory Patterns: Simple Factory, Factory Method, and Abstract Factory with Code Samples

The article explains the Factory design pattern’s three main variants—Simple Factory for limited product types, Factory Method for extensible hierarchies, and Abstract Factory for creating families of related objects—illustrated with Java code examples for document parsing, automated testing, and cross‑platform membership systems.

Abstract FactoryDesign PatternsFactory Method
0 likes · 11 min read
Understanding Factory Patterns: Simple Factory, Factory Method, and Abstract Factory with Code Samples
Code Ape Tech Column
Code Ape Tech Column
Jul 15, 2022 · Backend Development

Eliminating Code Duplication in Java Business Logic with Design Patterns, Annotations, and Bean Mapping

This article explains how to reduce repetitive Java business code by applying the factory and template‑method patterns for shopping‑cart processing, using custom annotations with reflection to generate API requests, and leveraging bean‑mapping utilities to copy properties between DTO/DO objects, while illustrating each technique with concrete code examples.

Code RefactoringFactory PatternJava
0 likes · 21 min read
Eliminating Code Duplication in Java Business Logic with Design Patterns, Annotations, and Bean Mapping
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
Snowball Engineer Team
Snowball Engineer Team
May 6, 2022 · Mobile Development

Dynamic Card Injection Framework Using Annotation Processing in Android

This article describes how a mobile development team refactored a card‑creation feature by applying the Open/Closed and Single‑Responsibility principles, introduced a factory pattern with reflection, and ultimately built a fully automated dynamic injection framework using Java Annotation Processing (APT) to eliminate manual code updates.

AndroidAnnotation ProcessingDynamic Injection
0 likes · 13 min read
Dynamic Card Injection Framework Using Annotation Processing in Android
Su San Talks Tech
Su San Talks Tech
Nov 6, 2021 · Fundamentals

Unlock Cleaner Code: Master 6 Essential Design Patterns for Java Projects

This article introduces six classic design patterns—Strategy, Chain of Responsibility, Template Method, Observer, Factory, and Singleton—explaining their real‑world business scenarios, core principles, and providing clean Java implementations to help developers write more maintainable and extensible code.

Chain of ResponsibilityDesign PatternsFactory Pattern
0 likes · 25 min read
Unlock Cleaner Code: Master 6 Essential Design Patterns for Java Projects
Selected Java Interview Questions
Selected Java Interview Questions
Oct 25, 2021 · Fundamentals

Understanding Factory and Strategy Design Patterns in Java

This article explains the differences and similarities between the Factory and Strategy design patterns in Java, provides concrete code examples for each, and discusses how the Strategy pattern can offer more flexible behavior composition compared to the traditional Factory approach.

Design PatternsFactory PatternJava
0 likes · 7 min read
Understanding Factory and Strategy Design Patterns in Java
vivo Internet Technology
vivo Internet Technology
Oct 8, 2021 · Fundamentals

Applying Design Patterns to Improve Extensibility in Vivo Marketing Automation Engine

The Vivo Internet Server Team demonstrates how applying classic design patterns—factory, template method, strategy, and state—alongside finite‑state machines or workflow engines can dramatically improve the scalability, maintainability, and extensibility of a visual marketing automation engine for rapidly changing business scenarios.

Factory PatternMarketing AutomationStrategy Pattern
0 likes · 19 min read
Applying Design Patterns to Improve Extensibility in Vivo Marketing Automation Engine
Alibaba Cloud Developer
Alibaba Cloud Developer
Jul 5, 2021 · Fundamentals

Mastering Factory Patterns: Simple, Factory Method & Abstract Factory Explained

This article revisits the core creational patterns—Simple Factory, Factory Method, and Abstract Factory—explaining their motivations, role divisions, basic concepts, detailed implementations with Java code, and comparative insights to help developers choose the right pattern for scalable object creation.

Abstract FactoryFactory MethodFactory Pattern
0 likes · 20 min read
Mastering Factory Patterns: Simple, Factory Method & Abstract Factory Explained
JavaEdge
JavaEdge
Oct 25, 2020 · Backend Development

How to Eliminate Duplicate Code with Factory & Template Method Patterns in Java

This article explains why duplicate code harms maintainability, then demonstrates step‑by‑step refactoring techniques—using factory and template method patterns, custom annotations with reflection, and BeanUtils—to consolidate business logic for different cart types and API calls while preserving extensibility.

Design PatternsFactory PatternJava
0 likes · 15 min read
How to Eliminate Duplicate Code with Factory & Template Method Patterns in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 26, 2020 · Fundamentals

Understanding Factory Patterns: Simple Factory, Factory Method, and Abstract Factory with Spring Dependency Injection

This article explains the three common factory design patterns—simple factory, factory method, and abstract factory—illustrates their Java implementations with product and factory classes, demonstrates client usage, and shows how Spring's dependency injection can replace manual factory instantiation, providing a comprehensive guide for developers.

Abstract FactoryDesign PatternsFactory Pattern
0 likes · 7 min read
Understanding Factory Patterns: Simple Factory, Factory Method, and Abstract Factory with Spring Dependency Injection
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.

BackendDesign PatternsFactory Pattern
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
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Jul 5, 2017 · Backend Development

Mastering Factory Pattern and Application Layer Design for SOA Systems

This article explains the appropriate use cases for the Factory pattern, details the responsibilities and characteristics of the application layer in SOA systems, and provides concrete C# code examples for services, DTOs, and data assemblers to illustrate clean separation of concerns and effective data transfer.

Application LayerC#DDD
0 likes · 18 min read
Mastering Factory Pattern and Application Layer Design for SOA Systems