Tagged articles
23 articles
Page 1 of 1
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 MigrationDecorator PatternDistributed Systems
0 likes · 8 min read
Comprehensive Migration Plan for MongoDB to Alternative Data Stores
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.

Code ExampleDecorator PatternJavaScript
0 likes · 11 min read
Understanding the Decorator Pattern and AOP in JavaScript
Senior Tony
Senior Tony
Aug 13, 2024 · Fundamentals

How to Refactor Course Display Logic with the Decorator Pattern in Java

This article demonstrates how to identify long‑method and duplicated code smells in a Java curriculum‑display service and refactor the implementation using the Decorator pattern, providing clear component diagrams, full code examples, and a runnable demo that showcases flexible extensions for different course types.

Bad SmellDecorator PatternDesign Patterns
0 likes · 11 min read
How to Refactor Course Display Logic with the Decorator Pattern in Java
Java High-Performance Architecture
Java High-Performance Architecture
Dec 26, 2022 · Backend Development

Mastering the Decorator Pattern in Spring Boot: A Multi‑Layered Example

This article explains the Decorator (Wrapper) pattern, shows how to apply it in a Spring Boot project with concrete surfing‑service examples, demonstrates single‑ and multi‑layer decorators, and provides complete Java code and controller snippets to illustrate dynamic behavior extension without modifying existing classes.

Backend DevelopmentDecorator PatternDesign Patterns
0 likes · 7 min read
Mastering the Decorator Pattern in Spring Boot: A Multi‑Layered Example
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 PatternDesign PatternsJava
0 likes · 12 min read
Understanding the Decorator Pattern with Practical Java Examples
Baidu Geek Talk
Baidu Geek Talk
Dec 22, 2022 · Fundamentals

Mastering the Decorator Pattern: Real‑World Java Examples for Extensible Code

This article explains the Decorator design pattern, presents its UML structure, describes the roles of abstract components, concrete components, and decorators, and demonstrates three practical Java scenarios—task processing, file I/O, and logging—showing how to extend functionality without modifying existing classes.

Decorator PatternDesign PatternsJava
0 likes · 12 min read
Mastering the Decorator Pattern: Real‑World Java Examples for Extensible Code
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 PatternDesign Patterns
0 likes · 8 min read
Applying the Decorator Pattern in a Spring Boot Project: A Practical Guide
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
JavaEdge
JavaEdge
May 24, 2022 · Fundamentals

Why Inheritance Fails: Mastering the Decorator Pattern in Java

This article explains the Decorator design pattern, contrasting it with inheritance, and shows how to dynamically extend Java classes—especially I/O streams—using composition, complete with code examples, class diagrams, advantages, drawbacks, and practical usage scenarios.

Decorator PatternDesign PatternsInheritance
0 likes · 15 min read
Why Inheritance Fails: Mastering the Decorator Pattern in Java
Cyber Elephant Tech Team
Cyber Elephant Tech Team
Mar 16, 2022 · Backend Development

Mastering GoKit: Building Scalable Microservices with Go

This article introduces microservice concepts, explains GoKit's architecture and onion model, and walks through building a simple calculation service in Go, progressively adding logging, metrics, and middleware using the decorator pattern to achieve a clean, decoupled three‑layer design.

Decorator PatternGoGoKit
0 likes · 14 min read
Mastering GoKit: Building Scalable Microservices with Go
Meituan Technology Team
Meituan Technology Team
Mar 10, 2022 · Backend Development

Design Patterns in Practice: Strategy, State, Observer, Builder, and Decorator Patterns

Through a teacher‑student dialogue, the article demonstrates how the Strategy (with Adapter), State, Observer, Builder, and Decorator patterns can be applied to reward distribution, task management, and activity modeling, illustrating how these patterns decouple logic, enhance extensibility, and improve code maintainability.

Builder PatternDecorator PatternDesign Patterns
0 likes · 24 min read
Design Patterns in Practice: Strategy, State, Observer, Builder, and Decorator Patterns
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.

Decorator PatternJavaThreadLocal
0 likes · 10 min read
Using SLF4J MDC to Correlate Logs Across Threads in Java Applications
Programmer DD
Programmer DD
Dec 12, 2021 · Backend Development

How to Trace Multi‑Threaded Requests with SLF4J MDC in Java

This article explains how to use SLF4J's MDC feature to attach a request ID to log entries, enabling fast filtering of all logs belonging to a single request even across asynchronous threads and thread pools, and shows a decorator‑based solution for proper propagation.

Decorator PatternJavalogging
0 likes · 10 min read
How to Trace Multi‑Threaded Requests with SLF4J MDC in Java
JavaEdge
JavaEdge
Jul 6, 2021 · Fundamentals

Mastering the Decorator Pattern in Java: Dynamic Object Extension Explained

Learn how the Decorator pattern lets you dynamically add responsibilities to objects in Java without subclass explosion, covering its definition, core components, concrete examples with scroll‑bar decorators, advantages over inheritance, drawbacks, suitable scenarios, and best‑practice guidelines for flexible, maintainable code.

Code ExampleDecorator PatternDesign Patterns
0 likes · 7 min read
Mastering the Decorator Pattern in Java: Dynamic Object Extension Explained
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 PatternDesign PatternsInputStream
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 PatternDesign PatternsJava
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