2 ms·
JS is evolving so developers want to take advantage of new features while still supporting old browsers, which makes complicated pipelines mandatory. Should dev
by spriggan3 11y ago
JS is evolving so developers want to take advantage of new features while still supporting old browsers, which makes complicated pipelines mandatory. Should developers stick with ES5 instead ? I personally like using classes instead of prototypes as it makes my code more readable. fortunately I can develop with a browser that supports a lot of ES6 features so the pipeline is only mandatory for staging,testing on old browsers and production.
Next working with Raw DOM nodes when you have to develop a complex single page app isn't really efficient. You need a way to write reusable components, these components need to be composite, and need to take care of their own life cycle ( registering, unregistering event listeners,...) . So basically it means creating a component system on top of the DOM. The DOM wasn't created to build complex applications, therefore it needs to be abstracted in some ways.
The alternative is to do everything on the server, and fetch HTML fragments to update the page through ajax when a specific event is dispatched. Sometimes that solution scales, sometimes it doesn't.
ES6 by the way makes working with the DOM a bit easier, and ES6 modules will help developers moving away from monolithic frameworks.