Tag

Factory Pattern

1 views collected around this technical thread.

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.

Backend DevelopmentFactory PatternObserver
0 likes · 8 min read
Common Design Patterns in PHP Web Service Development
Selected Java Interview Questions
Selected Java Interview Questions
Nov 12, 2024 · Backend Development

Refactoring a Multi‑Tenant Backend Service Using DDD and Factory Pattern

This article presents a case study of optimizing a multi‑tenant Java Spring MVC backend by applying domain‑driven design principles, the dependency inversion principle, and a factory pattern to decouple tenant‑specific logic, reduce service size, and improve maintainability and testability.

Backend DevelopmentDDDFactory Pattern
0 likes · 5 min read
Refactoring a Multi‑Tenant Backend Service Using DDD and Factory Pattern
Selected Java Interview Questions
Selected Java Interview Questions
Oct 27, 2024 · Backend Development

Optimizing Discount Logic with Factory and Strategy Patterns in Java

This article demonstrates how to replace bulky if‑else discount handling in a SpringBoot shopping service with a clean combination of strategy and factory patterns, providing extensible, maintainable code for various user types and product discounts.

Factory PatternSpringBootStrategy Pattern
0 likes · 13 min read
Optimizing Discount Logic with Factory and Strategy Patterns in Java
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.

Factory PatternScenario Handlingdesign patterns
0 likes · 13 min read
A Java-Based Scenario Execution Framework Using Design Patterns
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 PatternFactory PatternMyBatis
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.

Factory PatternStrategy Patterndesign patterns
0 likes · 20 min read
Java Design Patterns: Strategy, Factory, Singleton, Proxy, Observer, Template Method, Adapter and More
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 PatternRepository Pattern
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.

ConcurrencyFactory PatternLinkedBlockingQueue
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 ResponsibilityDistributed SystemsFactory 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 PatternsFactory Pattern
0 likes · 28 min read
JavaScript Design Patterns: A Comprehensive Guide
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 DevelopmentFactory PatternMyBatis
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 DevelopmentFactory PatternMyBatis
0 likes · 12 min read
Design Patterns Used in the MyBatis Framework
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.

Factory PatternSpringBootStrategy Pattern
0 likes · 13 min read
Mastering Code Refactoring: From Repetition to Design Patterns in Java
Test Development Learning Exchange
Test Development Learning Exchange
Aug 3, 2023 · Fundamentals

Factory Pattern and Abstract Factory Pattern in Python

This article introduces factory and abstract factory patterns in Python, including their concepts, implementations, and practical examples.

Abstract Factory PatternFactory PatternOOP
0 likes · 6 min read
Factory Pattern and Abstract Factory Pattern in Python
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 DevelopmentFactory PatternIoC
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 PatternFactory PatternStrategy Pattern
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.

Design PatternFactory Patternjava
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 PatternIoCSpring
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.

Factory PatternSpringdependency injection
0 likes · 5 min read
A Sarcastic Critique of Overengineered Enterprise Java Architecture
macrozheng
macrozheng
Jan 20, 2023 · Fundamentals

Master Template, Strategy, and Factory Patterns with Real‑World Java Examples

This article walks you through three classic design patterns—Template Method, Strategy, and Factory—using clear Java code samples, visual diagrams, and practical refactoring tips, so you can understand when and how to apply each pattern in real projects.

Factory PatternStrategy Patterndesign patterns
0 likes · 18 min read
Master Template, Strategy, and Factory Patterns with Real‑World Java Examples