Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Thin Clients Are the Future

DZone's Guide to

Thin Clients Are the Future

Web application architecture has changed a lot in past decade. Read on to see what these changes mean for you we applications.

· Web Dev Zone
Free Resource

Try RAD Studio for FREE!  It’s the fastest way to develop cross-platform Native Apps with flexible Cloud services and broad IoT connectivity. Start Your Trial Today!

For many years now, the sweet spot of developer productivity and user experience was the fat client architecture. In this architecture, the information is accessed through isolated layers of apps. The first layer executes directly on the user’s computer, while the other layers execute on the server.

Most Web Apps Are Fat

Embraced for over a decade, the fat client architecture was a response to a problem that is mostly gone now.

The year 2004 brought Gmail, a hugely successful email service accessed directly in the web browser. The users did not need to install any additional software to use it. The breakthrough was in the ease of use, near-instant performance, and contextual interactivity that was unmatched in regular desktop email software.

Since then, JavaScript frameworks and libraries such as Prototype, jQuery, Dojo, AngularJS, and React have polished out the concept of using a web browser as a rich application runtime environment and executing more and more code directly on the user’s computer.

Fast forward to 2017. It is now near to impossible to find a web app that does not rely on JavaScript. Dubbed the “website obesity crisis,” the appetite of web developers for running code in your browser has been unstoppable. Most web services require you to download megabytes of data just to render the basic function. Despite our superfast networks and excellent hardware on our desks and in our pockets, most business software feels sluggish and unreliable.

Two Apps For the Price of Three

Fast client architecture means that the end user interacts with an app that runs on his or her computer. That app communicates with another app (or apps) running on a server.

There are different teams building each of these apps. They work at their own pace, have different design processes, and solve different problems. However, huge amounts of time are spent on solving challenges that are only specific to this architecture.

Many features, changes, and security measures need to be implemented on all levels.

To communicate with each other, the apps expose and consume APIs that must be designed, documented, implemented, and tested. That results in tons of unseen code that is only used for binding. The amount of this so-called “glue code” often exceeds the amount of code for the actual features.

Apart from the glue code that binds the apps, there is even more repeated code. The same features are implemented on the client, for instant feedback to the user, and on the server, for storage and consistency. Small discrepancies in their implementations may lead to bug hunts that take weeks.

What Makes Us Ready For the Thin Client?

The software and hardware of today allows developers and software architects to return to the whiteboard.

A server in-memory application platform, such as Starcounter, can execute millions of data transactions per second. It can handle millions of simultaneous user sessions, with real-time data access in a fully consistent manner.

For the first time in the history of computing, we have a ubiquitous way to access information. All devices that have screens are becoming capable of rendering web content through the always connected network.

Recent specs added to the HTML standard, such as Custom Elements, Shadow DOM, and CSS Grid Layout go far beyond rendering text documents. They allow the developer to render a web app from loosely-coupled, standardized components and layouts. What once required complex frameworks and monolith development processes, now becomes just a composition of pieces that are compatible in many ways.

How to Benefit From This Improved Architecture

Using a persistent connection, an in-memory application platform, and modern HTML, you get on the bleeding edge of thin client architecture. Now, what are the benefits?

If you can ensure a persistent network connection, you win the ultimate consistency of your data with a single source of truth. No matter who accesses the information or when it is accessed, it is always up to date.

It is also real time because the client has no other choice than to display the current data. Your apps push updates of shared data to all connected clients with no special effort. However, the perceived performance of your app is affected by the network latency. The physical distance between the client and the server should be within a few thousand kilometers for the interaction to be considered instant by your users.

Now to the greatest part. With no “glue code,” the app developers have much less code to design and maintain. This means more focus can go to the work that matters. All the application logic lives on the server, and that is a huge productivity boost.

Even more importantly, it enables a new mindset. Your app executes directly where the data is. It can take insights from the complete dataset. That is impossible in fat clients because they can only operate on the fragments of data obtained upfront.

What the user gets on their screen is an HTML template and live connection to the server using a synchronized view-model. HTML is framework-less and can leverage the interactive Custom Elements created by your team or obtained from the thriving community at WebComponents.org.

Apps that run on the server can also be combined into bigger systems. The output HTML from multiple apps is merged and can be presented in a consistent user experience, in a process that Starcounter calls blending.

Get Your Apps to Customers 5X Faster with RAD Studio. Brought to you in partnership with Embarcadero.

Topics:
web dev ,optimizations ,web app architecture

Published at DZone with permission of Marcin Warpechowski, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}