Live data from Hacker News

In Defense of the Modern Web

dev.to

171–180 of 224 posts

Re: In Defense of the Modern Web

#171
post #163
post #86

Earlier quoted context omitted.

I recently used Turbolinks + Stimulus for a Django side project. While these projects originated in Rails, it was quite easy to add to Django with some middleware and webpack tweaking. Stimulus provides some good structure and constraints for adding JS "sprinkles" to the site and overall it's worked very well. It feels more like I'm building with the browser and HTML rather than against or around them. That said, I d…

I have also thought about adding Turbolinks and Stimulus to a Django project. Can tell more about the changes to the middleware and webpack?

https://gitlab.com/danjac/localhub/-/blob/master/social_bfg/...

IIRC there were some old packages but these were unmaintained and didn't work with later versions of Turbolinks, so I ended up looking at Rails source and other examples. Basically making sure to handle redirects and headers correctly. You can see the webpack config in the same project, pretty much just standard setup with some tweaks for loading Stimulus controllers.

Re: In Defense of the Modern Web

#172

Earlier quoted context omitted.

There was/is so much that was genuinely awesome about jQuery. I still remember fiddling around with my blog as a teenager and being blown away by the DataTables plugin.

And large jquery apps often had so much spaghetti code that it took years to unravel.

Interestingly enough, neither myself nor MacWright advocated returning to writing large jQuery apps so I truly fail to see how this comment is relevant.

Re: In Defense of the Modern Web

#173

Earlier quoted context omitted.

Do you know of good SPAs? Sites that feel snappy even though they're SPAs. Most sites I visit that are SPAs are consistently slow so I've learned to make the same association: SPA = bad.

We've been experiencing sluggish pages since long before JS really became a thing too. PHP and a slow inline query to render results has been a possible problem for literally decades. Do you investigate all the fast snappy sites you visit to confirm they aren't single page apps? What about the slow pages that aren't SPAs (most every news site)? It seems like anyone who wants to dislike JS and/or SPAs can easily confi…

That's why I asked for examples. I want to know what are the good examples. Someone mentioned the main react site. Seems like a good place to start.

Re: In Defense of the Modern Web

#174

Earlier quoted context omitted.

Do you know of good SPAs? Sites that feel snappy even though they're SPAs. Most sites I visit that are SPAs are consistently slow so I've learned to make the same association: SPA = bad.

How about the React website? https://reactjs.org/docs/getting-started.html

Thanks. I'll take a look.

Re: In Defense of the Modern Web

#175

Earlier quoted context omitted.

> Maybe that's just confirmation bias and I just don't notice it as much on sites that do it well This seems to me to be the key phrase. I sympathize with all the "JS has gone too far" people in this thread. I also hate bloated JS apps. But, "almost all SPAs are bloated trash" is a distinct claim from "SPAs are intrinsically trash". In my experience it is possible to have lean, high-performance, accessible SPAs witho…

Do you know of good SPAs? Sites that feel snappy even though they're SPAs. Most sites I visit that are SPAs are consistently slow so I've learned to make the same association: SPA = bad.

I understand what you mean. In fact, I think we should more frequently do the opposite: we should publicly shame slow websites (cough new Reddit).

Anyway, for fast SPAs, here is a useful comparison: the "RealWorld app" demo.

I would urge everyone to look at the Lighthouse audits for these three implementations:

React/Redux: https://react-redux.realworld.io/

Angular: https://angular.realworld.io/

Vue: https://vue-vuex-realworld.netlify.app/#/

Svelte/Sapper: https://realworld.svelte.dev/

Solid.js: https://ryansolid.github.io/solid-realworld/

This is just a demo, of course, but it is close enough to be representative. From just this simple demo we can already see significant differences: Svelte and Solid.js are much snappier. The author of the article, Rich, created Svelte.

Of course, this is just talking about performance, not yet getting accessibility, navigation, transitions, etc right.

Re: In Defense of the Modern Web

#176
post #112

I was disappointed to find that this post falls into the same pit a number of these defences of the modern web fall into - creating a false dichotomy between "literally no JavaScript whatsoever" and "a framework-authored site with client-side routing". None of the features mentioned in that particular paragraph - user interaction analytics, preloading data and content [on link hover], transitions, avoiding full page…

> avoiding full page loads Sure, you can do this with AJAX, but so far there are no SSR + component-level hydration + AJAX frameworks that solve this out of the box. Facebook is working on something similar though as Dan Abramov has hinted at on Twitter.

Why, exactly, does a static site need component-level hydration?

Re: In Defense of the Modern Web

#177

This author seems to think the only competitor to react is other js frameworks, when in fact most of the web's largest sites work just fine with small amounts of what he calls 'artisanal js'. You probably don't need your js framework, your 10k npm dependencies, or your complex mix of server and client side rendering. Not every website needs an api and clients to consume it, and not everything needs to be an app. The…

> your 10k npm dependencies Believe me, you're preaching to the choir. Nor am I advocating for every website to have an API. But unfortunately we part ways here: > The web is a success The web is not a success. It's dying. Consumers vastly prefer native apps — one recent study ( https://www.mobiloud.com/blog/mobile-apps-vs-the-mobile-web/ ) tells us that 90% of mobile time is spent in apps vs 10% in browsers.

For who?

If the sites in the genres I care about remain, I am unaffected (except for, perhaps, economically in a bigger picture).

For example, I don't care if ESPN's app is favored over it's website. I don't care if various lifestyle magazines have apps. Lots of examples here, pick your own.

I spend my time on the web or in a select few apps like Discord, Hangouts, Signal, etc. Even then, I don't really care if the sites are optimized for mobile. I usually prefer when they aren't because most people do it poorly. Just make a nice website with appropriate viewports and non-fixed whitespace on the sides and it'll probably work out unless you're doing some fancy interactive stuff. In which case, I probably want it to be on a desktop anyway.

Re: In Defense of the Modern Web

#178
post #46

Earlier quoted context omitted.

> The web is not a success. It's dying. Consumers vastly prefer native apps — one recent study ( https://www.mobiloud.com/blog/mobile-apps-vs-the-mobile-web/ ) tells us that 90% of mobile time is spent in apps vs 10% in browsers. Does that really mean anything other than you can do more things with mobile devices than just browse the web? I might use WhatsApp on my phone, draw with Procreate on my iPad or play games.…

Why do any of those things need to be native apps, rather than instantly-accessible, no-install-required URLs that come with all the protections of the web's security model?

They don't have to be. But also it isn't clear the web is the right tool for that job just because there are some pros.

I'd rather see better cross-platform native tools than more web tools. The web is bloated, overloaded, and has a lot of historical baggage. That isn't to say it can't still be used well, but I still like seeing alternatives with innovation.

Re: In Defense of the Modern Web

#179

Earlier quoted context omitted.

Why do you assume that it's just web designers? Have you ever shown a web app vs. a native app to someone who doesn't write code? Or just someone who has design sensibility? The lightbulb example is also not a good one. A lightbulb transitions between two states. An interactive application transitions between hundreds of states. Full page refreshes make each transition clunky and noticeable. Only programmers look at…

I don't really have a problem with web apps doing incremental loading when it makes sense (Facebook, for example, or letting the user add a comment in situ), but many many sites would be better off just loading documents instead of moving to an application framework. Take for instance TechCrunch.com vs Wired.com, Wired is much easier to use because it acts like a website. Yes, it does full page refreshes instead of s…

What about Google Sheets? It would be pretty strange to input a number into a cell and have the page refresh to perform a calculation no? Frankly I'm not sure how any application falls into the document paradigm. It was created for linking documents of text, not interactive applications.

Re: In Defense of the Modern Web

#180

Earlier quoted context omitted.

> truly native web apps God forbid. I happen to like adblockers, inspecting app DOM, and applying custom styles and features with browser extensions. I can customize even poorly-built web apps like Youtube and Facebook with enough poking around and custom selectors. It's great. Don't bring native UX sensibilities to the web, or we'll retaliate by pushing Electron even harder for cross-platform native development. And…

> God forbid. I happen to like adblockers, inspecting app DOM, and applying custom styles and features with browser extensions. I can customize even poorly-built web apps like Youtube and Facebook with enough poking around and custom selectors. It's great. This is weirdly lost on HNers every time this "debate" comes up. Native apps are the wet dream of any website they complain about for having too many trackers and…

Nowadays I spend most of my web browsing time on the phone.

That is why I stopped consuming Reddit, Twitter, and Facebook - they aggressively push their shitty battery consuming apps that I don't want to use.

Post reply on HN