Material Design Consumer Consumer Consumer Consumer Design System [options]=“itemsA” > [options]=“itemsB” > [options]=“itemsC” > 1 2 3 Disclaimer: this is not the actual google component structure. This is just an example
Why 3LC, why not 4LC? Component library - Consumers Design System - Provider Abstractions Abstractions Abstractions Design System - Consumer Component Libraries Atomic Components - Across teams Base Style-guide Base Standards & Conventions Team Specific Basic Components Team Specific Style-guide Team Specific Standards & Conventions
Material Design Consumer Consumer Consumer Consumer Provider Abstractions Principle of least power Abstractions Abstractions is cool but it must be balanced with the principles of least power to avoid wrong abstractions
The Sunk Cost Fallacy Developer hate to see duplications Refactor to a new reusable component Simple Web Page Loop until code becomes incomprehensible ABC XYZ DEF QWS …. …. …. This creates a new abstraction. New design requirement, new variant added Universal abstraction now behaves differently for different cases.
The Sunk Cost Fallacy Developer hate to see duplications Refactor to a new reusable component Simple Web Page Loop until code becomes incomprehensible ABC XYZ DEF QWS …. …. …. This creates a new abstraction. New design requirement, new variant added Universal abstraction now behaves differently for different cases. Sunk cost fallacy is whereby a person is reluctant to abandon a strategy or course of action even though the abandonment would be more beneficial - as you don’t want to lose out on the effort you have already sunk (can’t be recovered) Simple Web Page ABC XYZ DEF QWS …. …. ….
3LC’s Compounding Configuring Implementing mindset of “develop once used forever” Abstracting away UI Behaviour & UI logics Provide very minimal user interface.
Compounding Compound components is a pattern in which components are used together such that they share an implicit state that let’s them communicate with each other in the background. Parent Component Child Component 1 Child Component 2 Implicit state
Compounding Think of compound components like the and elements in HTML. Apart they don’t do too much, but together they allow you to create the complete experience. — Kent C. Dodds
Compounding SelectContainer Component Option-item Component 1 Option-item Component 2 Implicit state selected 2 index matched add bold 3 index unmatched remove bold 1 send index send current state send current state
15:01 / 38:46 10:47 / 35:31 Cheng Lau (FB) Cheng Lou - On the Spectrum of Abstraction at react-europe 2016 RailsConf 2014 - All the Little Things by Sandi Metz