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…


This content originally appeared on DEV Community and was authored by Takuya Kikuchi

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


This content originally appeared on DEV Community and was authored by Takuya Kikuchi


Print Share Comment Cite Upload Translate Updates
APA

Takuya Kikuchi | Sciencx (2021-07-24T01:09:14+00:00) Separation of concerns: Templates, Component. Retrieved from https://www.scien.cx/2021/07/24/separation-of-concerns-templates-component/

MLA
" » Separation of concerns: Templates, Component." Takuya Kikuchi | Sciencx - Saturday July 24, 2021, https://www.scien.cx/2021/07/24/separation-of-concerns-templates-component/
HARVARD
Takuya Kikuchi | Sciencx Saturday July 24, 2021 » Separation of concerns: Templates, Component., viewed ,<https://www.scien.cx/2021/07/24/separation-of-concerns-templates-component/>
VANCOUVER
Takuya Kikuchi | Sciencx - » Separation of concerns: Templates, Component. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/07/24/separation-of-concerns-templates-component/
CHICAGO
" » Separation of concerns: Templates, Component." Takuya Kikuchi | Sciencx - Accessed . https://www.scien.cx/2021/07/24/separation-of-concerns-templates-component/
IEEE
" » Separation of concerns: Templates, Component." Takuya Kikuchi | Sciencx [Online]. Available: https://www.scien.cx/2021/07/24/separation-of-concerns-templates-component/. [Accessed: ]
rf:citation
» Separation of concerns: Templates, Component | Takuya Kikuchi | Sciencx | https://www.scien.cx/2021/07/24/separation-of-concerns-templates-component/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.