DEV Community

Discussion on: Clean Architecture: Applying with React

Collapse
 
jackmellis profile image
Jack

I've not come across cupid before but I love it!
One thing that always irks me about solid is it's so steeped in OOP, you really have to twist and squint to apply it to anything else. (It's ironic that principles around coupling are tightly coupled.)
Cupid is actually much easier to apply to FP because it's more about attitudes and approaches than language-specific constructs.
Thanks for sharing!

Collapse
 
merhmood profile image
merhmood

Don't worry most cases our functions will evolve to classes through refactoring, and that's where SOLID comes in.

Thread Thread
 
jackmellis profile image
Jack

Refactoring function into classes? I don't think has ever happened to me ever...

Thread Thread
 
merhmood profile image
merhmood • Edited

You probably haven't noticed yet, when next you're coding and you come across two or more different functions talking to a variable outside its scope, that a function to class refactoring screaming

Thread Thread
 
jackmellis profile image
Jack

It’s really not? And if you’re applying FP then it’s really really not!

Thread Thread
 
peerreynders profile image
peerreynders
Collapse
 
peerreynders profile image
peerreynders

FYI:

Thread Thread
 
jackmellis profile image
Jack

I haven't finished watching this yet (~10 minutes in) but this is a classic age-old debate that has been beaten to death: performance vs readability.

Personally, I think until you actually hit genuine performance issues, readability is way way more important.

Also, this just backs up my view that 99.999% of all Clean Code and SOLID examples are demonstrated in OOP languages and just completely ignore their potential application to FP paradigms.

Thread Thread
 
diegolameira profile image
Diego Lameira
  1. I would consider listen someone that speeches and write in a mirror board =) this guy is fire.
  2. Why they block comments on that video?
  3. Why complain about performance on using "CLEAN" arguing old times, why not instead make a proposition to compile (or transpile) the readable code in a performant way? common, its 2024... in build time time AI can switch for whatever more performant the code can be, why dont we just stop fight and look for a way out?