Hotwire: HTML over the Wire
351–360 of 573 posts
Re: Hotwire: HTML over the Wire
#352This 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…
The Rails people never went for SPAs though. Releasing another server-rendering AJAX thing for rails (previous was TurboLinks) no more represents "the pendulum swinging back" than a new version of COBOL that runs on mainframes represents the pendulum swinging back to mainframes. If this approach gains market share against React etc., then that will be meaningful - but don't hold your breath, there are legitimate reas…
Re: Hotwire: HTML over the Wire
#353Earlier quoted context omitted.
I’m glad this technique is making a comeback. The last 10 years of JavaScript on the client have been an utter shit show that left me wondering wtf people were thinking.
Same. And I'm still amazed that people loved JS so much they put it on the SERVER too! And now node/npm is everywhere.
Re: Hotwire: HTML over the Wire
#354Re: Hotwire: HTML over the Wire
#355Earlier quoted context omitted.
It did if you used XMLHttpRequest.
If you type a chat message in your browser, how does it automatically show up in my browser with XMLHttpRequest?
Re: Hotwire: HTML over the Wire
#356Earlier quoted context omitted.
It did if you used XMLHttpRequest.
If you type a chat message in your browser, how does it automatically show up in my browser with XMLHttpRequest?
Re: Hotwire: HTML over the Wire
#357Earlier quoted context omitted.
Between what? Your frontend is serving the html/css/js, that's your frontend. You can have another background service behind it, as many layers as you want. This separation doesn't have to be at the http level.
Let's say you take another approach. Build a backend that serves REST, GraphQL or whatever protocol. This can be a Rails backend, could be Python, JS, whatever. Now you or the frontend team are free to build the frontend with whatever technology. You can update it more freely to shining new JS frameworks because it is not entirely tied to your backend. Also, if your client/boss asks you to build a native IOS frontend…
Re: Hotwire: HTML over the Wire
#358Earlier quoted context omitted.
I'm not a front end engineer, but it always seemed crazy to me. I remember testing out the Google Web Toolkit when it came out more than a decade ago, and the craziest thing about it to me wasn't the Java --> JavaScript compilation, it was that the server just dumped an empty page and filled everything in with JavaScript on the client. Then, remember the awful awful #! URLs? Atrocious, and seemed like obviously a ter…
AWS used to rely on JWT for their consoles (haven't for a few years now, most folks migrated away some 5 years ago) It's why they used to be horrendously bloated with large javascript bundles that took so long to process on the client side. Roughly speaking the idea was "We don't have any Javascript developers, but we do have Java developers. JWT allows us to bridge that divide". Neat in theory, and an understandable…
Re: Hotwire: HTML over the Wire
#359Earlier quoted context omitted.
I’m glad this technique is making a comeback. The last 10 years of JavaScript on the client have been an utter shit show that left me wondering wtf people were thinking.
Same. And I'm still amazed that people loved JS so much they put it on the SERVER too! And now node/npm is everywhere.
Re: Hotwire: HTML over the Wire
#360The allure of xmlhttprequest was that over connections much slower than today, and with much less powerful desktop computers, a user didn't have to wait for the whole page to redownload and re-render (one can argue that focusing on better HTTP caching on the server and client might have been smarter) after every single user interaction. This was also much of the draw of using frames (which were also attractive for some front-end design use-cases later re-solved with CSS).
As apps got more complex, clients got more compute, bandwidth grew, and as web audiences grew, offloadingl much of the page rendering to the client helped to both contain server-side costs and increase or maintain responsiveness to user interactions.
Now, as desktop client performance improvement slows down (this isn't just the slowing of computer speeds, computers are also replaced less frequently), average bandwidth continues to grow, app complexity and sophistication continues to grow, but as server compute cost falls faster than audience size grows, shifting rendering to HTML back to the server and sending more verbose pre-rendered HTML fragments over the wire can make sense as a way of giving users a better experience.