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

Why components?

Component-based design is powerful, especially when we use immutable data and unidirectional data flow. It forces me to stop thinking about how different technologies or tools interact. It gets me thinking about the single most important function of each interface element.

When we start building an application, it's tempting to think of every piece as part of the whole. All interface elements blend into the same big picture, until it becomes so big that separating parts of it out seems impossible.

Imagine you had to build a space ship. What a huge task! You'd need some rocket boosters, a couple of wings, life support, and so on. Now consider how you would approach it if one of the constraints was that each moving part of the space ship would need to be inpidually tested.

Testing is the great pide between designing systems as a whole and designing systems as large collections of small pieces. Component-based design is fantastic because it makes sure that every part is testable.

主站蜘蛛池模板: 南充市| 西藏| 泰州市| 忻城县| 奉新县| 方正县| 普定县| 新邵县| 晋城| 汕尾市| 北川| 南靖县| 涪陵区| 罗平县| 阳高县| 林甸县| 无锡市| 太和县| 隆昌县| 泸定县| 云南省| 大埔区| 剑川县| 石嘴山市| 鸡西市| 新建县| 临江市| 芦溪县| 增城市| 那坡县| 凤山市| 哈密市| 葵青区| 华亭县| 惠州市| 鹤岗市| 额敏县| 临湘市| 龙井市| 绍兴县| 喀喇沁旗|