Tag

decorator

1 views collected around this technical thread.

Architecture Digest
Architecture Digest
May 30, 2025 · Backend Development

MapStruct for Java Bean Mapping: Features, Expressions, QualifiedByName, NullValueMappingStrategy, and Decorator

MapStruct is a compile‑time Java annotation processor that generates type‑safe mapping code, offering concise, high‑performance conversions with features such as expressions, qualifiedByName methods, null‑value strategies, and decorators, illustrated through detailed code examples and usage guidelines.

Bean MappingExpressionMapStruct
0 likes · 7 min read
MapStruct for Java Bean Mapping: Features, Expressions, QualifiedByName, NullValueMappingStrategy, and Decorator
Code Ape Tech Column
Code Ape Tech Column
May 21, 2025 · Backend Development

Advanced MapStruct Usage: expression, qualifiedByName, nullValueMappingStrategy, and Decorator

This article introduces MapStruct, a compile‑time Java bean‑mapping framework, and demonstrates advanced features such as expression‑based mappings, qualifiedByName for custom conversions, nullValueMappingStrategy for handling nulls, and the use of Decorator classes to apply global post‑processing logic.

Backend DevelopmentBean MappingMapStruct
0 likes · 6 min read
Advanced MapStruct Usage: expression, qualifiedByName, nullValueMappingStrategy, and Decorator
php中文网 Courses
php中文网 Courses
Apr 8, 2025 · Fundamentals

Understanding Python Closures and Decorators

This article explains Python closures and decorators, detailing their definitions, formation conditions, practical examples, common use cases, and how decorators rely on closures, while providing code snippets for counters, timing, and repeatable execution.

ClosureFunction WrappingHigher-order Functions
0 likes · 14 min read
Understanding Python Closures and Decorators
Python Programming Learning Circle
Python Programming Learning Circle
Mar 5, 2025 · Fundamentals

Implementing a Python Singleton with Decorators

This article explains the singleton design pattern in Python, demonstrates how to implement it using a decorator with a wrapper class, provides step‑by‑step code examples, discusses its advantages, appropriate use cases, and cautions against overuse.

decoratordesign patternprogramming
0 likes · 7 min read
Implementing a Python Singleton with Decorators
Test Development Learning Exchange
Test Development Learning Exchange
Mar 3, 2025 · Fundamentals

Understanding Python Decorators: Concepts, Implementations, and Practical Applications

This article provides a comprehensive guide to Python decorators, covering their basic concept, step‑by‑step implementations of simple, parameterized, class‑based, and utility decorators, practical use‑cases such as logging, timing, permission checks, and how to preserve metadata with functools.wraps.

codedecoratorfunction
0 likes · 9 min read
Understanding Python Decorators: Concepts, Implementations, and Practical Applications
Test Development Learning Exchange
Test Development Learning Exchange
Jan 8, 2025 · Fundamentals

Creating Parameterless Decorators in Python: Examples and Use Cases

This article explains how to create various parameter‑less decorators in Python, providing clear examples for logging, performance measurement, authentication checks, result caching, and log‑level control, along with complete code snippets and explanations of their behavior.

Performanceauthenticationcaching
0 likes · 7 min read
Creating Parameterless Decorators in Python: Examples and Use Cases
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Dec 22, 2024 · Frontend Development

Practical Use of TypeScript Decorators in Front‑End Development

This article demonstrates how to apply class, property, method, and parameter decorators in TypeScript to create configurable, non‑intrusive front‑end components such as tables and forms, showing concrete code examples and explaining the underlying AOP concepts.

AOPClassDecoratorPropertyDecorator
0 likes · 10 min read
Practical Use of TypeScript Decorators in Front‑End Development
Python Programming Learning Circle
Python Programming Learning Circle
Nov 5, 2024 · Fundamentals

Implementing the Singleton Pattern in Python: Multiple Approaches and Thread Safety

This article explains the Singleton design pattern in Python, covering various implementation methods—including modules, decorators, classic classes, __new__ method, and metaclasses—while demonstrating thread‑safety concerns and solutions with locking, and provides complete code examples for each approach.

ModuleThread Safetydecorator
0 likes · 10 min read
Implementing the Singleton Pattern in Python: Multiple Approaches and Thread Safety
Test Development Learning Exchange
Test Development Learning Exchange
Nov 2, 2024 · Fundamentals

Understanding Python Decorators: Concepts, Examples, and Practical Uses

This article explains Python decorators, covering their definition as higher‑order functions, essential concepts like closures, step‑by‑step examples of basic, parameterized, class‑based, and stateful decorators, as well as practical uses such as logging and caching, all illustrated with clear code snippets.

ClosureHigher-order functioncaching
0 likes · 6 min read
Understanding Python Decorators: Concepts, Examples, and Practical Uses
Architecture Digest
Architecture Digest
Sep 22, 2024 · Backend Development

Advanced MapStruct Usage: Expressions, qualifiedByName, NullValueMappingStrategy, and Decorator

This article introduces MapStruct, a compile‑time Java bean‑mapping framework, and demonstrates advanced features such as expression mapping, qualifiedByName for custom conversions, null‑value handling strategies, and the use of decorators to extend mapper behavior, complete with code examples.

Backend DevelopmentBean MappingMapStruct
0 likes · 7 min read
Advanced MapStruct Usage: Expressions, qualifiedByName, NullValueMappingStrategy, and Decorator
Python Programming Learning Circle
Python Programming Learning Circle
Sep 13, 2024 · Fundamentals

Understanding Python Decorators: Definitions, Syntax, and Practical Use Cases

This article explains what Python decorators are, how they differ from ordinary closures, demonstrates multiple syntax forms—including basic, parameterized, and class‑based decorators—with complete code examples, and outlines common application scenarios such as logging, authentication, timing, and caching.

Tutorialcodedecorator
0 likes · 10 min read
Understanding Python Decorators: Definitions, Syntax, and Practical Use Cases
Test Development Learning Exchange
Test Development Learning Exchange
Sep 7, 2024 · Fundamentals

Understanding Python Decorators: Introduction, Common Examples, and Summary

This article introduces Python decorators, explains their purpose, and provides practical examples of common decorators such as @staticmethod, @property, @lru_cache, @wraps, @retry, @contextmanager, @dataclass, @cached_property, @singledispatch, and @timeit, concluding with a summary of their benefits for clean, maintainable code.

Code Exampledecoratorfundamentals
0 likes · 8 min read
Understanding Python Decorators: Introduction, Common Examples, and Summary
Test Development Learning Exchange
Test Development Learning Exchange
Sep 4, 2024 · Fundamentals

Understanding Python Closures and Decorators with Practical Examples

This article explains the concepts of closures and decorators in Python, demonstrates how closures can capture and preserve state, and shows multiple decorator patterns—including simple, parameterized, and thread‑safe decorators—through clear code examples and explanations.

ClosureFunctional Programmingdecorator
0 likes · 12 min read
Understanding Python Closures and Decorators with Practical Examples
Tencent Cloud Developer
Tencent Cloud Developer
Aug 30, 2024 · Fundamentals

Overview of 10 Classic Software Design Patterns with Go Examples

The article presents ten classic software design patterns—Singleton, Factory, Observer, Decorator, Strategy, Adapter, Proxy, Command, Composite, and Iterator—explaining each pattern’s features, advantages, disadvantages, typical applications, and providing concrete Go code examples to illustrate their implementation.

FactoryGoObserver
0 likes · 36 min read
Overview of 10 Classic Software Design Patterns with Go Examples
Test Development Learning Exchange
Test Development Learning Exchange
Aug 28, 2024 · Fundamentals

Python Decorators for API Testing: Retry, Timeout, Logging, Caching, Validation, and More

This article introduces Python decorators—such as retry, timeout, logging, caching, response validation, parameterization, exception handling, performance monitoring, permission checking, and composite usage—and provides complete code examples showing how they simplify and strengthen automated API testing.

PerformanceTimeoutapi-testing
0 likes · 10 min read
Python Decorators for API Testing: Retry, Timeout, Logging, Caching, Validation, and More
Test Development Learning Exchange
Test Development Learning Exchange
Aug 17, 2024 · Backend Development

Python Decorator Examples for API Testing

This article presents ten practical Python decorator patterns—such as logging, performance measurement, exception handling, retry, status‑code validation, parameter checking, rate limiting, data‑driven testing, environment configuration, and concurrent execution—each illustrated with clear use‑case descriptions and complete code snippets for API testing.

API testingPerformanceconcurrency
0 likes · 9 min read
Python Decorator Examples for API Testing
Test Development Learning Exchange
Test Development Learning Exchange
Jul 8, 2024 · Backend Development

Understanding JSONPath Decorator in Python

This article explains how to create and use a Python JSONPath decorator to simplify extracting data from JSON, covering installation, basic and advanced use cases such as list handling, filtering, aggregation, asynchronous processing, API parsing, validation, dynamic path generation, and nested data extraction, with full code examples.

APIData ProcessingJsonPath
0 likes · 6 min read
Understanding JSONPath Decorator in Python
Test Development Learning Exchange
Test Development Learning Exchange
May 25, 2024 · Fundamentals

Understanding Python Decorators: Concepts and Practical Examples

Python decorators are powerful constructs that let you augment functions without altering their definitions, and this guide explains their underlying principle, provides a basic template, and demonstrates ten practical decorator implementations—including timing, logging, access control, caching, singleton, retry, async, and property restrictions.

Tutorialcodedecorator
0 likes · 8 min read
Understanding Python Decorators: Concepts and Practical Examples
Python Programming Learning Circle
Python Programming Learning Circle
May 18, 2024 · Fundamentals

Understanding Monkey Patching in Python: Concepts, Example, and Performance Boost

This article explains what monkey patching is in Python, demonstrates how to replace the standard json module with the faster ujson module using a simple runtime patch, and shows performance measurements before and after the patch to illustrate the speed improvement.

Performancedecoratormonkey-patching
0 likes · 4 min read
Understanding Monkey Patching in Python: Concepts, Example, and Performance Boost