Live data from Hacker News

If Not SPAs, What?

macwright.com

451–456 of 456 posts

Re: If Not SPAs, What?

#451

Earlier quoted context omitted.

What's the blub problem?

It is described here, specifically in the "The Blub Paradox" section: http://www.paulgraham.com/avg.html My understanding is that everyone understands the features and ecosystem benefits of languages they work with, but not necessarily understands those of other languages. As a result, the value of their opinions on other languages may be mixed.

Thanks!

Re: If Not SPAs, What?

#452

Earlier quoted context omitted.

It’s not stupid, no, but a “supporting foundation” is a largely just a seductive metaphor. It says, “Clearly software is like a building. Every building needs a solid foundation.” It doesn’t inspire engagement with other metaphors, like considering software to be a tree that must be grown incrementally and as a product of dynamic forces. It doesn’t map knowledge from the building domain to knowledge in the software d…

Or that, with software, you can always rip out the foundation and replace it. And you're working on it as you work on the rest of the "building" anyway. The difficulty of working on lower abstraction layers doesn't scale with the amount of higher layers. Unlike with buildings or bridges, there's no gravity in software, no loads and stresses that need to be collected and routed through foundations and into the ground,…

I love this insight, I just recently learned about the hidden HN feature to favorite comments and used it for the first time to favorite your comment. It's always a pleasure to read your comments on HN, I noticed your handle popping up here and there and would like to thank you for your contributions. If you had a collection of all your comments on HN printed in a book I think I would buy it:)

Re: If Not SPAs, What?

#453

Earlier quoted context omitted.

Regarding auth and db, the ones I've spoken with that prefer JS way of doing things like to combine a bunch of existing offerings into one, eg Auth0 for Auth, Prisma for DB and so on. The more potential points of failure, the more attractive it seems to them. When saying that Laravel/RoR gives you all that by running one simple command , I get blank stares. Hard to believe, I know.

The problem is then you'd have to use PHP or Ruby. Much as people say they've improved, they're not better than TypeScript. I wish someone made something like Laravel for TS. Sometimes I look at Laravel and think, sure it's great that they did all of that and are even making a bunch of money, but why did it have to be PHP of all languages?

PHP and Ruby both are better than a half-ass typing on a single-thread language.

(I only write Elm and Elixir nowaday)

Re: If Not SPAs, What?

#454
post #60

I think there is another layer to that conversation. Frameworks become bureaucratic and boring because they are developed by large teams for large teams. Most developers are working on small projects and need more fun and less maintaining huge amount of boilerplate code that recreates the browser. The framework that I feel makes development less ugly is svelte. But still, I really don't like the idea of heavy client…

The only weak point for Svelte is there is no inline template composition (yet; already has a rfc). Anything that doesn't look like function is weak compossibility. Imagine recursively calling template itself with a bunch of condition logics, each branch renders different nested templates, and each of those calling its own ancestor root. Svelte is a joke to this thing.

Re: If Not SPAs, What?

#455
post #71

IMO, TurboLinks + service workers are the way to go. Not many people know this, but a service worker (previously called "local server") allows you to run a little web server in the user's browser that intercepts requests to your own web site. (There's no open IP port.) The service-worker web server can proxy requests to the remote server, and even build/store entire pages on the client side, enabling offline support.…

Strongly agreed that service workers have a ton of potential here. But I’m still waiting for there to be some kind of killer framework that crosses the bridge between worker and window, saving lots of main thread processing, etc... MessageChannels are quite low level so I imagine it would need some abstraction. But still, very powerful. I’m imagining some kind of Svelte-like thing that creates the whole page worker-s…

I'm working on something like this. Not really a framework though. More of a hodgepodge of JS that I've written and the front end logic would be something like HTMX/Behavior.js style of coding. It will be a progressively enhanced approach to writing a SPA so you could have no JS and it would still work! Or, if you have a modern browser it would work offline. We'll see if I ever finish it :-)

I'm doing a bit of a rewrite right now so this flexibility will come soon.

https://github.com/jon49/MealPlanner

Right now it only works offline.

Re: If Not SPAs, What?

#456
post #267
post #8

I think Phoenix Live View is maybe the most compelling story around this ( https://github.com/phoenixframework/phoenix_live_view ). I'm moving a side-project from React/SPA to Phoenix live view and it's kind of amazing to get the dev ergonomics of a server-rendered page with the UX benefits of a SPA. This course is a pretty great intro: https://pragmaticstudio.com/phoenix-liveview

Blazor Server ( https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor ) is similar. It's a very productive environment.

Can't believe this didn't get mentioned in the article.
Post reply on HN