3 ms·
Creating something from scratch is so much easier today than it ever was, and I’ve been creating crap for decades now. All the fancy JavaScript crap is purely o
by ramraj07 3y ago
Creating something from scratch is so much easier today than it ever was, and I’ve been creating crap for decades now. All the fancy JavaScript crap is purely optional. You can still write something in CGI if you want. My last prototype I wrote with Vue and JQuery and as pure html and .js files. It was an absolute blast! And the users loved it! Have you tested streamlit? FastAPI? Everything is so easy now.
- llm_trw 3y agoToday if I were to write a cgi script it would have to send json payloads to the JS front end because round trip latency on phones is between 100 to 500ms to hit a dns server. I was getting lower latency on dialup in 1996. On my desktop it's 2ms on a bad day. You can't just use HTML because browsers have mutated to fat clients for a X like protocol which is a mishmash of html, css, js, and whatever else someone's decided to throw on top of it. We're using screwdrivers as axes and everyone is acting like this is some type of acceptable outcome.
- nicoburns 3y agoYou absolutely can just use HTML. You're writing this on HN that just uses HTML and is one of the more responsive websites on mobile connections. You can't make as rich an interavtive experience as you can with JS, but you never could.
- llm_trw 3y agoJust because a site is responsive doesn't mean it's HTML. The fact that a lot of people assume that you can't have a responsive site with JS is all the indictment of $current_year front end development you need. These are some of the JS functions HN runs in the background, on top of the CSS: function $ (id) { return document.getElementById(id); } function byClass (el, cl) { return el ? el.getElementsByClassName(cl) : [] } function byTag (el, tg) { return el ? el.getElementsByTagName(tg) : [] } function allof (cl) { return byClass(document, cl) } ...
- nicoburns 3y agoI didn't say you can't have a responsive site with JavaScript, I said that you can have one with plain HTML. HN may use JS for a few things (upvotes?), but it's mostly full page reloads including for loading threads and posting comments.
- niutech 3y agoNo need for JSON and JS, you can use pure HTML streaming: https://lamplightdev.com/blog/2024/01/10/streaming-html-out-of-order-without-javascript/ https://lamplightdev.com/blog/2024/01/10/streaming-html-out-... and pure CSS interactions like tabs, accordions, dropdown menus.
- xisthesqrtof9 3y agoI agree. I think the parent poster was referring to how much noise there is, and I'd agree. The moment you start learning, just the fanciest stuff is shoved down your throat. So you just assume its the best and roll with it. I find myself tinkering more with PHP now that I've been using js for the past 7 years.