Even though I have only been doing web development for four years, it appears to have been the most tumultuous four years in the history of the discipline. When I started out, all-in-one frameworks like Angular and Ember were all the rage. Developers were eschewing the pattern of stitching together various libraries, jQuery plugins, and lightweight modular solutions like Backbone. The promise of these frameworks was that they would create their own ecosystems of compatible components, encompassing all possible functionality.
React provides templating and data binding functionality with an HTML-like syntax and an object-oriented development style, just like custom elements. Alternative CSS syntaxes provide the use of variables and new features without vendor prefixing, just like CSS3. These features are proposed in the web browser standard, but they have only been partially available in unstable release channels, and with too much divergence between browser vendors. Until now.
ES2015 and custom elements are now supported in most major release channels (even the notorious IE and iOS). Many CSS transitions and transforms can be used without vendor prefixing in all major browsers. New features like the fetch API, localStorage and IndexedDB are reliably present as well. The features that are relevant to modern application developers are finally making it to the average user’s devices, and it is beautiful.
For me, the experience of writing an application with web components was like coming up for air after years of suffocation. There were no pre-processors. Class syntax, promises, lamdba functions, CSS variables — it was all just there. There was no build task manager, because there were no build tasks to be performed. Exceptions that were thrown pointed directly at my own screw-ups, not deep in some compiled library. Code could be tested in the browser console, because I was using the same namespace and syntax to develop as was actually running in the browser. And the few libraries I did import and use, I did so through — gasp — global script tags. How perfectly barbaric. I found myself falling in love with web development again.
Certainly it will take a few more years before large companies are comfortable taking the plunge and ending support for users that have not updated their web browsers. But a truly wonderful world awaits when they do. I hope I am correct in predicting that the complexity and code proliferation in web development, after increasing for many years, is about to take a nose dive. The features that these libraries and frameworks provide have arrived in the “operating system” itself — the web browser. No pre-processors now. Just code.
Create your free account to unlock your custom reading experience.