Why you should prefer front-end focussed web apps

TL;DR

Javascript and the web browser have come a long way in the last few years and it's now feasible to build and maintain a complex front-end web app.  These client-heavy apps are more like native apps.  It's now commonplace for the web, IOS, and Android versions of an app to share the same code-base and be coded in the languages of the web (javascript, HTML, etc).

 


The Evolution of Javascript

In 2008 Google open-sourced it's V8 javascript engine then used exclusively by it's Chrome web-browser.

In 2009 Ryan Dahl released Node.js (a backend server built around V8), which brought javascript to the backend.   Now programmers could code the front-end and the back-end business logic in a single language.

As Node.js gained recognition and substance over the next few years (albeit in specific niches), it:

1.  Wrested control of the javascript language out of the hands of competing browser vendors and standardized it so that javascript programs could be trusted to work across popular web-browsers.

2.  Brought about an exponential evolution of the javascript language, it's frameworks, and ecosystem for both the front and back end. 

3.  Drove convergence of client and server javascript.

 

Web Browsers & Mobile Apps

Standardization of the languages, data formats and storage mechanisms of web browsers, together with increased horsepower (even in mobile devices), makes it feasible to write a web-app that lives more in the browser (and less on the server).

In short, the emergence of the modern web-browser and the dramatic, continuing evolution of javascript and it's ecosystem, makes it manageable to maintain complex front-end web-apps.  So significant front-end app are now feasible - but why are they preferable to a back-end driven app?

 

Front-end versus Back-end Dominant Apps

While native apps (developed specifically for IOS and Android for example) are considered to be the gold standard for user experience on their respective platforms, web-apps offer universal access & many distribution benefits.  While native IOS apps are coded in Objective-C or Swift, and native Android apps are coded in Java, web apps are coded in javascript.  A front-end centric web-app, especially the kind that's known as a Single Page web App (or SPA), is the closest we can get (on the web) to a native app.  An SPA web app is a viable candidate for conversion into a native IOS/Android/Windows app using tools such as Apache Cordova.

On the other hand, back-end heavy web-apps are quite unlike native apps, are are not easily converted into native apps, and/or do not look and feel like them.  When converted into a hybrid native app (generally by embedding them in a native web view) these apps feel clunky and suffer a performance penalty.  Typical, backend driven web apps employ many anti-patterns of native apps such as page loads during app navigation (instead of being everything loaded up-front).

 

The client-server Divide

Servers:

1.  are distanced (over the internet) from the UI that the end-user is interacting with and therefore

2.  are not well-suited to tracking user context and flow though an app.

3.  Represent an unnatural split in service delivery across 2 independent software systems, separated by a network, and united only by a well crafted interface specification.

4.  Must be carefully designed to scale well as user volume increases.

 

Solution

1.  Develop web-apps in the newer SPA style with the business logic in the front-end alongside the UI.  With some care it may be feasible to maintain one code-base for both the web and all native apps.

2.  The back-end servers will primarily as authorization, data backup, synchronization, and messaging engines.

This approach could pave the way to greatly reduced native-app development costs in the case where an SPA web-app is launched first and native apps are developed later.




Comments...

Click here to comment...

Anonymous