3 ms·
Because one tried and the ecosystems is such a mess that there's no real logical place to start. If you are tainted by old knowledge, then there are things tha
by mrweasel 6y ago
Because one tried and the ecosystems is such a mess that there's no real logical place to start.
If you are tainted by old knowledge, then there are things that you wouldn't even imagine is required. Why to I need NPM? JQuery and Prototype didn't need a package manager. You have a ton of tools, different tools for different frameworks even.
The more I look into modern JavaScript the more confused I get.
- azangru 6y ago> Why to I need NPM? JQuery and Prototype didn't need a package manager. But that is a question that can be asked of any language. It's a given that any modern language would have a package manager. Ruby has gems, python has pip, rust has cargo, and so on. PHP didn't use to have a package manager, to the chagrin of many professional web developers, until finally there was Composer, and the php community breathed a collective sigh of relief. Package management is good. It helps you define all your project dependencies in a sane way in a configuration file, and put that in source control, rather than download all the dependencies locally and store those in source control. Javascript had different package managers. It had bower. It had meteor packages. It had something else as well. It had different module formats. It has a rather convoluted history. Luckily, with the popularity of node, we now have only a couple — npm and yarn. Or just one, which is npm, if you consider only the standard tools that come bundled with node.
- abraxas 6y agoMy last job did not use maven. We checked in the required jars into the repo and everyone cloned their copies from there. Builds took seconds and were always predictable. My current job uses maven and I'd swear a good 20-30% of developers time is spent wrestling with maven dependencies. Especially on a new project.
- azangru 6y ago> there's no real logical place to start One way — if you are at all interested that is — is to look for someone who can guide you through the current tooling landscape. For example, I believe Cory House's course on Pluralsight on choosing appropriate tools for a frontend project [0] should be informative in this regard. There are also free tutorials about this subject — for example on egghead.io [1] The other way is to find the documentation on any of the popular tools: webpack, rollup, snowpack, vite, esbuild, etc. — and just follow along trying to set up a toy project and, by doing so, figuring out what the purpose of the tool is. See the recent Google's site on the comparison of modern tools [2] to find out what each of the tools is supposed to do for you: [0] https://www.pluralsight.com/courses/javascript-development-environment https://www.pluralsight.com/courses/javascript-development-e... [1] this one might be useful: https://egghead.io/courses/how-to-use-npm-scripts-as-your-build-tool https://egghead.io/courses/how-to-use-npm-scripts-as-your-bu... [2] https://bundlers.tooling.report https://bundlers.tooling.report
- deergomoo 6y agoIf what you're primarily building is a web page with light interactivity, there's nothing wrong with jQuery (or a more declarative modern alternative like Alpine.js). React et al are intended for applications with enough complexity that trying to manage it procedurally becomes miserable and unmaintainable. There's a lot wrong with how npm is used (primarily the never-ending recursive dependencies making proper auditing of the code you use all but impossible), but including tons of script tags on every page and hoping you got the right plugin order without introducing any conflicts was hardly the pinnacle of development. There are two problems with modern JS, imo. First is all the people insisting you need to use some grotesquely complex setup running on Kubernetes to host a blog that gets a hundred page views per month. The second is that most frontend frameworks want to take over your entire app, and in some cases really want your backend to be running node too. It's usually possible to start small and enhance as you go, but it's not easy.