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

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.

主站蜘蛛池模板: 潞城市| 习水县| 朔州市| 澜沧| 靖宇县| 扬州市| 英德市| 博白县| 淮南市| 华安县| 葵青区| 志丹县| 万州区| 同江市| 津市市| 贵南县| 奉贤区| 上栗县| 兴宁市| 汝州市| 乐安县| 邢台市| 通道| 东乡县| 江门市| 蒙城县| 石棉县| 称多县| 南通市| 扎赉特旗| 策勒县| 辽源市| 洪雅县| 象州县| 琼海市| 灵川县| 金平| 嵩明县| 泗水县| 奉贤区| 新安县|