3 ms·
express (common web framework) seems to have only 51 deps in lockfile jekyll has 13 I don't disagree that lots of deps = supply chain risk But there have alw
by awinter-py 7y ago
express (common web framework) seems to have only 51 deps in lockfile
jekyll has 13
I don't disagree that lots of deps = supply chain risk
But there have always been variations between projects & kinds of projects re how many deps they pull in. Try following someone's ipython data science tutorial, it's requirements.txt for days
I think lack of a standard lib early on plus hipster functional culture made the '10s JS leaders like small monofunctional libs.
Focus on transpilation plus lack of tree-shaking in early versions of webpack may have also created an incentive for small things.
- dgellow 7y agoA python equivalent to "express" would be Flask https://palletsprojects.com/p/flask/ https://palletsprojects.com/p/flask/ I see 4 dependencies in the setup.py, and they are all from the same team of maintainers (i.e the Pallet team): - Werkzeug - Jinja2 - itsdangerous - click https://github.com/pallets/flask/blob/master/setup.py https://github.com/pallets/flask/blob/master/setup.py https://github.com/pallets/flask/network/dependencies https://github.com/pallets/flask/network/dependencies
- awinter-py 7y ago'pip freeze' results from a few other py web frameworks: sanic = 18, fastapi = 3 but one of them is a 7MB download (pydantic) yeah it's less, but also python has an amazing stdlib
- oefrha 7y agoTo be fair, express is a production server itself whereas werkzeug is not, so you need to add something like gunicorn or uwsgi (yeah I know nginx supports uwsgi_pass natively). click is not necessary in production though (it's only used in the dev CLI). That said, 4 dependencies is the norm in Python land, whereas 13 dependencies is an outlier in JS land. Edit: oops, misread, gp said express has 51 deps, not 13.
- wffurr 7y agoThe Python standard library is a lot more capable than the JS equivalents (Node or browser API). That eliminates the need for a lot of dependencies. There's been a TC39 proposal for a JS stdlib for about 2 years now: https://github.com/tc39/proposal-javascript-standard-library https://github.com/tc39/proposal-javascript-standard-library
- bostonvaulter2 7y agoExpress is a micro web framework, it is very small and not really usable on it's own (and it's not meant to be).