官术网_书友最值得收藏!

Reactivity diagram elements

Reactivity diagrams can be constructed from the following elements:

  • Circles: Observables are represented as circles. An input observable is represented as a black circle. An output observable is represented as an encircled black circle. Two other notations allow us to indicate when actions are done: when an observable terminates on completion or on error. This notation is similar to the marble diagrams; an observable error event is represented as a circle with a cross in it, and an observable completion event is represented as a circle with a bar in it. This is shown in the following figure:

Figure 1.13: Observable notations. From left to right: input, output, error, completion
  • Rectangles: Operators are represented as rounded rectangles. The text inside the rectangle describes the actions being performed. The first line contains the name of the operator and its parameters. The following lines contain the description of the action. This notation can also be used for components being used in the current component. This notation can also be used as a merge point for operators that combine several observables. This is shown in the following figure:

Figure 1.14: Operators notation
  • Flow: Items flows are represented as arrows. The type of items emitted on the observable is written near the arrow. Item flows show how operators and other elements are linked together. This is shown in the following figure:

Figure 1.15: Items flows notation
  • Diamond: Decisions are represented as a diamond. The decision notation is used only for operators that take an observable as input and split it into two or more observables, the split being based on a segmentation logic described in the diamond. The text inside the diamonds describes the segmentation logic in the same way as the operator's notation. This is seen in following figure:

Figure 1.16: Decisions notation
  • Horizontal or vertical black bar: Share and merge are represented as a horizontal or vertical black bar. An observable is shared when there is one incoming observable and several outgoing observables on the bar. Observables are merged when there are several incoming observables and one outgoing observable on the bar. This is demonstrated in the following figure:

Figure 1.17: Share and merge notation: share (center), merge (right)
  • Rectangle with the upper-right corner bent: Out of monad actions are represented as a rectangle with the upper-right corner bent. Out of monad actions are the actions that are not done via an operator or a component operating on observables. The typical usecase is the code of the subscription associated to an observer. The text in the rectangle describes briefly the actions being done. This can be seen in the following figure:

Figure 1.18: Out of monad notation
主站蜘蛛池模板: 丁青县| 伊春市| 来宾市| 孟连| 龙门县| 嘉定区| 海原县| 五常市| 伊宁市| 玉龙| 保靖县| 和田县| 双城市| 长岛县| 油尖旺区| 凤山县| 突泉县| 肇东市| 凤庆县| 泊头市| 清丰县| 博爱县| 宜兰县| 弋阳县| 樟树市| 镇巴县| 克拉玛依市| 林周县| 西丰县| 天气| 南部县| 汕头市| 正定县| 喀喇| 安乡县| 漳州市| 二连浩特市| 山西省| 吉木萨尔县| 金华市| 禄劝|