Live data from Hacker News

If Not SPAs, What?

macwright.com

221–230 of 456 posts

Re: If Not SPAs, What?

#221
post #130

Earlier quoted context omitted.

Rails doesn't give you auth* though.

I can imagine people thinking Devise is Rails' own auth, given how popular it is.

well, whenever I did rails, that was pretty standard. Laravel's baked in auth, is probably why it's so much better than rails, that and queues, telescope, etc... all the nice to haves that come standard in laravel that are extra in rails apps.

Re: If Not SPAs, What?

#222
post #197

I have a theory. In the old days web development was looked down upon by "real" programmers. But then the WWW really took off and people started moving over from the C/Java world into the world of JavaScript. These are the people that insanely complicated web development when they tried to make it as complicated as the development world they came out of.

JS is quite a hacky language. Trying to turn it into Java neuters some of the benefits of being hacky (I'm looking at you, Typescript). But at some point, it's neither a hacky Lisp like language, nor is it stable like Java or C++. It's just a middle ground that does these things poorly. It would be nice to have a new programming language from scratch built to handle all the async/reactive mess. But until then JS is o…

I hear this so often, so as an exclusively js/ts dev I have to ask... what about this is “done poorly”?

```

try {

  return await fetch(url);
} catch (e) {

  handleError(e)
}

```

Because that (metaphorically speaking) is 90% of what I write. Throw in the occasional closure, `map()` or `reduce()`

My day to day headaches are never from TS, and always from unpredictable DOM api/layout/style behavior.

I guess I just don’t have any frame of reference for how “nice” a language can be. Is it just that JS has so many “bad parts” and footguns that I’ve gotten good at ignoring?

Re: If Not SPAs, What?

#223

I used Turbolinks for the first time on a new Rails app about 2 years ago and was floored by the impact - it felt like a SPA in terms of no page loads and overall speed. I'm convinced that this is the solution for the majority of use-cases, combined with selective usage of either React components or something like Stimulus where you need more sophisticated UI components.

Is there an equivalent of Turbolinks for something like Django? Or even for MVC PHP apps?

most people using livewire on laravel also use turbolinks, it's just a javascript plugin, it's not rails specific.

Re: If Not SPAs, What?

#224
post #172

It's interesting to me that in video games we talk less about frameworks than we do engines. Doing a few tutorials, I was shocked at how little code I had to write these days with something like Unity or Godot. Breakout indie success stories are often lead by artistic types, since it seems harder to teach a typical programmer to draw than to teach an artist enough code to get by. And I think the scene is richer for i…

A case of maintainability? Most games (although its changing these days with loot boxes, and micro-transactions) don't really change ultimately in large ways after the initial development.

A website, often these days, is an ever evolving beast forever changing and adding features to it is (apparently) imperative to ensure that the gravy train keeps flowing. Its one of the reasons why I think there's an increased focus on developer productivity in web frameworks, libraries, and tooling rather than a focus on delivering a better solution.

Re: If Not SPAs, What?

#225
post #4

I am going to advocate the other way: https://qbix.com/blog/2020/01/02/the-case-for-building-clien...

Server is timing out.

E: Actually it might just be a really heavy page. It’s a disaster on mobile.

E2: After a few refreshes, it seems to be loading normally.

Re: If Not SPAs, What?

#226
post #148

If not SPAs, and hear me out on this one, how about... Native applications

Yeah, no thanks. There's a reason we abandoned them in the first place. I've never heard of anyone who's itching to go back to Swing.

Are you referring to Java Swing? Because Java is not native. But please let me know if there is another Swing that is.

Re: If Not SPAs, What?

#227

Earlier quoted context omitted.

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.

It’s remarkably efficient and simple: https://stackexchange.com/performance For those who are discouraged by the massive complexity of Kubernetes/Terraform and various daunting system design examples of big sites, remember you can scale to a ridiculous levels (barring video or heavy processing apps) with just vertical scaling. Before you need fancy Instagram scale frameworks, you’ll have other things to worry about l…

This is indeed the standard example I refer to to prove my point, and all my personal projects follow this model whenever possible. The huge advantage in addition to performance is that the entire stack is simple enough to fit in your mind, unlike Kubernetes and its infinite amount of moving parts and failure modes.

Re: If Not SPAs, What?

#228

I think if Chrome changes to the omnibox really click. The need for SPA in general will dwindle. You cannot see the URL so if it is ugly who cares. And if the page refreshes fast enough most end users will not be able to tell you are on a SPA or not.

What is displayed in the URL has nothing to do with SPAs. Go to Twitter. It is an SPA. The URL changes on every click, just like basically all modern SPAs.

Re: If Not SPAs, What?

#229
I use Clojuresript with a react interface to create SPAs for data analytics UI at work. It is much simpler and easy to manage. For me developing applications with javascript tend to get complex over time as the app grows. State management is really simple in Clojurescript. I was able to create reusable components which can be ported over to new projects with little effort. I now find it much more easier to develop the front end in SPA format with CLojurescript rather than rendering the UI structure with server side stack. The app tends to act a lot more faster with SPA as you see in this video https://www.youtube.com/watch?v=islPRG2_1vU
Post reply on HN