News for hackers. Stuff that matters.
Re:Rendering on the Web by deedubaya on Monday August 19, 2019 @02:19PM (#20740255)
> It's perfectly okay to mostly ship HTML with minimal JS

Some might even say it is better to mostly ship HTML with minimal JS.

ducks

Re:Rendering on the Web by jeroenhd on Monday August 19, 2019 @03:54PM (#20741201)
I'd say for most web content, minimal JS gives the best experience. With all the integration and UI improvements browsers have gone through the past ten years, all most content needs is some CSS to add a theme and some minor readability tweaks, except if there's some interactive animation that add value to the content on the web page. You don't even need JS for videos or audio anymore, it's all there in the browser.

It's sad how most websites these days are fully-featured web applications. Take this blog page by Google. A simple web page with some pictures loading over 300kB of Javascript libraries and tooling. And this isn't even an exception. It's sad, really, and a waste of readers' bandwidth.

Re:Rendering on the Web by jazzyjackson on Monday August 19, 2019 @04:43PM (#20741622)
css animations on :hover and :active psuedoclasses can go a long way for an interactive experience without running programs too.
Re:Rendering on the Web by ng12 on Monday August 19, 2019 @04:02PM (#20741276)
The principle of least power still applies in the FE space. If you can get away with rudimentary technology, do it.

The problem I find is usually misaligned incentives. When you go to BuzzFeed you just want to read an article, but BuzzFeed wants to track you and sell you ads. It's not in their best interest to keep it simple.

Re:Rendering on the Web by ttflee on Monday August 19, 2019 @10:19PM (#20743341)
For the sake of climate change, HTML with minimal JS/without JS is preferable.
Re:Rendering on the Web by mathgladiator on Monday August 19, 2019 @03:35PM (#20741014)
For some markets, it is even a competitive advantage. :)
Re:Rendering on the Web by gear54rus on Tuesday August 20, 2019 @12:22AM (#20743810)
Who is going to maintain that loosely linked spaghetti of html with minimal js? You?

If you're not going to, don't tell me how to work with code I gotta work with.

Can we just agree to let this meme die? React and vue didn't appear because developers wanted bloat.

If you want to reduce bloat, take that to corporate greedy actors stuffing pages with tracking and don't ever touch tools that make my life easier.

Re:Rendering on the Web by pjmlp on Tuesday August 20, 2019 @02:05AM (#20744210)
The Web framework that has decades of experience in large scale production deployments and has the ability to pack FE libraries as components.

Spring, JEE, ASP.NET, Rails, Django,...

Re:Rendering on the Web by gear54rus on Tuesday August 20, 2019 @03:33AM (#20744596)
> The Web framework that has decades of experience in large scale production deployments and has the ability to pack FE libraries as components.

Same question. Who's going to write all those 'components' wrapping libraries for each of those when everyone has already moved on to react or vue? Some disgruntled retrograde? Am I supposed to waste time on it so that you can bask in the glory of 'pure html and js'?

Re:Rendering on the Web by pjmlp on Tuesday August 20, 2019 @04:33AM (#20744846)
The fallacy of that argument is that actually not everyone has drunk the react or vue Kool-Aid.

In a few years the React/Vue fad will be gone, while HTML/CSS/VanilaJS will still be around.

We are the ones not wasting time learning fad of the day stacks.

Re:Rendering on the Web by filleduchaos on Tuesday August 20, 2019 @04:52PM (#20751990)
I mean I don't like JS either but the whole "fad of the day" thing is getting pretty old don't you think? It's been six years since React was first released.
Re:Rendering on the Web by pjmlp on Tuesday August 20, 2019 @05:09PM (#20752177)
I do like JS, served as VanillaJS.
Re:Rendering on the Web by gear54rus on Tuesday August 20, 2019 @09:54AM (#20747056)
> In a few years the React/Vue fad will be gone,

Certainly. However, something even better will replace it and you guys will moan about it again. It only hurts yourself if you refuse to learn.

Re:Rendering on the Web by pjmlp on Tuesday August 20, 2019 @10:24AM (#20747315)
It has worked pretty well so far.

Coffeescript, Dart, AngularJS, Dojo, MooTools, Prototype, Bower,...

So much time I saved keeping focused on SSR frameworks, alongside VanillaJS.

Re:Rendering on the Web by dmix on Tuesday August 20, 2019 @09:35PM (#20753910)
Vue/React is moving heavily into SSR which is the future of web development IMO (37signals called it long ago). It's the best of both worlds of old staticy HTML + interactive components.

I used to look down on something like Next.js/Nuxt.js [1] for simple (and advanced) websites until I used it and I'm 100% convinced it's the future of web development. Where most of the content is built with components but pre-rendered server-side and the JS loads to 'hydrate' the interface with interactive elements. I've stopped using heavy frameworks like Phoenix as a result and switching to simpler backends APIs written in Rust/Ruby/etc with Vue SRR handling the full frontend.

Combined with treeshaking, chunked JS via webpack (which automatically only renders tiny .js files on-demand based on what components the page/route needs), purgeCSS which removes all unused CSS, PWA/critical inlined CSS tools, and other easy-to-use optimizations you can have a fully feature-rich JS site with SEO-friendly HTML pages and very fast page loads.

We're just seeing the beginning of Vue/React and it's going to improve the web from the ills of the past, not make it worse. Better performance and more importantly high-quality well composed codebases, plus TypeScript which helps JS applications scale in size while keeping them sane.

[1] https://nextjs.org / http://nuxtjs.org/