Live data from Hacker News

Second-Guessing the Modern Web

macwright.org

361–370 of 467 posts

Re: Second-Guessing the Modern Web

#361
post #94

Earlier quoted context omitted.

I've often said that web development has a big culture problem. In any other field, 'modern' is the opposite of a selling point. People want tools that work, that are proven and have years of stability and momentum. But in web development, there is an obsession with the new and shiny. It's 100% about the developer's own experience in creating a program and 0% about the user's experience actually using the half baked…

Is that really true? On the backend, shiny technologies like Go have been exploding — Go modules only stabilized this year ! Since React was released, we’ve gone through through at least two new ways of deploying a server — containers and serverless, replete with their own huge abstraction layers like Kubernetes — and we’ve moved from monoliths to microservices and back again. And in native land, the “Rewrite It in R…

Go and Rust are both older than react. And I 100% agree that backend people overengineer with stuff like kubernetes. I think that's less about the new and shiny and more an obsession with scalability - even though the site could easily be hosted on a single Linux box.

Re: Second-Guessing the Modern Web

#362
post #47

I empathize with the author but client-side technologies like React have a pretty clear advantage that explains why they're popular: for the people that are tasked to make websites (i.e. us, HN readers), they're easier to work with and they save us time. It outweighs all the end-user-facing cons by a lot, because companies need us, and our salaries are expensive. It's true that they are largely more complex than O.G.…

> I sometimes wonder if the people claiming to hate client-side technologies or disable JS in their browsers have actually ever had to build a complex website to put food on their table. My bet is the answer is often no, or they are a contrarian in general.

So, this is the kind of thing I make for my employer. But guess what? I can still do things the way I did them back when I learned Rails over a decade ago: HTML templates and a very small amount of JS to tell the server to re-render them when the user needs it.

What many of us really need is not fully dynamic SPA-type things, we just need some dynamic forms and some page elements that dynamically respond to user input. This is all stuff that you can also do without JS, if you design your site to handle that use case! Rails still makes it easy to make this kind of site with plain JS (or a lightweight framework like Stimulus, or jquery if you really want).

But all that's to say I fully realize why and how JS is useful... and that's actually why I disable most JS by default in uBlock Origin.

The problem isn't the existence of JS, it's the fact that massive tools like React become the hammer, and everything starts to look like a nail. There's no reason for the sites I am usually interested in visiting, which are either content hosting sites (no JS needed at all) or sites like my own (that could be enhanced with JS but still functional without it) to pull in so much code unrelated to the primary function of the site.

Re: Second-Guessing the Modern Web

#363
post #47

I empathize with the author but client-side technologies like React have a pretty clear advantage that explains why they're popular: for the people that are tasked to make websites (i.e. us, HN readers), they're easier to work with and they save us time. It outweighs all the end-user-facing cons by a lot, because companies need us, and our salaries are expensive. It's true that they are largely more complex than O.G.…

For the most part I think the reason so many web devs put up with the “all-react” (and similar) development experience is basically cargo culting. If you admit you don’t like it, chances are there’s at least one front-end hipster around who will mock you as outdated, and that’s enough to silence most. For the hipsters, the problems of SPAs are hard, and engineers like hacking on hard problems. Also the fact that the…

>“wow, I didn’t realize you could actually do anything useful with just plain JavaScript in the browser. I thought it was like... assembly or something.”

Wow. These two sentences completely capture modern day Web Development, Javascript as assembly.

>I think there’s a lot of that in front end world today.

In modern Web development, ( and in possibly all area of software development ), instead of making things simpler ( not easier ), it seems we have been building premature abstraction after abstraction.

Re: Second-Guessing the Modern Web

#364
post #298
post #213

Earlier quoted context omitted.

I have been developing all sorts of native and Web applications for a couple of decades now, and SPAs is something I avoid as much as possible. And yes, I also implemented interactive desktop like applications as Web applications. Server side rendering frameworks, with support for components and just enough JavaScript go a very long way, and best of all, they are faster than SPAs in every kind of device that customer…

Server-side rendering + Turbolinks [1] + jQuery-or-equivalent gives you an SPA experience anyway, without the client-side bloat. With judicious use of markup, it can be massively more responsive. [1] - https://github.com/turbolinks/turbolinks

There is also Stimulus Reflex [1] which is like a Turbo Charged Turbolinks. The idea is from Elixir / Phoenix 's LiveView.

I think Laravel has something similar as well. These are the three big groups that are actively frighting the SPA trend.

[1] https://github.com/hopsoft/stimulus_reflex

Re: Second-Guessing the Modern Web

#365

> There’s no category winner like React as an alternative I'm really rooting for frameworks like Phoenix LiveView, Rails Turbolinks, Laravel Livewire to fill this void. SPA like interactivity by just rendering HTML templates and sending them to the client via Ajax or websockets sounds great to me. I wouldn't miss JavaScript one bit.

I think for Rails the more accurate counter part would be [1] Stimulus Reflex where it is actually modelled after Liveview.

But yes, I really hope ( especially the new Phoenix 1.5 ) HTML wins back some mindshare in dev.

[1] https://github.com/hopsoft/stimulus_reflex

Re: Second-Guessing the Modern Web

#366
post #358

Earlier quoted context omitted.

If you mean to equate wearing tinfoil hats with employing a blacklist-by-default Javascript policy I'd gladly hear your reasoning. I'm sure it would help others not confuse your point with vapid shitposting, as well.

Yes, that's what I'm equating it with. I think it's a fair analogy. Disabling Javascript isn't enough to 'protect your privacy', and even if it was, I haven't heard of any tangible impact that would have on anyone's life.

> Yes, that's what I'm equating it with. I think it's a fair analogy.

That you think it's a fair analogy doesn't help me in the slightest to understand what your reasoning is.

> Disabling Javascript isn't enough to 'protect your privacy',

In the same sense as wearing a face shield while operating a chainsaw is not enough to save your life. It goes a long way.

> I haven't heard of any tangible impact that would have on anyone's life.

Have you heard of Facebook? Google?

Re: Second-Guessing the Modern Web

#367

The problem with not using a JS framework is that eventually, the investors/business person/design team/frontend enjoying devs wants this highly animated site with all sorts of little toggles, confirmation boxes, popup models, toasts, etc. It is far nicer doing that in React where you can just casually npm in some online component that does that rather than in vanilla JS or jQuery. React is basically a compromise bet…

>Developers like simple sites like Hacker News. Nobody else does. StackExchange ( Which is not only about developers ) Serve their Server Rendered HTML page in less than 20ms at 98th projectile with little to no caching.

They didn't even bother caching their most popular section or page.

Re: Second-Guessing the Modern Web

#368
post #358

Earlier quoted context omitted.

Yes, that's what I'm equating it with. I think it's a fair analogy. Disabling Javascript isn't enough to 'protect your privacy', and even if it was, I haven't heard of any tangible impact that would have on anyone's life.

> Yes, that's what I'm equating it with. I think it's a fair analogy. That you think it's a fair analogy doesn't help me in the slightest to understand what your reasoning is. > Disabling Javascript isn't enough to 'protect your privacy', In the same sense as wearing a face shield while operating a chainsaw is not enough to save your life. It goes a long way. > I haven't heard of any tangible impact that would have o…

Okay, taking Facebook as an example. Let's say you visit a random website and get tracked by a Facebook Pixel (which happens to be an image, not JavaScript), what happens then? You see behaviourally-targeted advertisements on Facebook and partner destinations, instead of generically-targeted advertisements. I don't agree with the assertion that this has a materially negative impact on anyone's privacy or life as a whole.

I understand that this is an unpopular opinion, but it's what I believe.

Re: Second-Guessing the Modern Web

#369
post #3

> If Wikipedia were started today, it’d be React. Maybe? No, I'm building a hard fork of wikipedia and I'm using Go to render the pages on the server side and a vanilla JS for a user friendly the rich text editor. I don't know why not more people use WebComponents as a light weight alternative to React/Vue/Angular. It was natural choice in my case because it grew out of the desire to keep the tech stack small. For no…

Is that a replacement for mediawiki or an actual a fork of wikipedia?

Both, its 2020 wikipedia should have had a WYSIWYG editor a long time ago. They keep making excuses why this can't/should't be the case, so I want to migrate over the content to a new system.

Re: Second-Guessing the Modern Web

#370

Earlier quoted context omitted.

I'm pretty sure blind people don't even notice this 'terrible UX' problem you describe, and that sighted folks aren't quite as jarred by it as you think. This 'taste' issue probably matters more in some organizations than others. Hopefully they don't involve blind people in their business, because SPAs are notorious for being unusable to them. You can design an SPA with accessibility in mind ( https://www.deque.com/b…

Yes, people who don't have the ability to see won't care about flickering on the screen and the better user experience that a single page app affords to users who can see. Not even sure why you're making that point other than to try and imply that people who write single page apps automatically don't care about blind people, which is self-righteous and rude. We have a single page app and we regularly run it through s…

I appreciate you taking the time to look at that.

I'm glad there are people out there taking the accessibility issue seriously, what you said does make me more inclined to evaluate framework-based solutions. Nice to know at least parts of the most popular JS platforms are maturing enough for this to be easier for devs to implement.

Post reply on HN