Live data from Hacker News

If Not SPAs, What?

macwright.com

361–370 of 456 posts

Re: If Not SPAs, What?

#361

Earlier quoted context omitted.

> Frontend tooling has never been better than it is today. eh. Swing in its golden age run circle around what we have now. Granted it's old tech now that we settled for in-browser delivery, but still: - look and feels could do theming you can only dream of with css variables/scss - serialize and restore gui states partially or whole, including listeners - value binding systems vue can only dream of - native scrollers…

Not to be mean, but I worked with Swing for ten years and it was absolute crap. Constantly dealing with resizing “collapsars”, GBLs, poor visual compatibility with the host OS, a fragile threading model and piles and piles of unfixed bugs and glitches was a nightmare. It might have worked if you had a specific end user environment but it was a PITA for anything else, and deployment was even harder. There are a few th…

well we're talking about the tooling, but point taken, swing wasn't perfect (totally grid bag 2007 short https://www.youtube.com/watch?v=UuLaxbFKAcc )

but it's not like it was that worse than flex bugs ( https://codepen.io/sandrosc/pen/YWQAQO still does render differently in chrome than firefox - which one is wrong is immaterial)

Re: If Not SPAs, What?

#362
post #205

Earlier quoted context omitted.

> you're building on top of a stack of software that includes a rendering engine Yes that's pretty much a web browser, isn't it? There are many types of engines, such as a business logic engine. The distinction between engine and framework is a little vague but what I'm getting at is the low-code interacting-components design approach, rather than code first. I'm wondering why that hasn't taken off. People use Godot…

Games aren't low-code. Even with UE4, people end up learning C++ because there's only so much you can do with the Blueprint flowcharts before it becomes an unmaintainable mess that grinds your development speed to the ground. It's also pretty much a law of nature that every nontrivial game eventually develops a scripting language (unless it's already written in one, e.g. Python). But it's absolutely true that you can…

Point taken about the amount of code - my point was more about how far you can get with the core structure before having to dive into code. Whereas any React tutorial starts with code. You don't really start by laying things out and connecting the dots as such, you start by typing.

It wasn't so much about art-driven games (I found Gris super boring which would be a prime example, though many loved it), but more about people from different backgrounds bringing new ideas. There are all kinds of programmers, or course, but as a whole I'd say artists or musicians or writers are into different things. As someone who has played games for a long time I usually appreciate something fresh or interesting. IIRC Stardew Valley and Undertale are two examples by people who didn't identify as programmers.

> But it's absolutely true that you can teach artists to code - within the limited domain

I think this is the promise of computing that we've failed to reach yet. Any person has a problem, and with a little effort, they can code up a fix. Coding as a skill like putting up some shelves, rather than engineering an entire house. Some tools get some of the way there (like Zapier, IFTTT, or AutoHotKey) but I'd love to see how far we can go.

Re: If Not SPAs, What?

#363
post #310

Earlier quoted context omitted.

I still see factories on a daily basis. They are a useful design pattern that is utilized in Java. My anecdotal evidence is that I have never seen the over-engineered "Enterprise Java horrors" OP is talking about despite working in the Java EE (now Jakarta EE) space. I suspect it's a story from the times of J2EE, or something similar.

> I still see factories on a daily basis. They are a useful design pattern that is utilized in Java. A separate factory type means you have to write twice as much code for no real benefit. In most languages you'd just use a first-class function (and in post-8 Java you can do the same: rather than a FooFactory you accept a Supplier and people can pass ::Foo . It's still more cumbersome than in most languages though).…

> A separate factory type means you have to write twice as much code for no real benefit.

Ah! There's the confusion. What I meant was I see factory methods in code we consume on a daily basis, not that we write the full factory objects. A number of Java projects have static factory methods that provide the interface implementation instance based on your configuration.

Would you still object to this kind of design?

Re: If Not SPAs, What?

#364
post #329

Earlier quoted context omitted.

Wow. Stack Exchange is a curious case study. I share the general HN sentiment over microservices complexity but just to play devil's advocate... I suspect that server cost in this case is asymptotic. If the (monetary) cost of SE's architecture is F(n) and your typical K8s cluster is G(n), where n is number of users or requests per second, F(n) very large. In essence, the devil's advocate point I'm making is that mayb…

I can't recall reading much on how going for 'the cloud' or 'serverless' saved anyone money. On the other hand, I've read my fair share of horror stories about how costs ballooned and going for the old-fashioned server/VPS ended up being much, much cheaper. The main argument in favor of the 'cloud' is that it's easier to manage (and even that is often questioned).

Monetary savings is basically the main selling point of serverless:

https://read.acloud.guru/how-going-serverless-helped-us-redu...

https://techbeacon.com/enterprise-it/economics-serverless-co...

https://medium.com/perfsys-blog/how-serverless-computing-sav...

Re: If Not SPAs, What?

#365

Author seems to think the goal of SPAs was to simplify web dev, but it’s actually to allow you to build fully featured, highly interactive, apps in a browser. What the author is really getting at, I would guess, is that front end dev is awful, due to this weird combination of the Blub issue and a historical trajectory that has caused many problems. The blub issues is mostly simple enough to pin down. Experienced prog…

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.

Re: If Not SPAs, What?

#366
post #316
post #292

Earlier quoted context omitted.

> You certainly wouldn’t use a language like JS, I disagree with this. You might not want to use JS but a language “like” JS such as TS or Lua would definitely be on the table. Or just JS without the biggest warts. > you certainly would want to provide visual design tools as far as possible, I feel that the promise of visual design tools fell quite short. Issues with version control and general traceability of change…

> You might not want to use JS but a language “like” JS such as TS or Lua would definitely be on the table. Or just JS without the biggest warts. When you remove the warts from JS there's not much left. And I'd be pretty skeptical of someone starting a new project in Lua today. I think the mainstream choice for a "blank slate" language today would look something like Swift or Kotlin; Typescript can gets close, but it…

> When you remove the warts from JS there's not much left

Modern JavaScript is pretty sweet to write compared to pre 2015. It sure is fun to join in on the "JavaScript bad" circle jerk though.

Re: If Not SPAs, What?

#367
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

Is this similar to Vaadin?

Re: If Not SPAs, What?

#368

Earlier quoted context omitted.

Wow. Stack Exchange is a curious case study. I share the general HN sentiment over microservices complexity but just to play devil's advocate... I suspect that server cost in this case is asymptotic. If the (monetary) cost of SE's architecture is F(n) and your typical K8s cluster is G(n), where n is number of users or requests per second, F(n) very large. In essence, the devil's advocate point I'm making is that mayb…

Microservices will add latency because network calls are much slower than in-process calls. Microservices, as an architectural choice, are most properly chosen to manage complexity - product and organizational - almost by brute force, since you really have to work to violate abstraction boundaries when you only have some kind of RPC to work with. To the degree that they can improve performance, it's by removing confo…

I'm not sure if we're on the same page here. When I said "cloud providers make this option cheaper than traditional servers" I meant it as in the pricing structure/plans of cloud providers. That's why I tried to contrive a scenario to make a better point. Meanwhile your definition of cost seems to center on performance and org overheads a team might incur.

You say that serverless will cost more "to prevent noisy neighbor effects"...but that is an abstraction most cloud providers will already give you. Something you already pay your provider for. So my DA point now is, is it cheaper to pay them to handle this or is it cheaper to shell out your own and manage manually?

Re: If Not SPAs, What?

#369
post #358

There is nothing wrong with reloading a page. Hackernews is doing it. On the other hand a page not working because webdevs deemed your browser outdated really is problematic.

This is something I really struggle to understand about the modern web dev mentality. What is exactly so bad about reloading a page? You get visual cues that the browser is doing work, and the page you requested is being downloaded. On the other hand, some SPAs literally provide zero cue when a route has been changed, which is just awful UX to me.

Re: If Not SPAs, What?

#370
post #362

Earlier quoted context omitted.

Games aren't low-code. Even with UE4, people end up learning C++ because there's only so much you can do with the Blueprint flowcharts before it becomes an unmaintainable mess that grinds your development speed to the ground. It's also pretty much a law of nature that every nontrivial game eventually develops a scripting language (unless it's already written in one, e.g. Python). But it's absolutely true that you can…

Point taken about the amount of code - my point was more about how far you can get with the core structure before having to dive into code. Whereas any React tutorial starts with code. You don't really start by laying things out and connecting the dots as such, you start by typing. It wasn't so much about art-driven games (I found Gris super boring which would be a prime example, though many loved it), but more about…

> my point was more about how far you can get with the core structure before having to dive into code. Whereas any React tutorial starts with code. You don't really start by laying things out and connecting the dots as such, you start by typing.

I agree, this is a good point and a strong contrast.

Given how the React model is a relatively simple and specific one (DOM being a tree, data bindings forming a DAG), I'm somewhat surprised how little we seem to have in terms of UI builders. React seems to yield itself to visually constructing working, interactive sites out of pieces. And yet, as you note, everything about it starts with code.

(I guess we may be in the "startup phase", where all GUI builders are SaaS tools made by companies, who try to vendor lock you.)

> I think this is the promise of computing that we've failed to reach yet. Any person has a problem, and with a little effort, they can code up a fix. Coding as a skill like putting up some shelves, rather than engineering an entire house.

100% agree. That's why I cheer people who solve their personal and professional problems with an Excel sheet, or a half-baked mix of scripts. That's why I love tools like AutoHotkey (Windows) and Tasker (Android). Coding is a specific mindset, but that doesn't mean that you have to be either helpless about computers, or a software professional. Much as a carpenter or a remodeler would cringe at the way I fix up things around the house with judicious application of duct tape and power drill, but as long as they work, are safe, and my wife doesn't complain about aesthetics, I'm happy (and get to save money).

Post reply on HN