Sunday, March 19, 2017

Travis Tidwell explains the web paradigm shift to "serverless"

ReactJS is built on the MEAN stack and form.io helps you make forms in a serverless architecture. Travis Tidwell gave these as examples of "serverless" in a talk at the MVPMIX. He also laid out a history of the world wide web in the name of explaining why we must take this turn in the road.

  1. Web 1.0 – the static web
  2. Web 2.0 – the dynamic web with PHP!
  3. Serverless

Alright, in this timeline, the first step is the old school Marc Andreessen's Netscape era thing in which we make a request, and we find, beyond the domain name, a specific file in a specific folder (as noted at the bit of the URL beyond the domain name) and then we cough it back up to the browser. All the content is static. In the second step we introduce dynamic content (code and databases bias what the files spit out as HTML) however maybe not necessarily with PHP but PHP sure did rule that era. So how did we jump beyond this to modernity? Well, there are two mini steps between step two and step three above.

  1. Web 1.0 – the static web
  2. Web 2.0 – the dynamic web with PHP!
    • the rise of the CMS
    • mobile first
  3. Serverless

A revolution came with the iPhone in 2008 and we realized that all of our web sites looked awful on our mobile phones. And so we started building web apps, mobile first, with an eye towards how they could look good on a mobile device. In modern times we have a new problem in which even a refrigerator can crosstalk with the web and it will have a very different interface yet from a smartphone. Instead of just doing a little extra work in making a reactive design such that a smartphone-friendly format can just "fall over" to being a laptop format we are faced with either making a way to have an app fall over to all sorts of frontend UI interfaces (not just the two anymore) or, more applicably, admitting that really each device needs its own frontend application and that really these should just chat with common API endpoints but otherwise be independent of each other. And there it is: "serverless"

The head comes off! "Serverless does not mean your application does not need a server. It means your application has been LIBERATED from the server." was a quote, I think on a slide, during the talk. Serverless forces us to build web sites and web applications which are completely standalone. We need to have an "offline mode" for these which really means "out of network" as you could be offline whenever you are not on the corporate intranet, right? That doesn't mean you still shouldn't be able to work? No, no, no. The ability to cache local changes at then sync them up to the ultimate authority when the ability to speak to God arises was something I first saw at the @hand corporation. They got this right. Offline does not mean marooned or stateless. Travis recommends JWT tokens for load balancing at the servers and Vue.js for a MVVM pattern at the UIs, but these can be what they need to be for your needs. Also, bits of the UI can be fed from different things. Perhaps one rectangular section of content on a web page is fed from your API endpoints while another is fed from Google maps and a third from Twitter. Whatever.

No comments:

Post a Comment