3 ms·
Splitting code into multiple files and lowering cohesion is quite far from "separation of concerns". It makes changes, navigation and reasoning artificially har
by bvrmn 2y ago
Splitting code into multiple files and lowering cohesion is quite far from "separation of concerns". It makes changes, navigation and reasoning artificially harder. It's like tearing building blueprint into random pieces.
- imiric 2y agoI got the same impression from the example. The nested structure of HTML makes building a mental model of the content very intuitive. This is entirely lost by having to develop in a CSV file, and by building this tree out by manually referencing elements. This, along with the order not being significant in the CSV files, seems like a hindrance rather than a benefit. Kudos to the author for trying something new, but I'd rather work with the raw HTML than this system. Sidenote: I'm not really a fan of htmx or Alpine.js, which might be another reason for disliking this. The real separation of concerns is already achieved by the vanilla HTML/JS/CSS separation, yet most modern web frameworks intentionally blur this. So we end up with libraries on top of frameworks on top of libraries, ad infinitum, just to undo the mess each abstraction introduces.
- robertlagrant 2y ago> The real separation of concerns is already achieved by the vanilla HTML/JS/CSS separation, yet most modern web frameworks intentionally blur this I think they believe that the only separation is styling/not-styling, because behaviour is very tied to structure anyway.
- bvrmn 2y ago> I think they believe that the only separation is styling/not-styling, because behaviour is very tied to structure anyway. I "believe" even harder :) CSS could be used as a completely separate thing. But from practical standpoint it's quite beneficial to tie it to html structure. UI component is a single entity defined by highly cohesive set of structure, behavior and style. The reason to change often touches two of them and sometimes all three. IMHO the only easily safely separable styling is color and almost safe are font and base scaling.