5 ms·
For JavaScript, two main factors both driven by fairly mundane and well accepted SWE principles: 1) npm encouraged small, "single responsibility" packages/libr
by davedx 4y ago
For JavaScript, two main factors both driven by fairly mundane and well accepted SWE principles:
1) npm encouraged small, "single responsibility" packages/libraries
2) developers are encouraged to never "reinvent the wheel", leading to them to pull in these libraries without considering the tradeoffs
In other engineering disciplines people are taught to consider tradeoffs more than in software engineering.
The tradeoffs of depending on npm packages are:
1) You don't need to reinvent the wheel, i.e. you can build very feature-rich applications at high velocities
2) Tracking, researching, integration, maintaining, and (for longer lived projects) migrating from package-A to package-B can cost way more time and energy than you'd initially think
3) Almost all packages are open source, so maintained in an ad hoc way by the contributors to the project. Even the biggest, most cohesive, well planned projects under the umbrella of tech megacorps sometimes fall into stagnation and maintenance hell. "react-scripts", which underpins the de facto standard way to bootstrap react apps "create react app", hasn't had a patch version released since Facebook pivoted to the Metaverse.
Answer to follow-up:
No, you can absolutely write modern, feature-rich front-end applications without any dependencies. You'll spend significantly more time writing lower level code allowing you to render your data into some kind of view, manage form inputs, app state and routing, but if you're disciplined and determined it's totally possible to do.