- Hands-On Reactive Programming with Python
- Romain Picard
- 142字
- 2021-06-24 18:25:14
Reactivity diagrams of an echo example
We will complete this tour of the reactivity diagrams by writing the echo example. Its diagram is shown in the following figure:
Figure 1.19: The echo app reactivity diagram
This simple diagram should allow any developer to understand what is going on, provided that he knows that it applies to each item emitted on the argv input observable. First, the input observable is created from the argv variable. Then each item is capitalized with the map operator. Finally, each event type (item, completion, or error) is printed. Note that the content of each element is not a copy of the code, but a small description of what it does. The echo example was quite simple, but in a real application you want to document the behavior with reactivity diagrams, not duplicate the code on a diagram.
推薦閱讀
- Kubernetes修煉手冊
- Extending Puppet
- 構建可擴展分布式系統:方法與實踐
- 異質結原理與器件
- macOS效率手冊
- 無蘋果不生活 The New iPad隨身寶典
- Kali Linux 2018:Windows Penetration Testing
- NetDevOps入門與實踐
- RHCSARHCE 紅帽Linux認證學習指南(第7版)EX200 & EX300
- Python UNIX和Linux系統管理指南
- Windows 10從新手到高手
- Linux從入門到精通(視頻教學版)
- Microsoft Hyper-V Cluster Design
- 基于Arduino的嵌入式系統入門與實踐
- Linux網絡操作系統項目教程(RHEL 6.4/CentOS 6.4)(第2版)