Live data from Hacker News

You probably don't need a single-page app

journal.plausible.io

141–150 of 522 posts

Re: You probably don't need a single-page app

#141

I tried the other day, yet again, to give it a go. You know, firing up VS Code and make an app with express, node, react bla bla bla. Coming from the .NET toolchain and expecting a lightweight, easy to start with approach I was yet again totally shocked. The hundreds of possible directions you can go in, in terms of frameworks, packages and what not is ludacris. I stopped working when my node modules directory topped…

You could use Blazor to export to webassembly, but it includes the entire .NET runtime, so the payload is huge. It's a bit silly to say you quit when you topped 60mb in your node modules directly, something you never have to look at and doesn't represent what gets built in to the final app. There's tons of dependencies when dealing with the .NET toolchain. There are hundreds of directions you could go in, and I consi…

Microsoft said they are optimizing the huge payload with tree shaking and other techniques.

Re: You probably don't need a single-page app

#142

This. So much this. My company (4,500+ people) ordered all products in their portfolio (~12 web apps) to migrate to SPA front ends about a year ago as a way to stand out from our competitors, and boy has it been painful. Prior to that initiative, we had been using the hybrid approach mentioned in this piece, embedding SPAs only where necessary and sticking to SSR everywhere else, which worked really well. Since the a…

I don’t disagree here at all, but I would note that generally server side templating is often a mish mash of business logic, view logic, accessing query string and session parameters, and whatever server side Singleton/globals available in the template context, that becomes horrific spaghetti in no time at all. Compared to client side rendering discrete web requests with minimal templates; you usually get much better…

This separation of concerns is also good if you have both a web app and native mobile app. The server side ideally puts forth an API useful for both;

Re: You probably don't need a single-page app

#143

Earlier quoted context omitted.

I understand the toolchain juuust fine. I have been making HTTP and browser applications for two decades. The technology landscape is absolutely ridiculous if you want to do things for the web. Each browser has its own standard, chrome is the new IE6, the industry is hacking together assembly languages to port from other technologies, preprocessors, minification, state and what have you not. The web today had been tw…

Seems like you're just looking through the nostalgia filter. We're in a lot better place than we were a decade, let alone 2, decades ago.

Also, seems like they're complaining that client development is hard. And then comparing it to their familiar back-end stack. .NET is far from simple.

Re: You probably don't need a single-page app

#144
post #22

Earlier quoted context omitted.

Native will always be the best solution... Because it's native.

Technically best doesn't always win the market. I'd love not writing 3 versions of every piece of functionality.

> not writing 3 versions of every piece of functionality.

React Native and ReactJS are a move in the right direction.

I wonder if we'll get React NativeJS

Re: You probably don't need a single-page app

#145

This. So much this. My company (4,500+ people) ordered all products in their portfolio (~12 web apps) to migrate to SPA front ends about a year ago as a way to stand out from our competitors, and boy has it been painful. Prior to that initiative, we had been using the hybrid approach mentioned in this piece, embedding SPAs only where necessary and sticking to SSR everywhere else, which worked really well. Since the a…

I don’t disagree here at all, but I would note that generally server side templating is often a mish mash of business logic, view logic, accessing query string and session parameters, and whatever server side Singleton/globals available in the template context, that becomes horrific spaghetti in no time at all. Compared to client side rendering discrete web requests with minimal templates; you usually get much better…

I could make the reverse argument: bad frontend programmers who dont use the facilities available to separate concerns create unmaintainable spaghetti when good backend programmers who separate concerns properly produce beautiful maintainable code.

The key being bad programmers dont isolate concerns and good ones do.

Re: You probably don't need a single-page app

#146
post #22

Earlier quoted context omitted.

Native will always be the best solution... Because it's native.

Technically best doesn't always win the market. I'd love not writing 3 versions of every piece of functionality.

wxWidgets would help with that.

Re: You probably don't need a single-page app

#147

> Gulp, CoffeeScript, BackboneJS, and SASS, all of which have been superseded by newer tools. Avoid the Javascript fatigue by not relying so much on Javascript! What ? These are all javascript things, right ?

That was his point. The rails stuff he learned five years ago is all still considered good practice, but the JavaScript stuff he learned (listed above) is now considered antique.

Re: You probably don't need a single-page app

#148

Earlier quoted context omitted.

You don't have to deal with any of that crap when you deal with react. Just write pure functions as components. The arguments are the props.

Then you aren't benefiting from React at all. The point of React is DOM diffing, which you trigger using setState method.

When you change the props of a component it re-renders.

Just because you use pure functions doesn't mean you don't get DOM diffing, that's silly.

Re: You probably don't need a single-page app

#150

I have modest skills as a developer. I was trying to convert an old static web site into something more interactive. Without really thinking it through, I started building a SPA. I got stuck on the SEO part. I found it innately complex, but the real trouble came from trying to bring together the disparate sections of the old static site while preserving and abetting SEO. One day I just ditched the SPA and rebuilt the…

React Server Side rendering with Next.js is the best of both worlds.

You get streamed JS, with pre-rendered HTML for SEO.

Post reply on HN