5 ms·
Does modern web development just completely abandon the idea of "separation of concerns"? Looks like content is freely mixed with markup and logic and results i
by wackget 6y ago
Does modern web development just completely abandon the idea of "separation of concerns"? Looks like content is freely mixed with markup and logic and results in a horrible, difficult-to-read mess of code.
- disqard 6y agoIMHO, yes. This is why some folks (like myself) find it hard to wholeheartedly embrace JS for building entire apps.
- SPascareli13 6y agoThe idea now is not to separate thing by file type (all .js go here, html goes there) but to separate by logical components, thing that work together, go together. I guess it's like working in vertical slices of related logic rather than layers with logic and layers with markup and such. That has its problems tho, that for sure.
- mrozbarry 6y agoWhat code are you referring to? Hyperapp has clear separation of presentation, logic, and side-effects. Of course, developers can choose to keep that a clean and distinct separation, or let a bunch of code inter-mingle.
- Kiro 6y agoThere has never been any separation of concern in web development. Just because you put your scripts, HTML and CSS in different files doesn't mean they are separated.
- wackget 6y agoIsn't that the definition of separated? If you want to edit content or markup, you open the HTML file. If you want to edit business logic, open PHP or JS. And so on.
- ng12 6y agoYeah but then your JavaScript spews out unholy tendrils that mutate the DOM and dynamically add/remove CSS classes and style attributes. Separating HTML/CSS/JS made a lot of sense for web sites but separating by component makes more sense for web applications.
- wes-k 6y agoThey are still tightly coupled.