Live data from Hacker News

If Not SPAs, What?

macwright.com

411–420 of 456 posts

Re: If Not SPAs, What?

#411
post #102

Earlier quoted context omitted.

Blazor is certainly a very interesting and promising piece of technology. However, Blazor Server hosting mode is prone to latency issues and requires always-on connection to run an applications (so, no offline mode). On the other hand, the alternative Blazor WebAssembly mode requires clients to download a sizeable mix of .NET runtime and other system DLLs on the first use of the application (even a lightweight demo a…

2 MB should not be an issue nowadays. Considering 5G roll out & substantial coverage in most mature markets, in say, 2 - 3 years, 2 MB is acceptable.

Remember, that 2+ MB is the download size of a bare-bones application. Relevant sizes for real-world applications, obviously, would be bigger (though, depending on the total size, the Blazor part might or might not be essential).

Re: If Not SPAs, What?

#412
post #37

I've always felt this problem from the first time I touched Angular. It was just so much more complex and fragile without actually a lot of benefit unless you wanted to make a really interactive async application like Google Docs or Facebook Chat. When SPA's became the norm and even static web pages needed to be build with React, developing became more and more inefficient. I saw whole teams struggling to build simpl…

> I've always felt this problem from the first time I touched Angular. It was just so much more complex and fragile without actually a lot of benefit unless you wanted to make a really interactive async application like Google Docs or Facebook Chat. It sounds crazy to say that now but Angular became big because it was actually quite lightweight compared to other JS frameworks of this era, declarative 2 way databindin…

> The problem is the horrible and complex NodeJS/NPM backed asset compilation pipelines and build tools

Would like to hear more.

Re: If Not SPAs, What?

#413

Earlier quoted context omitted.

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…

Give me HTML+CSS+JS any time. Sure! And Chrome is superbly tested. But HTML/CSS/JS aren't anywhere near good enough to build GUIs of any complexity by themselves, so everyone layers tons of stuff on top. And then those ... those, people have plenty of complaints about too. But if they didn't use them those complaints would migrate to the underlying framework. I mean, Swing may have had a fragile threading model (not…

I agree with you 100%, and was really just addressing the “swing is awesome” statement in the GP. I’ll take HTML etc over Swing any day, but I’m sure there are nicer alternatives if your deployment environment is native, e.g. SwiftUI (which I have no experience with)

There are plenty of things wrong with HTML & friends, await/async and webpack being my personal hair removers, but if we set that aside and just talk about the DOM as the API for the UI, it’s very robust, well documented and widely available. I don’t love it, but it works.

Re: If Not SPAs, What?

#414
post #402

Earlier quoted context omitted.

No, it doesn’t take that much skill. I think this is the source of the problem. The stupidity and hostile fear of originality I detect in this these comments is a very real reflection of my professional experience. This, dependence on frameworks and inability to imagine anything beyond the common SPA, really scares the shit out of me knowing I will be coming home from a military deployment soon and returning to the c…

> No, it doesn’t take that much skill. I think this is the source of the problem. It does take skill to make a proper SPA not to make an SPA.

At what point should a developer be expected to develop? How much incompetence is acceptable before it becomes too much in a high paying job?

Re: If Not SPAs, What?

#415
post #396

Earlier quoted context omitted.

I’m a polyglot programmer and I find quite a lot to like about JS. The concurrency model, for one, and also its multi-paradigm nature. I’d choose JS over Java for back-end glue code, and JS+HTML+CSS over Java+Swing for front-end UI and app distribution, any day of the week.

Agreed, but to be fair I suspect a polyglot programmer will still choose many other languages, outside of Java, over JavaScript.

You said, "I don't know any polyglot programmers who would consider javascript better than at least one of the other languages they use, and would [not] ditch js for those if they had the option."

Now you do.

Re: If Not SPAs, What?

#416

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?

There is AdonisJS which is a Laravel clone but in JS. I'm not sure about TS support, though.

Re: If Not SPAs, What?

#417
post #149

Earlier quoted context omitted.

For all the speed bumps PHP 7 delivered Laravel typically scores lower than Django and Rails on Techempower benchmarks. This and the reality that PHP roles typically pay 20% less than Ruby, Python or Node has led me to ignore Laravel.

Just to chime in here. Laravel is definitely not "known" for their performance.

But they never advertised being fast in terms of performance. More like fast in terms of development

Re: If Not SPAs, What?

#418
post #52

I've been building a site with Svelte/Apollo/Hasura. It's been pretty amazing so far. I think if you can get away with not needing SEO it's hard to beat. That said, something that requires a lot of thought is not just constantly displaying spinners. When I look at projects built by experienced FEs it seems like there's a lot of patterns to work around this that I'm not aware of.

> That said, something that requires a lot of thought is not just constantly displaying spinners. When I look at projects built by experienced FEs it seems like there's a lot of patterns to work around this that I'm not aware of I'm not sure what patterns you're thinking of. To me this just sounds like implementing caching and background fetching.

Yeah, it's mostly that--generally also some design stuff to hide it. It's just so tedious, or you can buy into a big framework with all the downsides that implies (big bundle size or a lot of tooling for code splitting).

Re: If Not SPAs, What?

#419

Earlier quoted context omitted.

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 neig…

> You say that serverless will cost more "to prevent noisy neighbor effects"...but that is an abstraction most cloud providers will already give you

I actually wasn't talking about serverless at any point - I understand that term to mostly mean FaaS and don't map it to things like k8s without extra stuff on top, which is closer to where I'd position microservices - a service is a combo of data + compute, not a stateless serverless function. But I agree we're not quite talking about the same things. And unfortunately I don't care enough to figure out how to line it up. :)

Org factors rather than cloud compute costs are why you go microservice rather than monolith was my main point, I think.

Re: If Not SPAs, What?

#420

Earlier quoted context omitted.

Also never underestimate the power of a single bare-metal server. Today everyone seems to be in the clouds (pun intended) and has seemingly accepted the performance of terrible, underprovisioned VMs as the new normal.

Stackoverflow -- the website that every developer uses probably all the time -- is an example of a site running on a very small number of machines efficiently. I'd rather have their architecture than 100's of VMs.

I haven't looked for a while but Plenty Of Fish (POF) also ran on the same infrastructure and the same framework - ASP.Net. Maybe ASP.Net is particularly suited to this approach?
Post reply on HN