Tag

code reuse

0 views collected around this technical thread.

Deepin Linux
Deepin Linux
Jun 15, 2025 · Fundamentals

How C++ Polymorphism Cuts Tight Coupling and Boosts Code Reuse

This article explains C++ polymorphism, shows how virtual functions and inheritance break tight coupling, improve code reuse, simplify extensions, and enhance maintainability, and demonstrates its role in common design patterns such as Strategy and Factory Method with clear code examples.

C++OOPcode reuse
0 likes · 20 min read
How C++ Polymorphism Cuts Tight Coupling and Boosts Code Reuse
Test Development Learning Exchange
Test Development Learning Exchange
May 25, 2025 · Fundamentals

Understanding Python's functools.partial: Syntax, Benefits, and Practical Examples

This article explains what Python's functools.partial is, shows its basic syntax, outlines its advantages such as reducing code duplication and improving readability, and provides multiple practical code examples—including simple addition, keyword arguments, complex use cases, comparisons with lambda, and real‑world applications in GUI and multithreading contexts.

Higher-order Functionscode reusefunctools
0 likes · 7 min read
Understanding Python's functools.partial: Syntax, Benefits, and Practical Examples
Sohu Tech Products
Sohu Tech Products
May 14, 2025 · Mobile Development

Best Practices for Reusing ViewModel Logic Across Multiple Android Screens

This article examines common challenges of sharing user interaction logic across multiple Android screens using ViewModel, compares four reuse strategies—including base class inheritance, helper classes, Kotlin class delegation, and interface default functions—and recommends the interface default‑function approach as the most flexible and maintainable solution.

KotlinMVIViewModel
0 likes · 14 min read
Best Practices for Reusing ViewModel Logic Across Multiple Android Screens
php中文网 Courses
php中文网 Courses
Apr 28, 2025 · Backend Development

Using Closure Functions to Encapsulate Reusable Code Blocks in PHP

This article explains how PHP closures can capture external variables, demonstrates practical examples of wrapping reusable logic in anonymous functions, and shows how to combine closures with object‑oriented programming to improve code reuse and maintainability.

Anonymous FunctionsBackend DevelopmentClosure
0 likes · 5 min read
Using Closure Functions to Encapsulate Reusable Code Blocks in PHP
JD Tech Talk
JD Tech Talk
Apr 23, 2025 · Frontend Development

Reusable H5 Marketing Activity Pages: Technical Solutions and Centralized Workspace Management

This article describes how reusable H5 marketing activity pages can be quickly built using five technical solutions, introduces a centralized workspace and monorepo structure with example configurations, and explains the benefits and considerations of central repository management for front‑end development.

H5Monorepocode reuse
0 likes · 4 min read
Reusable H5 Marketing Activity Pages: Technical Solutions and Centralized Workspace Management
php中文网 Courses
php中文网 Courses
Feb 21, 2025 · Backend Development

PHP Functions and Modular Programming: Concepts, Best Practices, and Real-World Examples

This article explains PHP functions and modular programming, covering definitions, parameters, scope, anonymous functions, best practices, and real-world examples to help developers write more maintainable and efficient backend code in modern web applications.

Backend DevelopmentBest PracticesFunctions
0 likes · 6 min read
PHP Functions and Modular Programming: Concepts, Best Practices, and Real-World Examples
Code Mala Tang
Code Mala Tang
Feb 3, 2025 · Fundamentals

Boost Your Python Code: 5 Powerful Custom Decorators You Must Use

This article explores how Python decorators can eliminate repetitive code, improve performance, enforce type safety, simplify debugging, and implement rate limiting, offering five custom decorator examples with clear explanations and ready-to-use implementations.

Best Practicescode reusedecorators
0 likes · 8 min read
Boost Your Python Code: 5 Powerful Custom Decorators You Must Use
php中文网 Courses
php中文网 Courses
Jan 2, 2025 · Backend Development

Using PHP Closures to Encapsulate Reusable Code Blocks

This article explains how PHP closures—anonymous functions that capture external variables—can be used to encapsulate reusable code blocks, demonstrates practical examples including data processing callbacks and integration with object‑oriented classes, and shows how this approach enhances code reuse, maintainability, and flexibility.

Anonymous FunctionsBackendClosures
0 likes · 4 min read
Using PHP Closures to Encapsulate Reusable Code Blocks
Test Development Learning Exchange
Test Development Learning Exchange
Nov 12, 2024 · Fundamentals

Python Decorators: Concepts, Examples, and Practical Applications

This article provides a comprehensive guide to Python decorators, covering their basic concepts, practical examples including logging, multiple decorators, parameterized decorators, metadata preservation, class decoration, and performance monitoring applications.

FunctionsMetadata Preservationcode reuse
0 likes · 5 min read
Python Decorators: Concepts, Examples, and Practical Applications
DaTaobao Tech
DaTaobao Tech
Oct 21, 2024 · Fundamentals

The True Purpose of Classes and Functions: Beyond Reuse

The article argues that classes and functions serve as fundamental structural elements rather than mere tools for reuse, contending that excessive reuse can increase complexity while intentional redundancy simplifies maintenance, and advocating deep modules over shallow ones, illustrated by examples from Supercell, DingTalk, and a trivial shallow‑module code snippet.

DDDDRY principlecode reuse
0 likes · 8 min read
The True Purpose of Classes and Functions: Beyond Reuse
DaTaobao Tech
DaTaobao Tech
Oct 11, 2024 · Fundamentals

Rethinking Code Reuse: Balancing DRY, YAGNI, and Maintenance Costs

The article argues that while code reuse and DRY can boost productivity, over‑abstracted, duplicated logic often inflates maintenance costs, so developers should apply DRY cautiously, favor YAGNI and heuristics like the Rule of Three, and prefer clean‑architecture boundaries to keep complexity manageable.

DRY principleSoftware MaintenanceTechnical Debt
0 likes · 12 min read
Rethinking Code Reuse: Balancing DRY, YAGNI, and Maintenance Costs
JD Tech
JD Tech
Sep 23, 2024 · Backend Development

Evolution of JD Advertising System Architecture: From Monolithic Code to Domain‑Driven Design

This article outlines the step‑by‑step architectural evolution of JD's advertising platform, describing how the system progressed from a simple, tightly coupled codebase through context‑based designs to a domain‑driven, capability‑oriented architecture that improves extensibility, reuse, stability, and knowledge transfer.

BackendDomain-Driven Designarchitecture
0 likes · 24 min read
Evolution of JD Advertising System Architecture: From Monolithic Code to Domain‑Driven Design
php中文网 Courses
php中文网 Courses
Aug 13, 2024 · Backend Development

Using Closure Functions to Encapsulate Reusable Code Blocks in PHP

This article explains how PHP closures can be used to encapsulate reusable code blocks, demonstrates practical examples including simple closures, passing closures as callbacks, and combining closures with object‑oriented programming to improve code reuse and maintainability.

Backend DevelopmentClosurePHP
0 likes · 5 min read
Using Closure Functions to Encapsulate Reusable Code Blocks in PHP
php中文网 Courses
php中文网 Courses
Aug 6, 2024 · Backend Development

Leveraging Laravel Macros to Extend Framework Functionality

This article explains how Laravel developers can use Laravel Macros to encapsulate repetitive data‑handling logic, attach custom methods to core classes such as Collections and Eloquent models, improve code reuse, maintainability, and development efficiency, while also covering best practices and potential pitfalls.

Backend DevelopmentLaravelMacros
0 likes · 10 min read
Leveraging Laravel Macros to Extend Framework Functionality
php中文网 Courses
php中文网 Courses
Jul 30, 2024 · Backend Development

Using Closure Functions to Encapsulate Reusable Code Blocks in PHP

This article explains how PHP closure functions can be used to encapsulate reusable code blocks, demonstrates practical examples including simple arithmetic, data processing callbacks, and integration with object‑oriented programming to improve code reuse and maintainability.

BackendClosureOOP
0 likes · 5 min read
Using Closure Functions to Encapsulate Reusable Code Blocks in PHP
php中文网 Courses
php中文网 Courses
Jul 22, 2024 · Backend Development

Understanding PHP Traits: Code Reuse, Conflict Resolution, and Best Practices

This article explains PHP traits as a code‑reuse mechanism, compares them with classes and multiple inheritance, demonstrates their syntax and conflict‑resolution operators, and offers advanced usage examples and best‑practice guidelines for backend development.

Backend DevelopmentOOPPHP
0 likes · 11 min read
Understanding PHP Traits: Code Reuse, Conflict Resolution, and Best Practices
Test Development Learning Exchange
Test Development Learning Exchange
Jul 18, 2024 · Fundamentals

Using functools.partial in Python: Ten Practical Examples

This article introduces Python's functools.partial, explaining how fixing certain function arguments creates new callable functions, and demonstrates ten practical examples ranging from mathematical calculations and file handling to HTTP request wrapping, decorator parameterization, multiprocessing, GUI event binding, logging, data validation, and configuration parsing.

code reusefunctoolspartial
0 likes · 7 min read
Using functools.partial in Python: Ten Practical Examples
Bilibili Tech
Bilibili Tech
Jul 12, 2024 · Frontend Development

Design and Implementation of a Unified Multi‑Business Detail Page Framework

The project consolidates three separate detail‑page implementations into a single, reusable framework that separates business, component, and framework layers, employs dependency‑injection and scoped lifecycles to support diverse scenarios while ensuring stability through comprehensive logging, monitoring, and staged gray‑release testing.

Modular Designarchitecturecode reuse
0 likes · 11 min read
Design and Implementation of a Unified Multi‑Business Detail Page Framework
php中文网 Courses
php中文网 Courses
May 27, 2024 · Backend Development

Using PHP Traits in Symfony for Reusable and Modular Code

This guide explains how to use PHP Traits within the Symfony framework to encapsulate reusable functionality, demonstrating the creation of a LoggerTrait, its integration into a UserService, and the injection of that service into a controller for clean, modular, and DRY code.

Backend DevelopmentPHPSymfony
0 likes · 5 min read
Using PHP Traits in Symfony for Reusable and Modular Code
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 7, 2024 · Frontend Development

Understanding and Using Custom Hooks (Composition API) in Vue 3

This article explains what Vue 3 custom hooks (Composition API) are, why they are useful for logic reuse, shows how to create both business‑specific and highly reusable hooks with practical code examples, and lists popular open‑source hook libraries for developers.

Composition APICustom HooksJavaScript
0 likes · 8 min read
Understanding and Using Custom Hooks (Composition API) in Vue 3