News for hackers. Stuff that matters.
Re:You probably don't need a single-page app by brazzy on Sunday February 17, 2019 @01:52PM (#19186085)
You overlooked this part:

> Not only that, but extending these UIs will take more time in the future than their SSR versions due to the added complexity of the front end frameworks

Re:You probably don't need a single-page app by ivanhoe on Sunday February 17, 2019 @04:09PM (#19186930)
You simply trade back-end frameworks complexities for the front-end framework complexities. With the right architecture there is no huge difference IMO, just of course you also need to upgrade your teams so that they can handle a lot more tasks on the front-end than with SSRs (and you'll probably need less back-end devs)
Re:You probably don't need a single-page app by tspike on Sunday February 17, 2019 @06:22PM (#19187550)
Front-end frameworks have a way of going in and out of fashion / support much faster than backend ones.
Re:You probably don't need a single-page app by ivanhoe on Sunday February 17, 2019 @08:31PM (#19188054)
There was indeed a moment few years ago when front-end frameworks/libs were changing at warp speed, but last year or so I think the situation crystalized a lot. You now have React and Vue as major players and Angular competing for the 3rd place against some fresh libs... and I don't see that changing anytime soon.
Re:You probably don't need a single-page app by jes5199 on Sunday February 17, 2019 @10:24PM (#19188393)
yeah, you have React, but which of the 30 fashionable state-management libraries are you using? Typescript or Flow? What version of JS syntax? What compiler what minifier? oh hey, half of these just stopped being maintained without warning
Re:You probably don't need a single-page app by wolco on Sunday February 17, 2019 @08:43PM (#19188101)
Every year this is said like burning man is dead.

I predict a bigger react ecosystem. The slide of vue but the raise of the Quasar framework for apps. The rise of Angular once again.

Re:You probably don't need a single-page app by rat9988 on Monday February 18, 2019 @04:25AM (#19189514)
I have always felt as angular was the second major player and vue the one in the 3rd place.
Re:You probably don't need a single-page app by ivanhoe on Monday February 18, 2019 @04:16PM (#19194528)
It's possible, especially if you look primarily at the enterprise market. From where I stand (startups, SMEs) it seems like a lot of people moved from Angular 1.x directly to Vue, skipping Angular 2+ versions. I haven't been offered any Angular projects in about 2 years, while React and Vue are really popular. But it's just my perspective, global situation might be different.
Re:You probably don't need a single-page app by braindouche on Wednesday February 20, 2019 @04:45PM (#19212304)
This has also been my experience. Enterprise systems really went all-in on Angular 1 for some reason (I personally suspect because it bridges reactive and MVC), and when it was time to move to a fully-reactive front-end framework, in my opinion Vue and Angular 1 are similar to each other in a way that React is not similar in relation to either of them or Angular 2+.

I still can't quite put my finger on why Angular 1 and Vue rhyme, though. It's common wisdom that "If you know Angular, you'll pick up Vue quickly", and it seems to be true, but nobody has ever explained to me why. Is it the state management? Reliance on viewmodels? How they're more complete systems out of the box and can be reasoned about holistically? Help a girl out, HN.

Re:You probably don't need a single-page app by sovietmudkipz on Sunday February 17, 2019 @08:54PM (#19188134)
Not only that but you have to reinvent SSR with front end frameworks. Why do something simple when you can make it 10x as hard but ultimately end up with the same result.
Re:You probably don't need a single-page app by BigJono on Sunday February 17, 2019 @10:37PM (#19188438)
I mean, I think these SSR front-end frameworks are a pile of crap, not worth the added complexity, and I hate using them; but it's pretty clearly not the same result. The problem they're solving is not "render on the server side", it's "render on the server side for the initial load then inject a fully functioning SPA for subsequent loads".
Re:You probably don't need a single-page app by qudat on Monday February 18, 2019 @12:34AM (#19188823)
I'd rephrase: Front-end frameworks have been progressing through an iterative process, browsers are adopting standards that make them more consistent, and the tooling have been advancing at a rapid rate.

FE is a vibrant ecosystem and the tooling, in my opinion, is some of the best I have worked with as a SE.

Re:You probably don't need a single-page app by kangoo1707 on Sunday February 17, 2019 @07:48PM (#19187900)
Not at all, people moves between libraries of the same framework, they will likely refactor jQuery mess into a framework, but it's unlikely for a team to move from React to Vue or Angular (and vice versa).
Re:You probably don't need a single-page app by em-bee on Monday February 18, 2019 @07:16AM (#19190147)
you don't have to follow every trend. stick to one framework until it is no longer suitable. since 2012 i have learned to work with exactly two frameworks. i started with angular 1, and switched to aurelia when angular 1 was no longer viable. i'll stick with aurelia until it has run its course.
Re:You probably don't need a single-page app by dotancohen on Monday February 18, 2019 @01:44AM (#19189003)
Yes, but front-end developers are much more fungible as well.
Re:You probably don't need a single-page app by yellowapple on Monday February 18, 2019 @02:21AM (#19189097)
Not if you've built your product around a front-end framework that's gone out of style.
Re:You probably don't need a single-page app by dotancohen on Monday February 18, 2019 @02:43AM (#19189158)
Remote workers are good for this scenario. My current employer is maintaining an outdated backbone.js app, thankfully I'm not on that team.

We have one guy in the office responsible for all of it, as warm bodies with backbone experience are impossible to find. However, should we decide to employ remote workers, we can easily find developers with backbone.js experience from Romania, Lithuania, India, and Pakistan who would work for a pittance and be grateful for the opportunity.

Re:You probably don't need a single-page app by armandososa on Sunday February 17, 2019 @04:59PM (#19187176)
Also, on the majority of SPA frameworks you have the notion of components which makes making the UI a lot simpler than with traditional SSR abstractions (templating and partials are not sufficient).
Re:You probably don't need a single-page app by Existenceblinks on Monday February 18, 2019 @04:44AM (#19189592)
Or your backend template engine is weak. In Elixir, EEx used in Phoenix, every template is a function. It's not supper good, but it's component (I hate term "component" and prefer "function")
Re:You probably don't need a single-page app by pennaMan on Monday February 18, 2019 @07:07AM (#19190123)
But a component is a function that satisfies certain properties, why would you prefer to not to be precise in your communication? Do you call squares rectangles because you hate the term "squares"?
Re:You probably don't need a single-page app by Existenceblinks on Monday February 18, 2019 @11:55AM (#19192042)
In my example, it's very precise that a template _is_ definitely a function. And conceptually I still think of it as function.

For your example I'd call it "squares" not because I don't hate it, but I don't think squares has something to do with "component"

Re:You probably don't need a single-page app by yellowapple on Monday February 18, 2019 @02:19AM (#19189091)
The complexities of back-end frameworks are far less than the complexities of front-end frameworks in my experience and observation (in particular because the latter tend to needlessly reinvent half of a web browser). Additionally, the back-end complexities still exist when using front-end frameworks (unless you don't actually have a back-end, of course).
Re:You probably don't need a single-page app by krferriter on Sunday February 17, 2019 @06:49PM (#19187656)
"You simply trade back-end frameworks complexities for the front-end framework complexities"

Not necessarily, you can have simple and modular front-ends while also having less complex back-end frameworks. The question is between SPA and non-SPA web applications, not between SPA and JSP/PHP.

Re:You probably don't need a single-page app by sirsuki on Sunday February 17, 2019 @05:11PM (#19187237)
Is there any possibility that the added complexity is a symptom of the framework in use and not a general problem with ALL frameworks? I know I've experienced many projects and found server side rendering more complex then client side when using frameworks like Ember.js.
Re:You probably don't need a single-page app by andrewfong on Sunday February 17, 2019 @06:11PM (#19187496)
I'm a front-end engineer, but I'd agree that SPAs are always more complicated than a pure SSR solution: You're inherently doing more. You're probably already tracking state somewhere on the backend (e.g. in a database). An SPA means you now have to track state on the front-end too.

There are benefits and things you can do with an SPA that you can't do with pure SSR, but they _do_ come at a cost. TANSTAAFL.

Re:You probably don't need a single-page app by collinmanderson on Monday February 18, 2019 @01:53PM (#19193161)
TANSTAAFL stands for: There ain't no such thing as a free lunch

But I agree, that seems to be my impression. Single Page Apps allow higher quality User Interfaces (if done right), though they do require more work.

Re:You probably don't need a single-page app by Touche on Sunday February 17, 2019 @05:59PM (#19187444)
It's a symptom of the SPA architecture. Since you give up a lot of basic functionality by not using multiple pages, that same functionality has to be reinvented.
Re:You probably don't need a single-page app by chrisco255 on Sunday February 17, 2019 @03:18PM (#19186596)
That's pretty debatable. I've worked on some gnarly SSR architectures and making changes to the front end almost always involves refactoring some of the backend as well.
Re:You probably don't need a single-page app by guscost on Sunday February 17, 2019 @08:09PM (#19187984)
But this claim is simply wrong in a large percentage of cases (at least among the “web application” projects I have seen firsthand).
Re:You probably don't need a single-page app by dimgl on Sunday February 17, 2019 @05:32PM (#19187319)
Yeah, I don't buy that. React and Vue are dead simple.
Re:You probably don't need a single-page app by Silhouette on Sunday February 17, 2019 @06:44PM (#19187641)
React and Vue are dead simple.

But if the comparison is with more traditional SSR sites, React and Vue are also not doing everything the back-end was doing before.

Re:You probably don't need a single-page app by Existenceblinks on Monday February 18, 2019 @04:48AM (#19189605)
When you talk about React and Vue it should mean React ecosystem or Vue ecosystem, not view layer. Then noting is simple.