Tag:Observer

  • Parsing PHP observer mode observer

    Time:2022-8-2

    catalogue Observer mode structure diagram concept Code example Observer mode structure diagram concept An “actor” (observed), a group of “audience” (observers), a “camera” (recording container) [main roles in observer mode] 1. Abstract subject role: the subject role saves all references to observer objects in a set, and each subject can have any number of observers. […]

  • Introduction and description of Java observer mode

    Time:2022-7-26

    Transferred from: http://www.java265.com/JavaCourse/202206/3741.html The following is an introduction to the observer model, as shown below Observer mode Observer mode: It is called publish/subscribe mode Used to define a one to many dependency, When the state of an object changes, the objects that depend on it will be notified Advantages of observer mode: 1. The observer […]

  • Learning experience of ADT

    Time:2022-7-25

          ADT, meaning abstract data type, which can be defined by programmers themselves. In the past, when writing code, I didn’t consider the encapsulation and reusability of the module, and often tried to save trouble and easily expose all the internal information of the class to the client. I didn’t realize that such […]

  • Python design pattern – behavioral: strategy pattern, observer pattern, command pattern, template method

    Time:2022-7-23

    Python design pattern – behavioral: strategy pattern, observer pattern, command pattern, template method Behavioral patterns involve the assignment of responsibilities between algorithms and objects. They not only describe the patterns of objects or classes, but also describe the communication methods between them. They depict complex control flows that are difficult to track at runtime. They […]

  • [react advanced] [Redux source code analysis] 01 (Introduction) realize Redux data response through simple native JS code

    Time:2022-7-10

    To break up the source code, let’s analyze it bit by bit from the observer mode Concretely, the most common example is that we usually subscribe to a official account, right? After you subscribe to a official account, when the official account you subscribe to publishes any notices or tweets, you will receive them. As […]

  • Implementation of small red dot system based on livedata

    Time:2022-6-25

    preface The little red dot prompt can be said to be a function that all apps now have, such as the message interface of wechat and the my interface of Weibo. Generally speaking, a small red dot will not exist alone, but may be associated with other red dots to form a red dot system. […]

  • Observer mode in design mode

    Time:2022-6-12

    Observer pattern is a software design pattern in which an object named subject maintains its dependency list, called observers, and usually automatically notifies them of any state changes by calling one of their (observers) methods. Observer mode is mainly used to implement distributed event processing system in “event driven” software. In these systems, the subject […]

  • Intermediary model of design pattern

    Time:2022-5-30

    The intermediary model, also known as the mediator model, is a behavioral model; The mediator pattern wraps a set of ways in which objects interact so that they do not have to explicitly reference each other. So that they can be loosely coupled. When the interaction between some of these objects changes, it will not […]

  • Zookeeper of big data

    Time:2022-5-29

    data model The zookeeper data model is a tree like data structure, similar to the file system; The difference from the file system is that each node in the tree (leaf node and non leaf node) can save data, and the access of each node must start from the root node, with a slash as […]

  • Web GL enters the three-dimensional world

    Time:2022-5-25

    Three dimensional objects are composed of triangles, so we need to draw each triangle of the object one by one as before, and finally draw the whole three-dimensional object, but there is a significant difference between three-dimensional and two-dimensional. When drawing two-dimensional objects, we only need to consider X and Y information, but when drawing […]

  • Behavior type: I Observer mode

    Time:2022-5-22

    What is the observer mode Observer pattern is a behavior design pattern that allows one object to notify other objects of changes in its state. Observer mode allows you to define a subscription mechanism that can notify multiple observers when an object event occurs. Why use observer mode When the state of one object changes […]

  • MySQL — on the use and understanding of triggers

    Time:2022-5-22

    This article introduces triggers in three steps: 1. What is a trigger 2. Create trigger 3. Use trigger   1. What is a trigger? A special kind of database program that can monitor the operation of certain data (insert / update / delete) and trigger relevant operations (insert / update / delete) to protect the […]