Tagged articles
Observer Pattern
47 articles · Page 1 of 1
This tutorial explains the Observer design pattern with a Java implementation using an e-commerce order system where payment triggers logistics and procurement updates, demonstrating loose coupling between subject and observers.
Behavioral PatternDecouplingEvent Notification
0 likes · 7 min read

The article explains the Observer pattern by first showing the problems of hard‑coding post‑payment actions, then detailing how defining a subject, observer interface, and concrete observers decouples the system, discusses push vs pull notification models, and illustrates real‑world uses in Spring events, GUI listeners, and message queues.
DecouplingJavaObserver Pattern
0 likes · 14 min read


liandkJul 17, 2026 · Fundamentals
This article introduces the Observer pattern, explains its purpose of decoupling publishers and subscribers, walks through a complete Java implementation with an official‑account subscription example, lists typical business scenarios, compares it with the Mediator pattern, and outlines its advantages and pitfalls.
DecouplingJavaObserver Pattern
0 likes · 6 min read

This article walks through the three core behavioral design patterns—Strategy, Observer, and Chain of Responsibility—explaining their intent, showing problematic anti‑patterns, providing step‑by‑step Spring and MQ code implementations, mapping them to real‑world frameworks, and offering interview‑style comparison questions to solidify understanding.
Chain of ResponsibilityJavaMessage Queue
0 likes · 19 min read

Many developers learn dozens of design patterns but still end up with fragile, hard‑to‑maintain code; the article explains that the real key is to identify system problems first and apply a disciplined engineering decision method, illustrated with concrete Factory, Builder, Strategy, Template, Decorator, Adapter, Observer and Mediator examples.
Builder PatternFactory PatternObserver Pattern
0 likes · 16 min read

This article walks through ten classic design patterns—Factory, Proxy, Template Method, Strategy, Observer, Chain of Responsibility, Singleton, Builder, Adapter, and Decorator—showing how they are realized in Spring Boot 3.x with concrete e‑commerce, payment, and user‑system examples, and explains their benefits, trade‑offs, and best‑practice usage.
BuilderFactory PatternObserver Pattern
0 likes · 39 min read

The article presents a complete, event‑driven architecture for a game achievement system that uses the Observer pattern and Redis to achieve high cohesion, low coupling, millisecond‑level performance, and easy extensibility for millions of users and thousands of achievement types.
Observer Patternevent-drivengame achievement
0 likes · 37 min read

This article explains how AIoT‑era embedded devices evolve from simple C/assembly code to reusable, portable frameworks by applying design patterns such as the Observer pattern and a custom responsibility‑chain model for low‑power management, complete with code examples, memory‑pool handling, and test cases.
AIoTEmbeddedObserver Pattern
0 likes · 16 min read

This article explores how to apply core design patterns—Observer, Factory, Proxy, and Template Method—in Java middleware development, illustrating each pattern with practical code snippets and explaining the design rationale for building maintainable, extensible, and flexible services.
Factory PatternObserver PatternTemplate Method
0 likes · 8 min read

This article explains the Observer design pattern, its role in reducing coupling, and demonstrates how to implement it in Laravel using Eloquent model events, including creating observers, registering them, and practical use cases such as activity logging, email notifications, and slug generation.
EloquentLaravelObserver Pattern
0 likes · 12 min read

This guide explains JavaScript design patterns—creational, structural, and behavioral—detailing common examples such as Singleton, Factory, Module, Decorator, Observer, Strategy, and more, and shows how applying these proven solutions can make code clearer, more flexible, maintainable, and scalable.
Creational PatternsFactory PatternJavaScript
0 likes · 28 min read

This article explains Spring’s event mechanism, covering its observer‑based design, benefits such as decoupling and asynchronous handling, standard framework events, and advanced generic event techniques using subclassing or ResolvableTypeProvider to achieve type‑safe, flexible event publishing.
Generic TypesJavaObserver Pattern
0 likes · 7 min read

This article explains the Observer design pattern, demonstrates how to implement it in Go using channels and goroutines for an order processing system, provides full code examples for subjects, observers, and a main routine, and compares it with a tightly‑coupled alternative.
ConcurrencyObserver Patternbackend development
0 likes · 8 min read

This article explains how a single Form instance centrally manages form data, uses subscription and notification mechanisms to update components, and demonstrates the Observer and Singleton design patterns with concrete React code examples for building efficient, maintainable frontend forms.
FormObserver PatternReact
0 likes · 9 min read

This article explains the Observer and Publish‑Subscribe design patterns, compares their concepts and implementations, and provides ten practical Python code examples ranging from simple event notification to distributed messaging with libraries such as pubsub, redis, asyncio, Flask, threading, ZeroMQ, and PySide2.
Observer PatternPublish‑Subscribeevent handling
0 likes · 11 min read

This article explains the Observer behavioral design pattern, describes its participants, illustrates a real‑world e‑commerce scenario, and provides complete Java code for the observer interface, subject interface, concrete subject, concrete observers, and a test client, concluding with the pattern’s benefits.
Behavioral PatternJavaObserver Pattern
0 likes · 7 min read

This article explains the Observer design pattern, its intent, real‑world analogies, advantages and drawbacks, and provides a complete JavaScript example with prototype‑based code to illustrate how publishers and subscribers interact in an event‑driven system.
Observer PatternPublish‑Subscribedesign patterns
0 likes · 12 min read

This article explains the concepts, differences, and implementation approaches of the Observer and Publish‑Subscribe design patterns, and provides ten practical Python code examples covering GUI, networking, asynchronous, and distributed scenarios.
Asynchronous ProgrammingObserver PatternPublish‑Subscribe
0 likes · 11 min read

This article explains the Observer pattern, its core roles and typical use cases, then dives into Spring's event mechanism—including ApplicationEvent, ApplicationListener, and ApplicationEventPublisher—showing how to configure synchronous and asynchronous event processing with code examples.
ApplicationContextAsynchronous ProcessingEvent Publishing
0 likes · 13 min read

The article explains how to implement a red‑dot badge system in the “玩心部落” mobile app using a tree‑structured RedPoint hierarchy combined with the Observer pattern, where each node tracks its count, notifies UI observers, propagates updates to parent nodes, and is managed centrally by a HeadRedPoint singleton for easy extension.
JavaObserver PatternRed Dot
0 likes · 12 min read

This article explains the Observer (publish‑subscribe) pattern, illustrates it with a humorous dialogue, provides complete Go interface and struct implementations for subjects and observers, shows sample client code and output, and discusses practical refactoring using the pattern for configuration changes.
Design PatternGoObserver Pattern
0 likes · 8 min read

This article explains the Observer design pattern, outlines its advantages and drawbacks, and demonstrates practical implementations through three real‑world scenarios—weather forecasting, payment processing, and data subscription—providing complete Java and PHP code samples that illustrate subjects, observers, and notification mechanisms.
JavaObserver PatternPHP
0 likes · 12 min read

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 PatternObserver Pattern
0 likes · 24 min read

Through a playful narrative featuring SpongeBob and a rival boss, this article explains the high‑frequency front‑end interview topic of the Observer pattern, illustrates its core concepts, shows one‑to‑many relationships, and provides a complete JavaScript implementation with clear code examples.
Front-endJavaScriptObserver Pattern
0 likes · 5 min read

This article introduces six classic design patterns—Strategy, Chain of Responsibility, Template Method, Observer, Factory, and Singleton—explaining their real‑world business scenarios, core principles, and providing clean Java implementations to help developers write more maintainable and extensible code.
Chain of ResponsibilityFactory PatternJava
0 likes · 25 min read

This article explains the Observer design pattern by comparing it to a talk‑show scenario, then details its Java implementation—including Observable and Observer classes, notification mechanisms, code examples, common pitfalls, asynchronous extensions, and practical e‑commerce applications—in a clear, step‑by‑step manner.
JavaObserver Patterndesign patterns
0 likes · 10 min read

This article explains the observer and listener design patterns, shows how to implement both in Java with concrete code examples, compares their differences, and demonstrates how Spring's event mechanism is a practical application of these patterns.
JavaListener PatternObserver Pattern
0 likes · 11 min read

RxJava brings reactive, event‑driven programming to Java by using Observables and Observers, offering operators, schedulers for thread control, and asynchronous, non‑blocking execution that avoids callback hell, improves performance, and fits UI events, I/O, RPC, and complex service orchestration, as demonstrated by Alibaba’s Xianyu.
JavaObserver PatternReactive Programming
0 likes · 20 min read

This article explains the Observer pattern, compares it with the Publish‑Subscribe model, showcases Java's built‑in Observable and Observer classes, provides complete code examples, and discusses practical considerations such as memory leaks and performance optimizations.
JDKJavaObserver Pattern
0 likes · 10 min read

This article explains how iOS keyboards achieve undo and redo functionality by combining the Command and Observer design patterns, illustrates their class structures, and shows how the NSUndoManager leverages these patterns to manage undo and redo stacks in Cocoa Touch applications.
Observer PatternUndo/Redocommand pattern
0 likes · 5 min read

This article explains how to apply the Observer design pattern in a simple Java game to handle button clicks and hero movement, showing UML diagrams, code examples for subjects, observers, and a client that registers and triggers events.
JavaObserver Patterndesign patterns
0 likes · 6 min read

This article explains how Vue.js implements its reactivity system using the observer pattern, detailing the roles of Dep and Watcher classes, the observe function, Object.defineProperty handling for objects and arrays, and providing annotated code examples to illustrate the complete dependency‑collection workflow.
Dependency CollectionObserver PatternReactivity
0 likes · 16 min read

This article explains what Key-Value Observing (KVO) is, how to use it in iOS development, and the runtime mechanisms—such as isa‑swizzling and dynamic subclass creation—that enable automatic property change notifications, while also showing how to build a custom KVO system.
KVOObjective-C++Observer Pattern
0 likes · 7 min read

iQIYI Knowledge’s universal audio‑video playback architecture decouples player, business logic, SDKs and page lifecycles via observer patterns and adapters, enabling seamless scene switching across multiple windows—including floating and short‑video panes—without interrupting playback, simplifying third‑party integration and reducing development overhead.
DecouplingObserver Patternaudio-video
0 likes · 10 min read

This tutorial walks through the design and implementation of a distributed configuration center using Spring Boot, demonstrating how to define configuration entities, apply the observer pattern for dynamic updates, and integrate a thread‑pooled scheduler to keep configuration in sync without restarting services.
Configuration CenterJavaObserver Pattern
0 likes · 19 min read

This article explains Vue's reactivity system by recreating a simple reactivity engine using JavaScript, covering dependency collection, watcher functions, observer classes, and Object.defineProperty to track and update values automatically when data changes.
Observer PatternReactivityVue
0 likes · 8 min read

This article introduces a lightweight event notification framework for Android, explaining its design, core interfaces, event manager implementation, usage examples with login/logout scenarios, lifecycle considerations, duplicate event checks, and compares it to traditional observer patterns.
AndroidEvent BusKotlin
0 likes · 10 min read

This article explains the concept, purpose, and elements of data binding in JavaScript, describes view‑to‑model and model‑to‑view binding techniques such as publish‑subscribe, data hijacking and dirty checking, and provides a complete implementation using an Observer, a Compile engine, and a ViewModel to achieve automatic UI updates when the underlying data changes.
JavaScriptMVVMObserver Pattern
0 likes · 10 min read

This article explains why Vue.js is chosen over other MVVM frameworks, details its data observer mechanism with source code examples, and demonstrates component-based architecture in a real-world project, highlighting Vue's reactivity, watcher system, and future prospects.
Component ArchitectureObserver PatternReactivity
0 likes · 14 min read

This article explains the Observer pattern’s one‑to‑many dependency concept, outlines its key components, provides a step‑by‑step Java implementation—including a custom news provider and user observer—demonstrates usage with JDK’s built‑in classes, and connects the pattern to Android callbacks.
AndroidCallbackObserver Pattern
0 likes · 9 min read

The article explains how introducing the Observer pattern into an order‑completion module improves code readability, separates responsibilities, and enhances extensibility by turning post‑order actions into independent observers that react to a single subject’s state change.
JavaObserver PatternOrder Processing
0 likes · 4 min read

This article explains how Tomcat leverages the Observer (publish/subscribe) pattern to manage component lifecycles, detailing the involved classes such as Lifecycle, LifecycleListener, LifecycleEvent, and their default implementations, and illustrates the process with diagrams and code snippets.
JavaLifecycleObserver Pattern
0 likes · 10 min read

This article explains the various relationships between React components—parent‑child, sibling, and deeper hierarchies—and demonstrates how to handle communication using props, callback functions, the spread operator, an observer pattern, and state‑management libraries like Flux and Redux.
FluxObserver PatternProps
0 likes · 13 min read

This article explains the concept of an EventBus as an observer‑pattern based communication mechanism for Android components, illustrates it with a newspaper subscription analogy, and provides step‑by‑step Java implementation details—including registration, unregistration, and posting of events using reflection—plus integration tips within an Activity lifecycle.
AndroidEventBusObserver Pattern
0 likes · 6 min read

EventBus 3 provides a lightweight publish/subscribe framework for Android that simplifies inter‑module communication by allowing any object to be posted and received via @Subscribe methods, with optional index acceleration for faster registration, customizable thread modes, and guidance on setup, ProGuard rules, pitfalls, and alternatives.
AndroidAnnotation ProcessingEventBus
0 likes · 22 min read


21CTODec 1, 2015 · Big Data
This article explains the design of a distributed, real‑time price‑update service that handles massive product data, combines query‑driven crawling, observer‑pattern notifications, and multiple data sources to keep e‑commerce price and inventory information fresh within minutes.
Observer Patternbig datadistributed architecture
0 likes · 14 min read

This article explains how to build a Java event‑notification system using the observer pattern, highlights typical mistakes such as concurrent modification and deadlocks, and presents several thread‑safe implementations ranging from synchronized blocks to CopyOnWriteArraySet and atomic primitives.
ConcurrencyEvent NotificationObserver Pattern
0 likes · 10 min read
