Live data from Hacker News

Ask HN: What companies are embracing “HTML over the wire”?

news.ycombinator.com

171–180 of 192 posts

Re: Ask HN: What companies are embracing “HTML over the wire”?

#171

old man alert Back in my day, we wrote ASP.NET that was all server-side-rendered HTML. Once in a while we got REAL FANCY and used JQuery to make PARTIAL HTML requests and update only FRAGMENTS of the page. Hooboy I knew that fashion was cyclical but not tech!

That’s exactly what we are still doing in our bootstrapped SaaS tool! Using asp.net mvc though, not web forms.

[deleted]

Re: Ask HN: What companies are embracing “HTML over the wire”?

#172

> Even if you use React in small areas where it pulls its weight but generally try and stick to simplicity of sending plain ol' HTML The reason why so many apps use React/Vue/whatever for everything is because this hybrid setup is far from simple. It leaves you with two different ways of rendering views, which creates unnecessary context switching for developers, and the interface between the two is often ugly and co…

I've come to the same conclusion. Heck, as a solo developer, it is quite hard to keep in mind all the different states (server, client, request, session...) and on top of it make it also reactive. Mixing things increases the complexity.

Re: Ask HN: What companies are embracing “HTML over the wire”?

#173
post #75

Earlier quoted context omitted.

We do browser based end-to-end testing which tests the frontend and backend at the same time using a single tool (Capybara in our case). We take snapshots at various points during the test runs which are then compared to previous runs for visual regression testing. Nothing is isolated so it's probably slower. The tradeoff is that the tests are really simple for how much they cover, and they're entirely separate from…

How do you test cases like, "the app should show an error screen when an error occurs in the database or server-side application layer"? In the SPA approach, I find these things quite easy to model with a service worker; just mock JSON API with the non-200 response code with body. I do see the merits of end-to-end testing but I've found it quite simple to mock the interface rather than ensure the database is primed w…

We have some tests like that. We're injecting a stub to generate the error condition and then testing the output. The test code runs in the same thread as the server so we can temporarily inject a stub into the server for some cases.

You're right we have to know something about the system to know where to inject the stub, and in fact it makes the test brittle in case that implementation detail changes (which has actually happened and failed these tests before), but it doesn't really matter where we inject the stub to cause the error response, so it's not as bad as it sounds. I think it might be pretty analogous to knowing where to mock the JSON API w/ a non-200 response code.

We very rarely stub anything and consider it a code smell, this is one case where we made an exception though because there is otherwise no way to generate an error message via the user interface.

Re: Ask HN: What companies are embracing “HTML over the wire”?

#174

https://www.otto.de/ I used them this week for the first time and was impressed by the responsiveness on my phone. I looked into the network tab and what I saw was an over-the-wire solution. However, I'm sure that you can also achieve responsiveness this without HTML over the wire. I scimmed a few blog posts, and it seemed to me like they use Java EE, although I'm not entirely sure.

https://builtwith.com/?https%3a%2f%2fwww.otto.de%2f Ablecommerce (asp.net) What led you to think it was Java EE ?

I checked out the profile by their main software architect Guido Steinacker [1], their job offerings on otto.de [2], their github (they have repos for classic Java EE patterns, like their Wicket component tester and HAL stuff, which is a default in spring data) [3], and their stepstone, which mostly shows spring and java jobs [4]. There is no single asp.net job listed and they also don’t have anything asp.net related on their github. I don’t think that builtwith is an accurate data source.

[1] https://www.xing.com/profile/Guido_Steinacker

[2] https://www.otto.de/jobs/de/jobsuche/-java/index.php

[3] https://github.com/orgs/otto-de/repositories

[4] https://www.stepstone.de/cmp/de/Otto-GmbH-Co-KG-28607/jobs.h...

Re: Ask HN: What companies are embracing “HTML over the wire”?

#175

Earlier quoted context omitted.

I wonder how much visitors you have, i.e. how much popular is it? If its not a secret of course. I couldn't imagine any web developer need such kind of tool [knowing curl by heart], but obviously I'm in my own bubble and I'm wrong on my assumptions.

70,000-90,000 unique monthly visitors, according to client-side analytics. Someone wanted to buy the site so we added client-side analytics in August to December 2022 https://plausible.io/curlconverter.com?period=custom&from=20... We also moved the site from GitHub Pages to Cloudflare Pages just for August 2022, to run server-side analytics to count the people that block ads and that said 116k "visits", compared to 6…

> curl is kind of complex and expects you to understand HTTP. It's better if developers that don't want/need to learn it can bypass it.

That's my understanding what is meant to be web developer.

I'm correcting my understanding of reality with comments like yours, thanks!

Re: Ask HN: What companies are embracing “HTML over the wire”?

#176

I'm building a webapp[0] for turning Clickup docs into static sites, using CF Workers. There isn't a framework for Workers that has the flexibility I need, so I home-rolled one that only sends rendered HTML over the wire. Async components are supported too, so if I have a particularly data-intensive component the renderer just inlines a tiny JS script that sends a request to the worker again, which then returns just…

The behaviour seems very similar to the Astro framework.

Re: Ask HN: What companies are embracing “HTML over the wire”?

#179

It depends... are you delivering mostly static content or creating and interactive application front-end? Most sites are somewhere in the middle and so should the responses. For me, if it's an application ui/ux, then the rendering should be almost exclusively on the front-end. It's just delivered via a web server instead of installed. Yeah, it's larger than server-sent. It's also emphatically not tying up server reso…

I wouldn't assume building the html on the server uses any more server resources than building JSON. Either way you are just building a giant blob of text. With html fragment caching the server could easily be doing less work this way.

Unless you are doing string interpolation to generate JSON, it is absolutely more resources... and how much will depend on the framework(s) in use. To/From JSON is a straight serialization/deserialization, where templates are a bit more involved.

It's not a crazy amount of overhead... and even then, it's a matter of how interactive the site/application is or needs to be. You can have a horrible or great UX in either direction in different use cases.

Re: Ask HN: What companies are embracing “HTML over the wire”?

#180
post #47
post #23

When I use apps like this - GitLab - I am struck by how much wasted user time such an approach leads to. Everything is a page refresh Send me some counter examples? Im a big SPA fan and there’s lots of good examples

Everything in a page refresh typically only happens with these solutions as a fallback when Javascript is disabled. And if Javascript is disabled, what do you really expect to happen other than everything is a hyperlink?

You serious man? I see it every day when I have to use this god-forsaken Rails shit, it's so fucking slow to load the view and THEN it loads the data, literally the worst of both worlds
Post reply on HN