3 ms·
SPAs become necessary when the user experience requires bells and whistles, like cross-widget consistency of like/friend request counts (the original use case o
by btown 8y ago
SPAs become necessary when the user experience requires bells and whistles, like cross-widget consistency of like/friend request counts (the original use case of React IIRC).
It's not "you ain't gonna need it," it's "you are gonna need it, users will judge you by your fluidity, sure it's overkill right now, but the overhead may be less than the pain of a frontend rewrite since you may need it soon."
I've often thought that if there was a way to gradually codegen a fluent React codebase from Django/Rails/Laravel server-focused frameworks, and move template-by-template into a rich frontend + API, a lot more people would start with those server-focused frameworks, because there wouldn't be a need for a full rewrite. It would be a holy grail for our industry and let us develop business apps way faster. Not an easy problem to solve. Email me if anyone reading this wants to chat though!
- ljm 8y agoThe underlying concept of React is so intuitive that I would hope that browsers provide a native implementation. Use a `<script language="jsx" />` tag or something so you still have the old fashioned API.
- socceroos 8y agoWeb components
- tdeck 8y agoDoesn't it ever backfire though? I've used plenty of SPAs that shouldn't have been, forcing me to wait for the page to load twice and increasing frustration. If they'd just stuck some AJAX where appropriate the experience would be so much better.
- peteforde 8y agoI guess the main issue to be argued here is a poorly defined "it". What does every app need? State management? Lightning-fast interface updates? Counts incrementing in three places at once? For the 10-20% of apps that get built in React/Vue that actually "need it", I believe that 90% of them would be better served by Rails + Turbolinks 5 + Stimulus. Most of the people who rally behind the SPAs for everything mindset came up at the peak hype moment for React and friends. There's an unfortunate tendency to believe that the thing you're thinking about right now is more important than it actually is. If you're not working at a large company, you most likely do not need these tools. Nobody is going to come in the night and take them from you, but boy, everyone would iterate a lot faster if they didn't spend so much time bikeshedding and obsessing about state mutation.
- timw4mail 8y agoNo. Overly complex interfaces are part of the problem.
- yyt_x 8y agoThat sounds exactly like the Rails + Vue setup we are using on our current project. Its basically 90% of a standard admin style interface which we had up and running in lightning speed using the great, but boring activeAdmin. For the couple of pages that are very interaction heavy we serve a per-page Vue app. It really does feel like the perfect combo.