Hacker News new | ask | show | jobs
by oneeyedpigeon 614 days ago
What do you consider "not fine" about websites written in "just" html, CSS, and js?
4 comments

1) Rats nest of non-declarative JavaScript.

2) Rats nest of JavaScript callbacks.

3) Overlapping stylesheets with !important everywhere.

4) Elements used for style not their semantic purpose (<b>, <strong>)

5) Subtle and not-so-subtle browser compatibility issues.

5) is the only valid reason, the rest has comparable alternative shitty things when using whatever framework
No amount of discipline was going to make medium-large websites maintainable back then. Today it's actually possible if the creators know what they're doing. Tooling isn't going to prevent people from doing stupid things.
Also: using JS for things where HTML and CSS would have been sufficient, creating some of the issues above.
this ^ - and if js at all, then only using a subset which passes jslint.com without any errors or warnings. that the score of any site should be

100 100 100 100 1.1s max paint (mobile) 0ms block 0.0xx max shift A+ headers 0 errors and 0 contrast errors webaim goes without saying of course

I agree with HTML+CSS+JS websites being not fine. But to be honest, js callbacks are more of a language thing than a framework thing. You don't need to use frameworks to write promises.
You can't reuse pieces of UI functionality (a bundle of specific html, css and js) unless did copypasta which is obviously awful. Sharing business logic across different areas of an application becomes much harder and you can't non-trivially write and run tests across areas of your application because you are just using html,css and js. And the big monster: state. Sharing state safely across different areas of an application becomes much harder. You end up writing your own micro framework trying to make all the above work. At that point you might as well use as existing battle-tested one
So, instead of "Building websites...", would it be fairer to say "Building some types of web app..."?
Sure you can, Web Components exist now, and SSR components exist for 25 years across all main languages.
Using them was fine. but developing them, no. It's way more work just managing event handlers for a start.
mainly the CSS