Tuesday, June 25, 2013

Single Page Apps - Not your Grandparent's Thick Clients

Single Page Apps are the way to go.  They are the Holy Grail for which Client/Server has been striving since the 1990's.  Back in the the heyday of Client/Server, there was a desire to scale out applications by pushing CPU cycles to the client - distributed computing.  Technologies like COM or CORBA or RPC competed to enable applications to be installed on personal computers throughout and organization, and thus the death of the mainframe was surely imminent.

But it didn't happen.  The realization set in.  The machine-dependent code modules were nearly impossible to deploy.  Every Windows had slightly different O/S versions or MFC library differences.  Every Unix had differences in word sizes and bit orders.  organizations had more than one Operating System installed, so development required a lot of duplicity.  The platform market splintered into many small players, feracturing the development community.  People like Phillipe Khan got rich, but corporations got no where nearer their goal of removing the green screen mainframes.

With the advent of the web, the pendulum swung back the other way.  The web browser encouraged pages loaded from a server, and which submitted collected info to the server for processing.  Page submits acted very much like the old green screen apps.  But, the browsers made the apps widely available, and applications reach extended beyond the corporate walls for the first time en masse.  Now came Online Shopping, Insurance Self-Service, and Real Estate Searching.  And all was well.

But Netscape browser wanted to provide more than just statis pages whose look and feel was dictated by a back office server.  They gave us javascript, the messy, juvenile language berated by real developers.  But javascript had one tiny capability that would ultimately change the world off Application Delivery.  That feature was Xml Http Request, aka "XHR".

XHR fueled web pages could send and receive data without submitting the page.  Thick client apps could be created.  But this time, there were no deployment barriers.  The Browser platform provided an Operating System agnostic app delivery mechanism.  No installation was needed, users could run apps on demand.  The year 2010 saw the beginning of the age of the Single Page App, javascript fueled web applications that load one page and one page only - true thick-client apps.  HTML5, CSS3 and ECMAScript 5 deliver a complete thick-client platform for app development, delivered on browsers that run on any device and any O/S. 

Thank you javascript.

2 comments:

  1. I think JavaScript has been unfairly maligned over the years due to the horrid mess of "applets" that were circulating around in the early days. Even today I think people have difficulty fully wrapping their heads around the peculiar nature of a prototypical programming language like JavaScript.

    Off the top of my head I can't think of any other "major" language quite like it. The fact that nobody seems to treat it like a real language and the massive copy-pasting culture that's grown up around it usually forces everyone to default to an old-school procedural style, hence why "it sucks" in programming circles. Truth is, it wasn't designed to work that way.

    It seems to me that its potential is woefully underutilized (though this is changing as you mentioned). Maybe ECMAScript 5 will give it a fresh start.

    ReplyDelete
  2. Ha, almost forgot! And then throw in the DOM (which most programmers still have trouble understanding), a whole slew of browser inconsistencies and faulty implementations, a bunch of competing, mostly incompatible AJAX frameworks, etc. etc. and you have a recipe for disaster. It's remarkable it's lasted as long as it has. But despite everything it had going against it, I still wouldn't call it inherently messy or juvenile. It's very expressive in it's own way -- I would say it was ahead of the curve.

    ReplyDelete