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

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.

主站蜘蛛池模板: 临湘市| 始兴县| 南岸区| 孟连| 布拖县| 老河口市| 溆浦县| 苍南县| 东乌| 缙云县| 荥阳市| 嵊泗县| 龙岩市| 洛阳市| 丰城市| 滁州市| 化州市| 鲁山县| 通河县| 尉犁县| 沂源县| 宁津县| 呼和浩特市| 乌海市| 阿合奇县| 三台县| 白河县| 灵山县| 会理县| 蓝田县| 塔河县| 思南县| 大足县| 沧州市| 阿城市| 黎川县| 纳雍县| 略阳县| 库伦旗| 台中县| 东兰县|