There are lots of considerations in answering that usefully. Fit for the particular problem domain is one of them, yes. But so is familiarity. And ease of hiring. And performance, stability, maturity, state of tooling, community, training resources and a zillion others. How do you balance all those? Wait, let me guess, "correctly".
Sorry about the snark, this has just been a personal peeve of mine ever since the Slashdot days, when any word salad whatsoever would get upvoted Insightful provided it contained the magic phrase "right tool for the job".
I think it’s an appropriate response to blanket advice on choice of tech stacks.
I was on a team recently that only wanted to do Rails apps. They only wanted to make monolithic apps. Any mention of a more modular design would be met with derision. I don’t think this attitude is unique, though. And it’s really hard to overcome and see balance when the entire team clearly has no interest in changing or updating their skill set.
If you put your app logic in something like Redux it'll work on server-side rendering, client-side rendering, and can be included in react-native down the line.
In the time the author re-wrote his app, I could have gotten the same benefits with SSR and ported it to react native. But yeah, javascript bad REEEE
Are you saying that rhetorically? In my experience, React is no silver bullet (e.g. different router and styling mechanisms for RN), trickiness dealing w/ timezones in SSR, etc.
And besides, the point here was largely about bundle size and fast time-to-interactive. Next.js optimizes a lot for developer experience, but you're definitely still going to be shipping a pretty sizeable JS bundle with slower characteristics than a hand-coded "closer-to-the-metal" thing.
No.
> And besides, the point here was largely about bundle size and fast time-to-interactive.
As long as the point wasn't to be productive I'll just mind my own business.
Not a day, but probably a week of debugging. Each and every suggestion you made in your comment makes the deliverable tremendously more complex, is very expensive, will need ongoing maintenance, and is ultimately not needed.
Javascript apps are tremendously complex, why would do this if you don't have to?
If you already know Rails I'd say use that. If you only knew ruby then reaching for rails would be overkill. But if your business requirements need the features of Rails, learn rails instead of rolling your own framework..
I thought people use Rails mainly because they like it or are thrown into a team that already uses it.
I'd be fine to just use Rails for something like that since I'm quite familiar with Rails, but I would never recommend it to someone who doesn't know it.
The author is clearly experienced in UI development. The app was already written in React/Redux. So honestly, yeah, just install next.js and fix your routes.
This solution would be a complete non starter for any professional project in terms of accessibility - there's a few issues screen readers would run into with this. Not only that, but good luck getting other developers to sift through your spaghetti code.
But the main thing is, the authors goals are somewhat pointless. If you don't want a SPA then just use jQuery. The author ended up using plugins anyways so the whole story was aimed at people who don't know front-end but latch onto this idea of javascript is baaad. Don't be that guy.
So to recap. If you don't know javascript, and you don't want to learn the standard tooling - please don't roll your own framework and blog about it.
Edit: looks like someone already commented this on his blog. This is all you need to know: https://dev.to/isfotis/comment/9c7k