DEV Community

Discussion on: In Defense of the Separation of Concerns

Collapse
 
vfabricio profile image
Vilson Fabricio Juliatto

Thank you for the article! In a time when React and the like are accepted so readily, this is a refreshing change of perspective.

I think the big problem is that there is a tension between separation of concerns, as you defined it, and componentization. Using HTML, CSS and JavaScript as they were originally meant to is nice, but so is having reusable components.

That, and the other issues you raised, is the reason I like Svelte so much. First, it lets you write actual HTML and actual CSS at the same time as having components, with all the perks this brings. It is the best of both worlds. And, since it compiles itself away, you are shipping just the JavaScript you actually need. The end result the user receives is basically what you would've written in vanilla JS, except you get there much more easily.

Collapse
 
iamschulz profile image
Daniel Schulz

I don't have any experience with Svelte, but everyone I spoke to about it was amazed. Definitely have to give it a look.
Nonetheless I'd argue that you still have to carefully evaluate what "only the js you actually need" is. That holds true even for vanilla.