re: I have been a professional developer for 31 years and I'm 53 now, Ask Me Anything! VIEW POST

re: Hi John, thanks for the AMA. As you are a frontend developer, I wanted to ask you this. What do you think, about the latest trend in the fronten...

Let me handle the last one first. I love(d) jQuery, it was wonderful, however, it's time is past. The things it offered: more uniformity of function calls across browsers, some fixes to areas where a particular browser lacked a feature it could polyfill, promises, wrapping for XMLHttpRequest, etc. have all been addressed by browser makers over time (for example, better browser standards, ES2015, and fetch). I don't know anybody who starts a new project and frets about which version of jQuery to use nor do they add it as their very first file in the project, as they once would have. It's obsolete.

I bring all of that up because I feel like the underpinnings of AngularJS, Angular, React, and Vue.js are likewise obsolete. They are working hard to emulate the idea of creating custom elements and add support for them to your browser, Angular even tries to do some of what the Shadow DOM does, but it's already there! Chrome and Safari (both desktop and mobile flavors) support Custom Elements and Shadow DOM. Opera does too. Firefox has it in active development and Edge will inevitably have to follow suit. So, when every browser has support for it near the end of 2018 (maybe Edge still needs the polyfill for a brief period), why start with something that is slower and devoting a significant amount of code to trying to do something the browser already does and better.

What I think makes a lot more sense is for all of these libraries to follow the Node.js model. Nobody says, "Oh man, I so love developing in raw Node.js to build my servers!" They enjoy the fact that they can start a project simply and call on 700k bits of middleware to give them everything they might need from logging to blockchains and from data storage to sockets.

Custom Elements does not define anything about how you map strings in the HTML attributes to variables (binding in other words), nor how you render your components, nor how (and if) you map between attributes and properties on your elements. So that's where all of these projects can jump in to fill those gaps in their own ways with small pieces of code that still feel like and work like Angular or React or Vue, but leave some of the basic functionality to the browser where it belongs. Polymer has done this in the past but is really doubling down on it with their new LitElement. The code for that middleware is just 5k but it gets you templating and attribute/property handling. You could easily get off-the-shelf components out of a catalog that used LitElement and feel comfortable including them in your application even if you're using some other thing for your own components.

This is the vision I have for future web development. Me being able to draw from a large set of common components that work well and which I can mix and match with what I use day-to-day. Today, you're generally only Angular or only React or whatever.


Thank you for the detailed reply John. You've cleared a lot of doubts Ive had for some time.

code of conduct - report abuse