6 ms·
Am I the only one who simply looks at the business requirements when considering an SPA? Ive built music players, games, real-time chat apps, etc that would be
by tylergetsay 5y ago
Am I the only one who simply looks at the business requirements when considering an SPA? Ive built music players, games, real-time chat apps, etc that would be very difficult or impossible with a server side rendering app.
- pphysch 5y agoIs SPA just another way of saying "WebSockets"? I've added minimal websocket-based real-time features to what are otherwise simple serverside web apps, for example a terminal emulator. Don't need to go full SPA.
- krisrm 5y agoYeah whenever these SPA-slamming posts come up, I just try to imagine carpenters posting about why they switched to hammers from screwdrivers. They're just different tools that excel at solving different problems.
- bdcravens 5y agoAs I said in a sibling comment, the problem is that some SPA-developers then see everything as one type of problem (I said nail there, but using your analogy, screw works better). Carpenters will tell you that screws aren't really superior nails - certain applications actually hold up better with nails (interesting enough for this analogy, those with a lot of side load, where screw heads may actually shear off)
- jonahx 5y agoTo use your analogy, what if a popular screwdriver company started a trend among young carpenters to use their screwdriver handles as hammers? And then large numbers of carpenters were driving nails with screwdriver handles instead of hammers? That is where the SPA slamming is coming from. It's not that people fail to grasp the concept of different tools for different jobs.
- jack_riminton 5y agoExactly. 80+ % of all web dev jobs I see have some sort of SPA requirement I'd guess that only about 20% need to be an SPA and the rest is cargo culting
- bdcravens 5y agoYou are correct - many apps use SPAs when the business requirements don't necessitate it. I got hung up paying a loan on the Department of Education because of bad Angular on the payment form. I had to "hack" (push through a request using DevTools) a page on CVS's speciality pharmacy page to order a very important medication. (Also Angular) There are definitely apps that are only possible using SPAs. Using a front-end framework should be based on business need, not personal preference, but unfortunately, boot camps and the like are churning out developers who are being taught that every problem is a nail.
- fernandotakai 5y ago"use the right tool for the job" most apps don't need to be SPAs -- they could be normal HTML templates with a sprinkle of JS on top to make it more "dynamic".
- PragmaticPulp 5y agoI've interviewed a lot of web devs over the years. The distribution on this question is surprisingly bimodal. One group of web devs is great at picking the right tool for the job. Simple web applications get simple solutions. The complex SPA solutions only get brought out for applications that require it. The other group of web devs has learned one very specific tool and they want to build their career around that tool. The business requirements don't matter. They're going to use their favorite tool regardless of whether or not it's appropriate. The more complex they can make something, the better they think it will look on their resume. The latter group can be valuable assets if you know that your application requires a SPA and matches the person's chosen specialty. However, if you're hiring a dev who wants to build complex apps and your company doesn't require complex apps, you're going to end up with unnecessarily complex apps. Then the person will use the complex app to boost their resume and leave for another company. Fortunately, it's not too hard to differentiate between the two groups at interview time.
- wefarrell 5y ago"One group of web devs is great at picking the right tool for the job. Simple web applications get simple solutions. The complex SPA solutions only get brought out for applications that require it." You could replace SPAs with almost any technology (Queues, Kubernetes, an RDMS as opposed to BaaS, Servers as opposed to lambdas) and it would be correct depending on your own background and personal bias.
- fernandotakai 5y agoat least for me, that's the difference between someone on a senior level and someone that is not on that level yet. sometimes you just need to be pragmatic and say "this should be on an ec2 server with a simple html page -- no need for a react frontend that talks to a graphql endpoint that sends message to rabbitmq so another microservice can consume it". also, being able to accept that a simple solution is good without putting too many barriers in front of that.
- wefarrell 5y ago
- mrkurt 5y agoThe state-of-the-art in server side is simpler and, arguably, more powerful than SPA + APIs. We wrote a demo social music player with Phoenix LiveView: https://fly.io/blog/livebeats/ https://fly.io/blog/livebeats/ And Remix has another great take: https://remix.run/docs/en/v1/tutorials/jokes https://remix.run/docs/en/v1/tutorials/jokes PHP is amazingly capable too: https://laravel-livewire.com/ https://laravel-livewire.com/ Even Rails + Hotwire go a long way.
- Glench 5y agoDon't forget SvelteKit / transitional apps! Have Single-Page Apps Ruined the Web? | Transitional Apps with Rich Harris, NYTimes: https://www.youtube.com/watch?v=860d8usGC0o https://www.youtube.com/watch?v=860d8usGC0o