Oct 30, 2018

JavaScript and “Thin Server Architecture” (TSA) trends

With the introduction of HTML5, CSS3 and fast JavaScript engines, modern browsers have become a powerful platform. HTML5 provides many new standard capabilities for defining the DOM, persisting state locally and communicating with servers, while CSS3 enables a wide range of layout, style and even animation modifications to render the DOM — whole sections of CSS can be conditionally applied depending on client screen size and type of device. JavaScript is no longer a toy but a significant runtime that enables large and complex programs to modify the DOM dynamically, perform business logic and communicate with servers in any number of ways.

These changes have given rise to a new architecture, called "Thin Server Architecture" (TSA), that moves all of the UI logic of a web application — model, view and controller — from the server to the client. So called "single page applications" are now common, where the entire application is downloaded as a single HTML file, with JavaScript controlling flow and hiding and showing parts of the DOM as needed.

JavaScript has a vastly expanded role and, naturally, many libraries and frameworks have appeared, starting the process of building the layered software architectures we are so familiar with, but now in the browser. The variety of libraries in this space is now bewildering and expanding at an extremely rapid pace, requiring strong JavaScript skills and a very significant investment to select a stack.

As a consequence of TSA, the server's role is shifting from hosting application controller logic (and lots of web pages per application), to serving data — often backed by business logic — using standard protocols such as REST, WebSockets and Server-Sent Events, all of which are available to browser based clients.