Hacker News new | ask | show | jobs
by finchisko 3468 days ago
I'm pretty sure I'll be minority here, but I don't use any backend framework for page rendering. All my apps are pure SPAs. They render all the screen content themselves on the client and only query servers for data. I prefer this, because I can simply take any app and deploy it to server just by copying its files. I only need to scale API servers and I don't have think about app scaling, because just single instance of nginx with proper caching setup can handle hundred thousands of clients (serving static resources is cheap and fast). Also you can take same app, package it as cordova and deploy to app/play store (although this can be probably achieved with any other frameworks as well). On the frontend I use combo of react, redux, redux-saga ...

Before I've used backbone, but react with redux is night and day difference. Even you're just starting with js, your apps will be less error prone, because of concept unidirectional flow.

Maybe this is no longer special to react/redux, but I'm really not in the age I can switch frameworks everytime some new stack arrive. React serves me well. And then, there is also react-native, which is 90% same as react so you can reuse what you have learned. Other frameworks don't have this close to native counterpart. (not counting cordova, which allows to use any fw, but performance will never be same as react-native).

4 comments

That API backend is often a Node, Python, RoR webapp. JSON output instead of HTML doesn't make much difference, only the views/templates (pick your framework's name) are different. The other code is the same.

But in some cases a SPA let's you go to a different route to Parse or Firebase backends, or Lambda/Functions. That's different.

I am wondering though ... since you are putting all the rendering load on the browser, have you had any issues with that? Slow machines, slow browsers, etc?
That's what I do as well. Except instead of React, I use Redux off the DOM. It prototypes fast and I don't run into any configuration issues
#Baller