5 ms·
JS in general moves fast and packages range from great to WTF in quality. I would suggest using Babel(or something similar) for all future JS development. That
by matwood 11y ago
JS in general moves fast and packages range from great to WTF in quality. I would suggest using Babel(or something similar) for all future JS development. That way you can use ES2015/2016 features now and have them work in most environments.
I have a built a small API using express and passport and so far these node changes have not impacted my code.
Another option for fast API development is Java 8 with SpringBoot and Jetty. People hate on Java and Spring, but the latest versions of both are very powerful and easy to get going. If you end up needing more it is there.
- rhinoceraptor 11y agoBabel does some other magic that you might not realize, such as converting anonymous functions to named functions (and then assigning those to a variable of the same name).
- matwood 11y agoIt has some magic, but we already have to use polyfills to support multiple browser versions. I see something like Babel as the global polyfill of the future. Use latest es features now and have them go native over time.
- cdnsteve 11y agoBut then you have to keep up with Babel changes too... http://babeljs.io/blog/2015/10/29/6.0.0/ http://babeljs.io/blog/2015/10/29/6.0.0/
- merpnderp 11y agoWhy this urge to keep up to the latest and greatest? Especially for a transpiler? If it is converting your code just fine, why update?
- Goronmon 11y agoProbably the concern that waiting between updates means that if you are forced to update for some reason (critical bug or must-have feature) you have a tougher upgrade path.
- coldtea 11y agoBecause if you don't, then a year or two down the road you're left with an unsupported legacy hell.
- callahad 11y agoNode.js modules: from brand new to "unsupported legacy hell" in "a year or two." There's no way this is sustainable, but I'm at a loss of how to fix it, especially when the ECMAScript language itself is evolving at such a rapid pace. Any ideas?
- bonif 11y ago>but I'm at a loss of how to fix it, especially when the >ECMAScript language itself is evolving at such a rapid pace. >Any ideas? Avoid Javascript on the server, problem fixed.
- csvan 11y agoThere were 6 years between ES 5 and 6, and it will most likely be another 1-2 years before we have complete, well tested ES6 coverage across all major browsers. ES6 is fully backwards-compatible with ES5 anyway, so it's not even a Python-kind of language evolution.
- coldtea 11y agoIt's a cultural thing. JS being relatively fashionable and easy to write, it attracts all the younger devs that can't be bothered with backwards compatibility, stability, etc, and keep changing, restructuring etc their projects as they go along. There are exceptions of course, e.g. anything by jashkenas, but this breakage happens a lot. Also with people adopting the latest shiny new framework every year or so (e.g. it feels like ages when Backbone was the shiny new thing, but it was merely 5 years ago -- since then we've had Ember, then Angular, then React take the spotlight).
- csvan 11y agoIn the case of Babel - performance. Even with all the fantastic work that has been done on it so far, good luck avoiding massive transpile times for non-trivial ES6 code bases. I imagine TypeScripts (and other) transpilers have the same issue.
- 15155 11y agoIn a project with over 600 required js files, 25kloc in project, way, way more from npm: the whole compile takes around 25s. An incremental compile takes ~1-2s.