An Interest In:
Web News this Week
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
July 24, 2021 01:09 am GMT
Original Link: https://dev.to/takuyakikuchi/separation-of-concerns-templates-component-5h3p
Separation of concerns: Templates, Component
Pete Hunt: React: Rethinking best practices -- JSConf EU - YouTube
What is "Separation of concerns"
- the idea that each module or layer in an application should only be responsible for one thing
- Reduce coupling, Increase cohesion
- coupling: each modules relies on each of the other modules, cascading changes
- cohesion: elements of a module belong together
Templates
- Templates encourage a poor separation of concerns
- "View model" tightly couples templates to display logic
- display logic and markup are inevitably tightly coupled
- display logic and markup are highly cohesive
- Templates separate technologies, not concerns
React Component
- A highly cohesive building block for UIs loosely coupled with other components
- composable
Take aways
Separation of concerns !== Separate technologies
Original Link: https://dev.to/takuyakikuchi/separation-of-concerns-templates-component-5h3p
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To