Live data from Hacker News

Hotwire: HTML over the Wire

hotwire.dev

161–170 of 573 posts

Re: Hotwire: HTML over the Wire

#161
post #74

Spoiler, it's just Ajax but it pushes the data through your templates before sending it to the client. We were doing this literally over a decade ago in the early days of XHR.

Oh no, a decade ago!! please show me some hot new Next/Redwood/Svetle code so I can calm my nerves!

Re: Hotwire: HTML over the Wire

#162
post #123

I wonder how long it will take before we reinvent SPAs? I like Hacker News in part because the tech is so boring. Server-side rendered, static HTML with a minimal amount of JS[0]. [0]: https://news.ycombinator.com/hn.js

I also prefer boring and love how HN works. That said though, modern consumers expect much more. We tech people like command lines, the ultimate in simple and boring. Modern consumers often want animation and things[1]. Source: UI/UX researchers tell me this when I push back and say "let's keep the tech simple and forgo some of the animations, etc in the name of using simple OOTB stuff without hacking thousands of li…

Consumers want electronic starters on their chainsaws – but they're less reliable, prone to error, more expensive, etc... in the end, us engineers gotta make products that people will buy.

Re: Hotwire: HTML over the Wire

#163
post #105

Earlier quoted context omitted.

That's one of the reasons SPA aren't going anywhere: trying to handle all the user microinteractions on the server is great when you leave next to it, but it falls apart when your users are spread across the world, especially if it's not western-ish world with fast internet connections.

Huh? How does SPA help here? JSON payloads don't go faster over the wire than html.

An app with longer usage leans towards SPA. Quick or sporadical stuff, shouldn't be a SPA. The problem is always doing, SPA all the things or Do everything in the backend like if it's 2005

Re: Hotwire: HTML over the Wire

#164
post #155

Most of the comments here are along the lines of: this is old tech! But this isn’t really about the tech, it as much a productivity hack that allows people to be much closer to that old fashioned concept of a full stack developer This is what has allowed Basecamp to create Hey with a team just a fraction of the size of their competitors

Somewhere along the way Mythical Man Month was turned from a cautionary tale into a competition, and it only ever seems to happen once VC gets their mitts on a company. Does it really take a team of 800 engineers to maintain your fancy todo list app, rather than your focussed team of 10 or 20? What are all of those people doing except piling on organisational cruft so the business has no choice but to over-encumber i…

Yeah somewhere along the line people confused success with the amount of money you’ve raised and the number of people you employ. This just incentivises complexity

Re: Hotwire: HTML over the Wire

#165
post #153

Earlier quoted context omitted.

It's not just that things are too complicated... the JS being sent to browsers is large and a lot of work. That requires more bandwidth, processing, and power usage on client devices. This eats phone, tablet, and laptop batteries.

But... that's one of the pro's of not having to do the rending cycle on the server. Also caching of framework libraries off CDN's and such. I don't see much merit in moving back to server side rendering aside from obfuscation & helping SEO ratings (web crawlers have a hard time with SPA)

> But... that's one of the pro's of not having to do the rending cycle on the server. Also caching of framework libraries off CDN's and such.

This doesn't save battery life on a device. If someone downloads a few meg of JS their browser has to parse and execute that JS locally. This use of processing uses power. If that same person had half as much JS to parse and execute it would use less power.

A CDN does not save from this happening.

When power use happens on a server it's more on the server but less on devices with batteries. Batteries aren't used up as quickly (both between recharges and in their overall life).

A server side setup can cache and even use a CDN to only need to render parts that change.

My points are that it's not all cut and dry along with considering batteries.

Oh, and older systems (like 5 year old ones)... surfing the web on an older system can be a pain now because of JS proliferation.

Re: Hotwire: HTML over the Wire

#166
post #120

This is so exciting to see, especially for older folk like me. Almost 20 years ago, one of my professors told us before graduation that hot tech is mostly about the idea pendulum swinging back and forth. I immediately chalked it up to 65+ above white wise men snobbery. However, this is exactly that. We started with static pages, then came Ajax and Asp.net and the open source variants, then we went full SPA, now we ar…

I like how so nonchalantly you turn this into a racist comment and yet no one is calling you out on it.

Re: Hotwire: HTML over the Wire

#167
post #120

This is so exciting to see, especially for older folk like me. Almost 20 years ago, one of my professors told us before graduation that hot tech is mostly about the idea pendulum swinging back and forth. I immediately chalked it up to 65+ above white wise men snobbery. However, this is exactly that. We started with static pages, then came Ajax and Asp.net and the open source variants, then we went full SPA, now we ar…

You went to a school with professors and dismissed their final advice to you as "65+ above white wise men snobbery"?

Which part of that is supposed to be a reasonable thing to say?

Re: Hotwire: HTML over the Wire

#168
from a security engineer's perspective, these things seem great, but ultimately become really tricky where DOM nodes need to be produced safely. string concatenation doesn't cut it for obvious reasons, then you have mXSS from mismatches between the backend server and the browser's interpretation of the HTML

Re: Hotwire: HTML over the Wire

#169
post #137

Earlier quoted context omitted.

I don't think this addresses all of what SPAs is used for. It seems to assume full-stack control.

It's specifically built for Rails, so yeah, it definitely assumes full-stack control. And there are definitely applications I would prefer to write as an SPA over the Hotwire approach. But given that the vast majority of websites are just a series of simple forms, I prefer this approach over the costs you incur from building an entire complex SPA.

While it works with Rails... some of the parts are just JavaScript and will work with any underlying platform.

Re: Hotwire: HTML over the Wire

#170
post #120

This is so exciting to see, especially for older folk like me. Almost 20 years ago, one of my professors told us before graduation that hot tech is mostly about the idea pendulum swinging back and forth. I immediately chalked it up to 65+ above white wise men snobbery. However, this is exactly that. We started with static pages, then came Ajax and Asp.net and the open source variants, then we went full SPA, now we ar…

You went to a school with professors and dismissed their final advice to you as "65+ above white wise men snobbery"? Which part of that is supposed to be a reasonable thing to say?

I read it as a self-deprecating dig at his / her younger self.
Post reply on HN