Tag

Observer Pattern

1 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Jun 27, 2024 · Backend Development

Observer Design Pattern in Laravel: Concepts and Implementation

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
Observer Design Pattern in Laravel: Concepts and Implementation
Sohu Tech Products
Sohu Tech Products
Mar 6, 2024 · Fundamentals

JavaScript Design Patterns: A Comprehensive Guide

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.

Behavioral PatternsCreational PatternsFactory Pattern
0 likes · 28 min read
JavaScript Design Patterns: A Comprehensive Guide
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jan 20, 2024 · Backend Development

Mastering Spring’s Event System: Decoupling, Asynchronous Handling, and Generic Events

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.

Backend DevelopmentEvent HandlingGeneric Types
0 likes · 7 min read
Mastering Spring’s Event System: Decoupling, Asynchronous Handling, and Generic Events
Test Development Learning Exchange
Test Development Learning Exchange
Sep 28, 2023 · Fundamentals

Observer Pattern and Publish‑Subscribe Pattern in Python with Practical Examples

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.

Event HandlingObserver PatternPublish-Subscribe
0 likes · 11 min read
Observer Pattern and Publish‑Subscribe Pattern in Python with Practical Examples
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 20, 2023 · Fundamentals

Observer Design Pattern in Java: Concepts, UML, and Full Code Example

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.

JavaObserver Patternbehavioral pattern
0 likes · 7 min read
Observer Design Pattern in Java: Concepts, UML, and Full Code Example
Test Development Learning Exchange
Test Development Learning Exchange
Aug 2, 2023 · Fundamentals

Observer Pattern and Publish‑Subscribe Pattern in Python with Practical Code Examples

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 ProgrammingDistributed SystemsEvent Handling
0 likes · 11 min read
Observer Pattern and Publish‑Subscribe Pattern in Python with Practical Code Examples
37 Interactive Technology Team
37 Interactive Technology Team
Nov 21, 2022 · Mobile Development

Red Dot Counter Implementation in a Mobile App

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
Red Dot Counter Implementation in a Mobile App
Sohu Tech Products
Sohu Tech Products
Oct 19, 2022 · Fundamentals

Understanding the Observer Pattern with Go Code Examples

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
Understanding the Observer Pattern with Go Code Examples
Wukong Talks Architecture
Wukong Talks Architecture
Sep 29, 2021 · Fundamentals

Understanding the Observer Pattern through a Talk‑Show Analogy and Java Implementation

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
Understanding the Observer Pattern through a Talk‑Show Analogy and Java Implementation
Xianyu Technology
Xianyu Technology
May 27, 2021 · Backend Development

Understanding RxJava: Basics, Usage, and Thread Scheduling

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
Understanding RxJava: Basics, Usage, and Thread Scheduling
macrozheng
macrozheng
Apr 13, 2021 · Fundamentals

Master the Observer Pattern in Java: Theory, Code, and Real‑World Example

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
Master the Observer Pattern in Java: Theory, Code, and Real‑World Example
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 10, 2020 · Fundamentals

Observer Pattern Implementation for Game Events in Java

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.

Event HandlingGame developmentJava
0 likes · 6 min read
Observer Pattern Implementation for Game Events in Java
Xueersi Online School Tech Team
Xueersi Online School Tech Team
Jul 3, 2020 · Frontend Development

Understanding Vue.js Dependency Collection and the Observer Pattern

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
Understanding Vue.js Dependency Collection and the Observer Pattern
JD Retail Technology
JD Retail Technology
Jun 23, 2020 · Mobile Development

Understanding and Implementing Key-Value Observing (KVO) in iOS

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-CObserver Pattern
0 likes · 7 min read
Understanding and Implementing Key-Value Observing (KVO) in iOS
iQIYI Technical Product Team
iQIYI Technical Product Team
Apr 10, 2020 · Mobile Development

iQIYI Knowledge Unified Audio‑Video Playback Architecture

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.

Audio-VideoDecouplingObserver Pattern
0 likes · 10 min read
iQIYI Knowledge Unified Audio‑Video Playback Architecture
360 Tech Engineering
360 Tech Engineering
Aug 20, 2018 · Frontend Development

Understanding Vue's Reactivity System: Building a Simple Reactivity Engine

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.

Dependency TrackingFrontend DevelopmentJavaScript
0 likes · 8 min read
Understanding Vue's Reactivity System: Building a Simple Reactivity Engine
Hujiang Technology
Hujiang Technology
Jan 16, 2018 · Frontend Development

Implementing Data Binding in JavaScript: Observer, Compiler, and ViewModel

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.

Data BindingJavaScriptMVVM
0 likes · 10 min read
Implementing Data Binding in JavaScript: Observer, Compiler, and ViewModel
Qunar Tech Salon
Qunar Tech Salon
Jan 5, 2018 · Frontend Development

Understanding Vue.js Data Observation, Reactivity, and Component Architecture

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.

Frontend DevelopmentObserver PatternReactivity
0 likes · 14 min read
Understanding Vue.js Data Observation, Reactivity, and Component Architecture
Architecture Digest
Architecture Digest
Jul 31, 2017 · Fundamentals

Applying the Observer Pattern to Refactor Order Completion Logic

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.

Observer Patterndesign patternsorder processing
0 likes · 4 min read
Applying the Observer Pattern to Refactor Order Completion Logic
Qunar Tech Salon
Qunar Tech Salon
Aug 30, 2016 · Mobile Development

Implementing an EventBus in Android Using Reflection

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
Implementing an EventBus in Android Using Reflection