Frameworks, Frameworks, Frameworks…!
The first issue to tackle was the cross-browser chasm. Prototype, jQuery, MooTools, YUI, Ext.js, Dojo, they all provided ways to work around this horrible developer experience that was dealing with Internet Explorer 6 and later. Long before Apple introduced the
Then came Ajax, a term famously coined by Jesse James Garrett and whose initial implementation was based… on a Microsoft COM+ component called
XMLHttpRequest. Gotta love those capitalization rules.
Later came Underscore and Moment.js, to provide a better APIs for common operations, respectively for functional programming or date manipulation.
All of these libraries were the pinnacle of the “Web 2.0” craze, providing developers for the first time a tool with which to build a decent user experience across all browsers with, wait for it, a single codebase. You heard right. No more
if (userAgent == 'Netscape') and stuff like that.
Talk about innovation.
On the command line front, Node.js brought us npm, and its hellish package management fury; apparently yarn is better, but nobody can tell for sure. I wonder what is the package manager of hell called these days.
I defy any of the readers of this magazine to try to
npm update your complicated Express.js application written in 2014 and never updated since, and try to fix all of the dependencies so that the tests run again in 2021. Innovating in the field of package managers made our apps weaker and impossible to update, but of course, indefinitely rewritable.
(Well, to be honest the same problem applies to apps written –and not often updated– in Swift 1.0, Android Jelly Bean, ANSI C 89, .NET 2.0, PHP 5.3… good luck with any of those. Maybe this is the future the Agile Manifesto authors were thinking about when they wrote it. Maybe not. Move fast and break things, kids.)
Then the iPhone and Android came along.
After Joe Hewitt’s iUI there were more sophisticated attempts to turn a website into an app. jQuery Mobile, Sencha Touch (of which this author has the doubtful honor of having written a book about), and lately Ionic. Around 2009 PhoneGap happened, later renamed as Apache Cordova, featuring a badly spelled anglicised version of the name of a Spanish city. Then Apple came out with the HTML5 Application Cache, but it turned out to be a douchebag. For a while it seemed that the Financial Times was the only team in the world able to build a decent web-based mobile app.
Finally, at some point Facebook vomited React Native, which quickly became the pinnacle of absolute madness and botched user experiences. Oh, but it is cross-platform, or so they say.
Lasciate ogni speranza, voi ch’entrate. In hindsight Responsive design turned out to be a better option that any and all of those enumerated above.
Because filling HTML templates on the client is apparently more scalable than doing it on a server, hence we bothered all users with our single page applications that crippled our web experiences for a whole decade.
Finally, on the desktop, we have got Electron. Let us not say more.
Among my readership, few, if any, will remember the HTML Application and the HTML Components specificications created by… Microsoft for Internet Explorer 5. In 1998. Microsoft even came up with CSS filters before GPUs were a thing.
Of course this was also a nice vector for worms, trojans, and viruses, starting with the infamous ILOVEYOU.txt.vbs frenzy of 2000, but that is another story.
And most of them are mining cryptocurrencies anyway, not even actually serving users anymore, and the Earth, or what is left of it, is painfully feeling it.
Now we can create a full WebAssembly applications using Rust, compiling directly to WebAssembly from the confort of your command line, enjoying all the compile-time checks of the Rust compiler. You can even interact with the DOM if needed. And the weirdest of all is that you can even use Rust to re-create Flash, if so desired. The circle is closed. Neither Adobe nor Steve Jobs saw that coming.
Once written and compiled, you can run microservices written in WASM inside your Kubernetes cluster; no need to create your web services with Express anymore. They are probably very fast and probably very difficult to debug; highly experimental, hence perfect for your project with a hard deadline that would be better served with single HTML page with a PHP page behind.
Call me nostalgic, but I draft websites with Vanilla JS or Postmodernize, the greatest web frameworks ever made, and arguably, the only one needed by 99.99% of web apps out there, allowing us to manage the DOM like we used to. There are lots of tutorials and guides, and even a full academy to go back to lean, small, simple websites. Who knows, server side rendering might be cool again soon.
XMLHttpRequest is gone now; use
Cover photo by Mathew MacQuarrie on Unsplash.