3 ms·
"I suspect a lot of the bad practices in the modern JS ecosystem are due to the paradigm of having the same language running in the browser and on the server. T
by ss108 4y ago
"I suspect a lot of the bad practices in the modern JS ecosystem are due to the paradigm of having the same language running in the browser and on the server. This creates conflicting incentives in the way things are designed and deployed and one necessarily undermines the other."
What do you mean. Could you give some examples?
- krapp 4y agoSorry, I have a bad habit of posting when I'm halfway out the front door for something... For instance, as I understand it, the reason Node packages are so small is to make it efficient to run them in browsers. But that also exponentially increases the brittleness and vulnerability of the code. Optimizing for the always-live continuous deployment processes of web development runs counter to what is necessary for stable and secure code on the backend. I may be wrong, though, it's just something that occurred to me while I was wondering about this exact problem.
- ss108 4y agoInteresting, thanks
- gitgud 4y ago> as I understand it, the reason Node packages are so small is to make it efficient to run them in browsers Usage of npm packages in browsers is kind of an after thought, as originally people used a separate dependency management for the browser (bower js) The NPM ecosystem has a huge focus on reusability of libraries, smaller packages is just an emerging phenomenon when reusability is the goal. Also, small packages are a way to embrace the Unix philosophy, "do one thing and do it well" But yes, smaller packages create large dependency chains and a greater attack surface...