The web development community is engaged in a heated debate about the necessity of Single Page Applications (SPAs) for building modern web applications, with many developers questioning the industry's default approach to web development over the past decade.
The Case for Traditional Multi-Page Applications
A significant portion of the development community is rediscovering the benefits of traditional Multi-Page Applications (MPAs) enhanced with modern techniques. Developers report achieving impressive results with simpler tech stacks, notably through proper use of browser caching, Cache-Control headers, and strategic asset management. The approach of using hash-based filenames for static assets combined with appropriate cache headers has proven particularly effective for achieving fast page transitions without the complexity of SPAs.
Dependency Management and Long-term Maintenance
One of the most compelling arguments against default SPA adoption comes from the maintenance perspective. Developers are increasingly concerned about the sustainability of complex dependency trees in modern JavaScript frameworks. A striking example emerged from the community discussion:
I checked the vue project and it has 1500 transitive dependencies. The new stack has a whopping total of 7. On top of that there is no build step to maintain. Also it's straight up way faster.
The Rise of Hybrid Approaches
Modern development is seeing a trend toward hybrid approaches that combine server-side rendering with selective client-side interactivity. Frameworks like HTMX and Alpine.js are gaining traction for allowing developers to add interactive features without the full complexity of an SPA. This approach particularly shines for applications that don't require the level of interactivity found in applications like Gmail or Google Docs.
Browser Capabilities and Modern Standards
The browser landscape has evolved significantly, with modern browsers now supporting features that were once exclusive to SPAs. Cross-document view transitions, service workers, and advanced caching mechanisms have made it possible to achieve smooth, app-like experiences without the overhead of a full SPA framework.
A registered service worker enhancing a web application's performance and capabilities in the browser |
Conclusion
The community's experience suggests that the choice between SPAs and traditional approaches should be driven by specific application requirements rather than industry trends. While SPAs remain valuable for highly interactive applications, many web applications could benefit from simpler, more maintainable approaches that leverage modern browser capabilities and thoughtful architecture decisions.
Source Citations: You Can't Build Interactive Web Apps Except as Single Page Applications... And Other Myths