5 ms·
We managed to raise a generation who think it's acceptable for JavaScript to be required in order to render a single page. For some "web developers", this is l
by wackget 2y ago
We managed to raise a generation who think it's acceptable for JavaScript to be required in order to render a single page.
For some "web developers", this is literally how they create a page:
import React from 'react';
function App() {
return (
<div>
<h1>Hello world!</h1>
<p>This is my HTML page.</p>
</div>
);
}
export default App;
- Spivak 2y agoI can't really knock it when no one is ever going to ask them to do anything else. HTML might as well be assembly. It's starting to feel pretty vestigial at this point, it's all just different colored divs and aria labels. Elements on the screen as a human would perceive them stopped mapping to single elements ages ago. For some "systems developers" this is literally how they create a program: #include <stdio.h> int main(int argc, char *argv[]) { println("Hello world."); } GTK/Unity/WinForms, everyone has their working level of abstraction.
- rnewme 2y agoThis is good argument, but also it's apples to oranges. You list GTK/Unity/informs where, I suppose, you refer to their GUI editors that output xml etc, and code just ties everything up, but you can drive all three with code only, and again end up placing every component by hand. Replace your prntln with " ImGui::Text("hello, world");" and you have GUI window on the screen.
- wruza 2y agoI don’t see anything bad here, tbh (ignoring my acute allergy to react—alikes). The problem is not how they write. DX is a good thing. Interactivity too. The problem is what happens at runtime: fetch html, fetch script, fetch data multiple times. It should be fetch html which contains a script which contains all the necessary data and creates elements and sets handlers.
- Cthulhu_ 2y agoIt's ironic because I'm sure this lament has been voiced in one way or another with every generation of developers. Anyway, your comment feels like a straw man; I don't know anyone who actually believes what you're claiming, nor is this sentiment anywhere on HN. The closest things are discussions about whether your website should work with JS disabled whenever a too-clever website is linked.
- indrora 2y agoHaving worked in enterprise web development... Nah they're right. There's developers, in major corporations right now, who literally have no idea that you can just put HTML in a container and who are so drunk on node.js that they LITERALLY DO NOT UNDERSTAND what something like nginx, traefik, or Caddy is for. These people are building healthcare systems.
- hnbad 2y agoAs someone who experienced the rise of JavaScript, CSS and modern frontend frameworks, your comment gives me a chuckle because I'm pretty sure using JavaScript for hover effects pre-dates the ability to do that reliably using CSS.
- oneeyedpigeon 2y agoIsn't this just pointing out that progress = functional -> declarative?
- rererereferred 2y agoMore like progress is figuring out the common patterns and offering shortcuts for them. The querySelector api for example was born from jquery's popularity.
- oneeyedpigeon 2y agoAnd it makes sense for those shortcuts, in general, to migrate 'up' the stack, JS -> CSS, JS+CSS -> HTML.
- wruza 2y agoReally? I always thought jQuery was just a shorthand for it cause it’s too long to type. And they really walked the DOM to look for an element? What an ugly runtime it was, ugh. https://stackoverflow.com/questions/39979816/how-was-jquery-selector-defined-before-queryselector-wasnt-available https://stackoverflow.com/questions/39979816/how-was-jquery-...
- hnbad 2y agoBefore `querySelectorAll` there was Sizzle, which was the selector engine that was eventually spun out of jQuery itself: https://github.com/jquery/sizzle https://github.com/jquery/sizzle If you think that's wild, before there were dev tools in every browser, there was only Firebug (yes, there was only `alert` before that, we didn't even have `console.log`): https://getfirebug.com/ https://getfirebug.com/
- caporaltito 2y ago"The future is now, old man!"