3 ms·
I recommend reading my comment again, it's not about what each approach can and cannot accomplish technically, it's about maintainability. I can give examples
by voidr 11y ago
I recommend reading my comment again, it's not about what each approach can and cannot accomplish technically, it's about maintainability.
I can give examples of a lot of things that SPA's can't do, that's not the point.
I also don't think, you should either build everything on the backend or everything on the frontend, I consider both approaches to be equally bad.
SPA's do not help split responsibilities, I can easily give the SPA a low level Data API and start implementing data processing functionalities in the frontend.
SPA's don't help build services, good frameworks do.
SPA is a religion, cause it states 'Single Page'. What if I want to have an application with 2 or 3 pages just because it doesn't make any sense whatsoever to cram everything into 1 page? What if I can render a lot of stuff on the backend and be 100x more efficient and provide far superior UX?
I had a colleague once who wanted to do everything on the client side, he said that the SPA is the way to go. He got 6 months to prove his approach is good. He failed. His application was both slow as hell and nobody on the team could maintain it. So after he left it took me roughly 2 months to implement what he had in 1/5th of the code.
- ChicagoDave 11y agoI'm sorry, but my take on your comments is that you haven't actually been on any SPA projects (yet). Having been on several over the past two years, I have a clear understanding of the trade-offs, benefits, and complexities. I was very skeptical two years ago, but that skepticism has been mostly eradicated. Sure, if you have bad programmers, no pattern will save you. But if you want speed, agility, and separation of concerns, SPA + services is currently the way to go.
- voidr 11y agoI have been on SPA projects and I have made SPA's myself as well. If you want speed, agility separations of concerns, MVC is the way to go. Most of the things you said are MVC and SRP, it has nothing to do with SPA, this is what I have been trying to explain. SPA stands for "Single Page Application", it doesn't specify anything beyond that, your code could be utter garbage with everything mangled together, and it's still technically a SPA. MVC on the other hand does specify how to organize your code. I think the problem here is the SPA terminology itself and the way it's being used and marketed.