Tag

object-oriented

0 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Jun 11, 2025 · Backend Development

Mastering PHP Getters and Setters: Boost Code Structure & Performance

This article explains how using getters and setters in PHP can improve code organization, reduce coupling, and enhance performance through techniques like lazy loading and result caching, illustrated with clear code examples.

CachingPerformancegetters
0 likes · 5 min read
Mastering PHP Getters and Setters: Boost Code Structure & Performance
Java Tech Enthusiast
Java Tech Enthusiast
Jun 4, 2025 · Backend Development

Object‑Oriented Join Queries in MyBatis‑Plus Using the mybatis‑plus‑join Library

The article explains how to replace hand‑written SQL join statements in MyBatis with an object‑oriented approach by adding the mybatis‑plus‑join library, configuring the Maven dependency, and writing concise Java code that leverages MPJQueryWrapper for clear and error‑free join queries.

JavaJoin QueryMyBatis-Plus
0 likes · 3 min read
Object‑Oriented Join Queries in MyBatis‑Plus Using the mybatis‑plus‑join Library
Python Programming Learning Circle
Python Programming Learning Circle
May 6, 2025 · Fundamentals

Avoiding the __init__ Anti‑Pattern in Python: Using dataclasses, classmethods, and NewType

The article explains why defining custom __init__ methods for simple data structures is a bad practice in Python and proposes a modern solution using dataclasses, classmethod factories, and typing.NewType to create clear, testable, and type‑safe class interfaces.

Best PracticesPythonclassmethod
0 likes · 13 min read
Avoiding the __init__ Anti‑Pattern in Python: Using dataclasses, classmethods, and NewType
php中文网 Courses
php中文网 Courses
Apr 1, 2025 · Fundamentals

Understanding Python Magic (Dunder) Methods

This article explains Python's magic (dunder) methods, categorizing them by purpose—construction, representation, comparison, arithmetic, container behavior, callability, and context management—and provides clear code examples illustrating how to customize class behavior for more Pythonic, intuitive objects.

Dunder MethodsMagic MethodsPython
0 likes · 11 min read
Understanding Python Magic (Dunder) Methods
php中文网 Courses
php中文网 Courses
Jan 26, 2025 · Backend Development

Understanding Getters and Setters in PHP

This article explains the purpose and usage of getters and setters in PHP, illustrating their advantages and providing comprehensive code examples that demonstrate how to implement and combine these methods to ensure data validation, security, and consistency.

gettersobject-orientedsetters
0 likes · 7 min read
Understanding Getters and Setters in PHP
php中文网 Courses
php中文网 Courses
Jan 8, 2025 · Backend Development

Using Closure Functions to Encapsulate Reusable Code Blocks in PHP

This article explains how PHP closure functions can encapsulate reusable code blocks, demonstrates basic closure syntax, shows how to pass closures for data processing, and illustrates combining closures with object-oriented programming to enhance flexibility and maintainability.

closureobject-orientedreusable code
0 likes · 4 min read
Using Closure Functions to Encapsulate Reusable Code Blocks in PHP
php中文网 Courses
php中文网 Courses
Dec 24, 2024 · Backend Development

Using Getters and Setters in PHP to Optimize Code Structure and Performance

The article explains how PHP getters and setters encapsulate private properties, reduce coupling, and enable lazy loading and result caching, providing code examples that demonstrate improved code clarity, maintainability, and system performance.

CachingPerformancegetters
0 likes · 5 min read
Using Getters and Setters in PHP to Optimize Code Structure and Performance
php中文网 Courses
php中文网 Courses
Nov 28, 2024 · Backend Development

Understanding Getters and Setters in PHP: Purpose, Usage, and Practical Examples

This article explains the purpose and implementation of getters and setters in PHP, demonstrates their advantages for data validation and encapsulation, and provides comprehensive code examples showing how to combine them for secure and reliable object property management.

PHPbackenddata encapsulation
0 likes · 6 min read
Understanding Getters and Setters in PHP: Purpose, Usage, and Practical Examples
php中文网 Courses
php中文网 Courses
Aug 21, 2024 · Backend Development

Understanding Getters and Setters in PHP

This article explains the purpose, implementation, and benefits of getters and setters in PHP, providing clear code examples that demonstrate how to encapsulate validation logic for private properties to improve data safety and object reliability.

PHPbackendgetter
0 likes · 6 min read
Understanding Getters and Setters in PHP
php中文网 Courses
php中文网 Courses
Aug 15, 2024 · Backend Development

Using Accessors and Mutators in PHP for Data Handling

This article explains PHP accessors and mutators, demonstrating how to define getter and setter methods, incorporate additional logic such as formatting, validation, and caching, and provides complete code examples to illustrate their practical use in backend development.

AccessorData HandlingMutator
0 likes · 7 min read
Using Accessors and Mutators in PHP for Data Handling
DevOps
DevOps
Aug 12, 2024 · Fundamentals

The Importance of Design and Modeling in Software Development

This article explains why software engineers should perform design and modeling—such as business modeling, process analysis, and system modeling—before writing code, highlighting how these practices align development with business goals, improve collaboration, and reduce costly rework caused by changing requirements.

System Modelingmodelingobject-oriented
0 likes · 9 min read
The Importance of Design and Modeling in Software Development
php中文网 Courses
php中文网 Courses
Jul 11, 2024 · Fundamentals

Understanding SOLID Principles with Java Examples

This article explains the five SOLID design principles—SRP, OCP, LSP, ISP, and DIP—detailing their definitions, common violations, and Java code examples that demonstrate how to refactor classes for better modularity, extensibility, and maintainability.

JavaSOLIDdesign principles
0 likes · 7 min read
Understanding SOLID Principles with Java Examples
php中文网 Courses
php中文网 Courses
Jun 19, 2024 · Fundamentals

Why We Need Secondary Constructors and How to Implement Them in Kotlin

The article explains the importance of auxiliary (secondary) constructors for flexible object creation, contrasts PHP's lack of support with Kotlin's feature, and demonstrates clean implementations using primary constructors and static factory methods to improve readability and maintainability.

Kotlinconstructorsdesign patterns
0 likes · 4 min read
Why We Need Secondary Constructors and How to Implement Them in Kotlin
php中文网 Courses
php中文网 Courses
Apr 1, 2024 · Backend Development

Understanding Constructors in PHP Inheritance

This article explains how PHP constructors work in class inheritance, detailing when child classes must explicitly call parent constructors, how required parameters affect this behavior, and provides clear code examples illustrating proper use of the parent::__construct syntax.

PHPbackendconstructors
0 likes · 8 min read
Understanding Constructors in PHP Inheritance
Sohu Tech Products
Sohu Tech Products
Dec 6, 2023 · Fundamentals

Understanding JavaScript Constructors, Prototypes, Classes, and Inheritance

The article thoroughly explains JavaScript constructors, prototype chains, the this binding, and ES6 class syntax, showing how functions become constructors with new, how prototypes link objects, custom new/instanceof implementations, and various inheritance patterns—including parasitic combination inheritance realized by class extends and super.

ES6JavaScriptPrototype
0 likes · 22 min read
Understanding JavaScript Constructors, Prototypes, Classes, and Inheritance
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Nov 27, 2023 · Fundamentals

Understanding the Bridge Design Pattern: Concepts, Java Implementation, and Use Cases

This article explains the Bridge design pattern, a structural pattern that separates abstraction from implementation to avoid class explosion, provides detailed Java code examples, UML diagrams, advantages, disadvantages, and typical scenarios for applying the pattern in software development.

Bridge PatternJavaUML
0 likes · 7 min read
Understanding the Bridge Design Pattern: Concepts, Java Implementation, and Use Cases
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Nov 17, 2023 · Fundamentals

Factory Method Pattern: Definition, Structure, Implementation, Advantages, and Use Cases

This article explains the Factory Method design pattern, covering its definition, UML diagram, key participants, the problems it solves compared to the Simple Factory, step‑by‑step Java implementation with code examples, advantages, disadvantages, application scenarios, and differences from the Simple Factory pattern.

Factory MethodJavaUML
0 likes · 8 min read
Factory Method Pattern: Definition, Structure, Implementation, Advantages, and Use Cases
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Oct 25, 2023 · Fundamentals

Understanding the Single Responsibility Principle (SRP) with UML Diagrams and Java Code Examples

This article explains the Single Responsibility Principle, its core idea, why it should be followed, its three main benefits, and provides UML class diagrams and Java code examples that demonstrate how to split responsibilities into dedicated classes for clearer, more maintainable software.

Code ExampleJavaSRP
0 likes · 9 min read
Understanding the Single Responsibility Principle (SRP) with UML Diagrams and Java Code Examples
Cognitive Technology Team
Cognitive Technology Team
Sep 28, 2023 · Fundamentals

Guidelines for Designing Immutable Classes in Java

This article outlines seven essential practices for creating immutable Java classes, including declaring the class as final, using private final fields, omitting setters, performing deep copies, overriding equals() and hashCode(), avoiding this‑escape in constructors, and protecting against reflective modification.

Best PracticesImmutableJava
0 likes · 2 min read
Guidelines for Designing Immutable Classes in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 13, 2023 · Fundamentals

Understanding the Chain of Responsibility Design Pattern with Java Example

This article explains the Chain of Responsibility design pattern, its roles, and how to implement it in Java using a leave‑approval scenario to achieve decoupled, flexible, and easily extensible request handling across multiple handlers.

Javachain of responsibilitydesign pattern
0 likes · 7 min read
Understanding the Chain of Responsibility Design Pattern with Java Example