- 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.
推薦閱讀
- Linux設備驅動開發詳解:基于最新的Linux4.0內核
- 零起點學Linux系統管理
- 無蘋果不生活 OS X Mountain Lion隨身寶典
- Extending Puppet
- 開源安全運維平臺OSSIM疑難解析:入門篇
- 精解Windows8
- Alfresco 4 Enterprise Content Management Implementation
- 巧學活用Windows 7
- 跟老男孩學Linux運維:Shell編程實戰
- VMware Horizon View Essentials
- CentOS 6 Linux Server Cookbook
- Windows 7使用詳解(修訂版)
- Linux網絡操作系統項目教程(RHEL 7.4/CentOS 7.4)(第3版)(微課版)
- 15分鐘!畫出我的漫畫角色:賣萌篇
- Python機器學習系統構建(原書第3版)