Sunday, October 27, 2019

A Farewell to SPAs


A medium-high complexity user interface includes many dozens of forms, and most of the time it has to manage big tables bound to highly interactive grid controls. In technical terms this does require creating, updating and deleting thousands of memory objects with high speed, and in a manner to keep the system responsive and protected from excessive memory fragmentation.

Pacifying the client device's responsivity with network round-trips and garbage collection cycles has always been a pain, and in this iron triangle of software architects the browser-based web applications are part of the problem rather than the solution.

The proliferation of the layered software architectures did not cure any major problem related to the user interfaces. Migrating a monolithic solution from WebForms to MVC does not enforce developers to sanitize the front-end.

Regardless of whether the UI forms are generated by the middleware or by client-side JavaScript, ignoring the fact that client-side memory management has low scalability is like shooting ourselves in the foot.

For a newcomer in web programming a SPA front-end sounds excellent, because by employing a JavaScript framework he or she is feeling able to offer great user experience. And he or she is right in case of software solutions which require very basic user interface.

In all the other cases the end-users are going to be faced with the infamous side effects of too many memory objects to be managed by the browser or even the local operating system.

I agree with the Z generation regarding the client-side form templating, but I want to see each complex form or table in a new browser tab, which is closed automatically as soon as possible. Nowadays each browser tab is running in its own process, and closing a tab is a very efficient way to clean up the memory garbage produced by the tab's owner process.

Instead of a SPA driven by a monolith I'm after a bunch of pages driven by services and microservices. Saying farewell to solutions based on a unique SPA is a "when" question, because growing client or server-side monoliths is invitation to problems.