News for hackers. Stuff that matters.
Re:Hotwire: HTML over the Wire by naikrovek on Tuesday December 22, 2020 @01:14PM (#25509305)
amazing. This used to be called /cgi-bin/ with templates and XMLHttpRequest (a Microsoft invention initially supported only in IE then adopted by everyone) and now it's suddenly a new technology/approach but with a new name so you're not ridiculed for using it?

I gotta give them credit for revisiting server-side page assembling though; moving application logic and templating mostly to the front end was a HUGE mistake. JS is very fast now, but it's still absolutely glacial in its speed compared to server-side code written in compiled languages.

Re:Hotwire: HTML over the Wire by Trasmatta on Tuesday December 22, 2020 @01:25PM (#25509437)
> and now it's suddenly a new technology/approach

I don't think I've ever seen DHH or the Basecamp crew advertise any of this type of stuff as some groundbreaking new approach that nobody has ever tried before. On the contrary, I usually see them talking about how those old ways of doing web development were actually better in many ways, which is why they're pushing to move away from the current "everything is an SPA" approach.

And all this new tooling makes the experience much better than it ever was in the past.

Re:Hotwire: HTML over the Wire by arvindamirtaa on Tuesday December 22, 2020 @05:08PM (#25511892)
>I don't think I've ever seen DHH or the Basecamp crew advertise any of this type of stuff as some groundbreaking new approach that nobody has ever tried before

Not disagreeing with the rest of the stuff. But they literally call it "NEW MAGIC" per DHH's tweet.

Re:Hotwire: HTML over the Wire by Trasmatta on Tuesday December 22, 2020 @07:12PM (#25512983)
Yeah that's fair
Re:Hotwire: HTML over the Wire by jshen on Tuesday December 22, 2020 @01:20PM (#25509363)
cgi-bin didn’t give you the ability to update a chat page across several different windows in near real-time.
Re:Hotwire: HTML over the Wire by naikrovek on Tuesday December 22, 2020 @02:09PM (#25509905)
It did if you used XMLHttpRequest.
Re:Hotwire: HTML over the Wire by jshen on Tuesday December 22, 2020 @03:36PM (#25510922)
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 by fzzzy on Tuesday December 22, 2020 @06:20PM (#25512623)
I think in Netscape 4 you could also make a request in an iframe which the server responded to with Content-Type: application/javascript and Transfer-Encoding: chunked. Then every time the server got an event it would write one chunk of javascript, which the client would execute immediately. This script could then call a callback in the parent frame.
Re:Hotwire: HTML over the Wire by icedchai on Tuesday December 22, 2020 @03:44PM (#25511005)
In old school chat rooms, this was usually done by polling for new messages every X seconds, or doing a refresh / reload of an IFrame containing the chat.
Re:Hotwire: HTML over the Wire by jshen on Tuesday December 22, 2020 @08:00PM (#25513285)
I know, I wrote many of those, it’s a much worse solution than this.
Re:Hotwire: HTML over the Wire by fzzzy on Tuesday December 22, 2020 @06:16PM (#25512596)
Long Polling is how we used to do it. The web page opens a request to the server but the server does not reply. Once the event happens on the server, the server replies to the old request and the client opens a new request.
Re:Hotwire: HTML over the Wire by jshen on Tuesday December 22, 2020 @08:01PM (#25513289)
Yup, this is much better than that, and nicely integrated for you.
Re:Hotwire: HTML over the Wire by webmaven on Tuesday December 22, 2020 @05:53PM (#25512376)
> cgi-bin didn’t give you the ability to update a chat page across several different windows in near real-time.

Servers could maintain an open connection and stream new data to the browser.

Re:Hotwire: HTML over the Wire by jshen on Wednesday December 23, 2020 @02:04AM (#25515209)
That was a much worse solution, and even worse with cgi-bin.
Re:Hotwire: HTML over the Wire by webmaven on Thursday December 24, 2020 @11:46PM (#25534278)
Sometimes worse is better.
Re:Hotwire: HTML over the Wire by forgotmypw5 on Tuesday December 22, 2020 @08:17PM (#25513383)
in no way elegant, but yes, with js, it's possible with netscape 3 and up, possibly with 2.

html, http, js, css are pretty thorough in their design, and it shows.

all the features described here are possible without any frameworks, this is merely a much easier way to build it than from scratch.

Re:Hotwire: HTML over the Wire by jshen on Wednesday December 23, 2020 @12:50PM (#25520110)
Yes, but I was replying to someone who said that we got all of this with cgi-bin. That’s like saying, “I can code a modern app in assembly, therefore there’s been no progress here”.