Separation of concerns

Goals

  • Understanding SoC 💃
     
  • Why Css-in-js 👩‍🎤

SoC:

A design principle for separating a computer program into distinct sections, such that each section addresses a separate concern.

😐

- Coupling

+ Cohesion

Coupling

Is the degree of interdependence between software modules

Cohesion

The degree which elements belong together

divide et impera

Here we go! 🎉

Display logic and markup are highly cohesive

React components

A highly cohesive building blocks for UIs loosely couple with other components

Do I miss something?

YES! 🧞‍♂️

CSS

AT SCALE

Global namespace

Dependencies

Dead code

Minification

Sharing constants

Non-deterministic resolution

Breaks Isolation

Pre-Solution

Yes, inline styles! 😵

CSS-in-Js

Benefits

Maintainability

Out of the box Css solutions

Performance

Extension

There is a surprise! 🎉

May I present you...

Separation of concerns

By Ismael Bakkali

Separation of concerns

  • 141