https://github.com/hellyaxs/design_pattern_es
https://github.com/hellyaxs/design_pattern_es
desing-patterns observer-pattern python study
Last synced: about 10 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/hellyaxs/design_pattern_es
- Owner: hellyaxs
- Created: 2024-02-02T19:46:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-09T01:24:33.000Z (over 1 year ago)
- Last Synced: 2025-01-04T02:53:26.738Z (over 1 year ago)
- Topics: desing-patterns, observer-pattern, python, study
- Language: Python
- Homepage:
- Size: 162 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Obersevações
#### estrutura do padrão

```mermaid
classDiagram
class Publisher {
- Subscriber[] subscribers
- mainState
+ subscribe(s: Subscriber)
+ unsubscribe(s: Subscriber)
+ notifySubscribers()
+ mainBusinessLogic()
}
class Subscriber {
+ update(context)
}
class ConcreteSubscriber {
+ update(context)
}
class Client {
+ createPublisher()
+ createSubscriber()
}
Publisher --> Subscriber : notifies
Subscriber <|-- ConcreteSubscriber
Client --> Publisher : subscribes
Client --> ConcreteSubscriber : creates
```