3 ms·
It's worth noting the same holds true for UI: data dominates. Design your widgets, layout, and workflow around the data.
by dexen 6y ago
It's worth noting the same holds true for UI: data dominates. Design your widgets, layout, and workflow around the data.
- chrisweekly 6y agoAmen. My 23 years experience in webdev says React (the paradigm, not the lib per se) is dominating web UI precisely because it is all about unidirectional data flow.
- rubyn00bie 6y ago> It's worth noting the same holds true for UI: data dominates. Design your widgets, layout, and workflow around the data. I couldn't agree more. I think the current state of UI programming is like the pathological case to be honest. Too often folks are concerned with representing their database 1-to-1 in their UI instead of representing their view. If anyone is suffering from brittle UI code, where somehow caching issues and stale data are affecting your application, this is very likely why. You have muddled your persistence and view concerns together and it's not manageable or pretty. What this means for folks using something like React- don't directly use your persistence models in your views, create "view models" which directly represent whatever the hell it is you're trying to display. Bind your data in your view models, and not your views, and then pass the view model in as props.