Tag

Decorator Pattern

0 views collected around this technical thread.

JD Tech
JD Tech
Jan 23, 2025 · Databases

Comprehensive Migration Plan for MongoDB to Alternative Data Stores

This article presents a complete MongoDB migration solution, detailing the migration rhythm, code refactoring using a decorator pattern, data source replacement with JImKV, MySQL and ES, bulk and incremental data transfer strategies, and deployment safeguards such as monitoring, gray release, and rollback to ensure a seamless cut‑over without service disruption.

Data MigrationDatabaseDecorator Pattern
0 likes · 8 min read
Comprehensive Migration Plan for MongoDB to Alternative Data Stores
JD Tech Talk
JD Tech Talk
Jan 8, 2025 · Backend Development

Dynamic Database Switching in MyBatis Using SQL Source Decoration

This article explains how to implement dynamic database switching in MyBatis by intercepting and modifying SQL statements to prepend database names to table names, using JSqlParser and MyBatis interceptors.

Backend DevelopmentDatabase SwitchingDecorator Pattern
0 likes · 6 min read
Dynamic Database Switching in MyBatis Using SQL Source Decoration
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Sep 3, 2024 · Frontend Development

Understanding the Decorator Pattern and AOP in JavaScript

This article explains the decorator pattern and how Aspect‑Oriented Programming (AOP) can be used in JavaScript to dynamically extend object behavior, provides classic and Vue‑based code examples, discusses advantages and drawbacks, and outlines practical scenarios for applying decorators in front‑end development.

AOPCode ExampleDecorator Pattern
0 likes · 11 min read
Understanding the Decorator Pattern and AOP in JavaScript
Architecture Digest
Architecture Digest
Dec 25, 2022 · Fundamentals

Understanding the Decorator Pattern with Practical Java Examples

This article explains the Decorator Pattern—a design pattern that lets developers extend object behavior without modifying existing code—by describing its core components, showing a generic UML diagram, and providing three detailed Java case studies covering task processing, file I/O, and logging systems.

Decorator PatternJavadesign patterns
0 likes · 12 min read
Understanding the Decorator Pattern with Practical Java Examples
Top Architect
Top Architect
Dec 20, 2022 · Backend Development

Applying the Decorator Pattern in a Spring Boot Project: A Practical Guide

This article demonstrates how to use the Decorator (Wrapper) pattern in a Spring Boot application to extend existing services with additional responsibilities, showing both single‑layer and multi‑layer decorations through concrete code examples and controller endpoints.

Backend DevelopmentDecorator PatternJava
0 likes · 8 min read
Applying the Decorator Pattern in a Spring Boot Project: A Practical Guide
Top Architect
Top Architect
Nov 24, 2022 · Backend Development

Using SLF4J MDC to Correlate Logs Across Threads in Java

This article explains how to use SLF4J's MDC feature to attach a request ID to log entries, demonstrates the limitation of MDC in asynchronous threads, and provides a decorator‑based solution (MDCRunnable) that propagates the context to child threads and thread pools.

Decorator PatternMDCSLF4J
0 likes · 10 min read
Using SLF4J MDC to Correlate Logs Across Threads in Java
Selected Java Interview Questions
Selected Java Interview Questions
Nov 21, 2022 · Backend Development

Applying the Decorator Pattern in Spring Boot: Multi‑Layer Decoration Example

This tutorial demonstrates how to integrate the Decorator design pattern into a Spring Boot application, showing a basic interface, concrete services, a simple decorator, and a multi‑layer decorator with full code examples and runtime output.

Backend DevelopmentDecorator PatternDependency Injection
0 likes · 7 min read
Applying the Decorator Pattern in Spring Boot: Multi‑Layer Decoration Example
DaTaobao Tech
DaTaobao Tech
Nov 7, 2022 · Fundamentals

Understanding the Decorator Pattern in Java: Concepts, Implementation, and Comparison

The article explains Java’s Decorator pattern, detailing its four roles, how to build abstract components and concrete decorators, demonstrates dynamic runtime extension of object behavior through sample code, compares it with inheritance, Proxy and Adapter patterns, and outlines its advantages, drawbacks, and suitable use cases.

Code ExampleDecorator PatternJava
0 likes · 15 min read
Understanding the Decorator Pattern in Java: Concepts, Implementation, and Comparison
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Sep 8, 2022 · Mobile Development

RTC Framework Design for Cloud Music Apps: A Unified Real-Time Communication Architecture

The article describes NetEase Cloud Music’s unified real‑time communication framework, which consolidates disparate audio/video features into a single, container‑based architecture using a common IPlayer interface, dynamic method generation, switchable players, and state‑machine management to streamline development, ensure business isolation, and provide seamless, controllable RTC services across all apps.

Architecture PatternDecorator PatternKotlin
0 likes · 11 min read
RTC Framework Design for Cloud Music Apps: A Unified Real-Time Communication Architecture
Top Architect
Top Architect
Jan 17, 2022 · Backend Development

Using SLF4J MDC to Correlate Logs Across Threads in Java Applications

This article explains how to employ SLF4J's MDC feature to attach a request identifier to log entries, demonstrates why it fails in asynchronous threads, and shows how to fix the issue with a decorator‑style MDCRunnable that propagates the MDC context to child threads and thread pools.

ConcurrencyDecorator PatternJava
0 likes · 10 min read
Using SLF4J MDC to Correlate Logs Across Threads in Java Applications
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 14, 2021 · Fundamentals

Understanding the Decorator Pattern in Java: Core Roles and Practical Implementation

This article explains the Decorator design pattern in Java, detailing its four core participants—Component, ConcreteComponent, Decorator, and ConcreteDecorator—through UML diagrams and complete code examples, and also illustrates how Java’s InputStream hierarchy uses FilterInputStream as a real‑world decorator.

Decorator PatternInputStreamJava
0 likes · 5 min read
Understanding the Decorator Pattern in Java: Core Roles and Practical Implementation
Selected Java Interview Questions
Selected Java Interview Questions
Oct 28, 2020 · Fundamentals

Decorator Pattern in Java: Theory, Code Examples, and Practical Usage

This article explains the Decorator design pattern, compares a naïve inheritance approach with a proper decorator implementation in Java, provides complete code examples, class diagram, usage scenarios, advantages, and disadvantages, demonstrating how to dynamically extend object behavior without modifying existing code.

Decorator PatternJavadesign patterns
0 likes · 10 min read
Decorator Pattern in Java: Theory, Code Examples, and Practical Usage
Java Captain
Java Captain
Apr 2, 2018 · Fundamentals

Understanding Java I/O: Streams, Decorator Pattern, NIO.2, and Asynchronous I/O

This article provides a comprehensive guide to Java I/O, explaining the distinction between byte and character streams, the role of abstract and concrete stream classes, how the Decorator pattern extends functionality, the enhancements introduced in NIO.2, and the use of asynchronous I/O with Futures and Callbacks.

Decorator PatternI/OJava
0 likes · 28 min read
Understanding Java I/O: Streams, Decorator Pattern, NIO.2, and Asynchronous I/O