6 ms·
I think it's good to note that you don't actually need a single one of these tools to make functioning software. You can pack your scripts with cat and download
by mbrock 11y ago
I think it's good to note that you don't actually need a single one of these tools to make functioning software. You can pack your scripts with cat and download libraries with wget and use regular old JavaScript without transpilers. When you have a problem with this, you can use tools... But you don't have to top-load every project with a whole suite of complex tools just for the sake of it.
- aaronem 11y agoWell, you do at minimum need something that understands CommonJS modules, if you want to pack isomorphic code to run in the browser, so you need Browserify or Webpack. And you need a module downloader that resolves and installs dependencies, so you need NPM and/or Bower. And, if you want to write unit tests (which you should!) then you need a Javascript test harness, because otherwise you're going to have a bad time instantiating your modules and injecting mocks into them. You could do this in just plain Node, sure, but you'll end up reinventing a lot of wheels if you do. So you need Mocha, or something very like it. But build tools are sort of a luxury, sure. You can get by just fine with make, if you already know how to use it. And nobody needs transpilers, except people who just don't have enough problems in their lives already.
- TazeTSchnitzel 11y ago> Well, you do at minimum need something that understands CommonJS modules, if you want to pack isomorphic code to run in the browser, so you need Browserify or Webpack. No, you don't. These are optional. You only need these for larger applications that need packing. > And you need a module downloader that resolves and installs dependencies, so you need NPM and/or Bower. No, you don't. You can manually keep things up to date. > And, if you want to write unit tests (which you should!) then you need a Javascript test harness, because otherwise you're going to have a bad time instantiating your modules and injecting mocks into them. Okay, you probably do need this.
- Killswitch 11y agoYour first 2 responses fit into this category: > people who just don't have enough problems in their lives already.
- lowboy 11y ago> No, you don't. You can manually keep things up to date. Sure, but there are better things I could be doing with my time.
- cozuya 11y agoNo one needs anything. You can write code in notepad. No one wants that, and no one wants to have a million globals on the browser or hit F5 every single save any more. While there is a learning curve to something like gulp, you really only need to set it up once and you can use it on every project as simply as typing "npm i".
- mbrock 11y agoI wrote code in Notepad for years. Often now I use cat instead. Sometimes even ed, which is surprisingly useful for many editing tasks. Knowing how to do things in the most basic, fundamental way is nourishing. And I've heard from many people that the JavaScript ecosystem—by which they seem to mean all the stuff they hear that everyone else is using—makes them feel overwhelmed. So it's good to have this clear explanation of the "modern" tools. But it's also good to know that it's all optional and that you can start without them. It is entirely possible to make a modern web application with just a few plain JS files included with script tags. Yet people think the first step is to learn about half a dozen sophisticated tools that they don't even know why they need. So I say start with Notepad. Be aware that there are popular tools to improve your workflow... But also that sometimes the best workflow is the one you fully understand.
- Wintamute 11y agoI agree that it's essential and nourishing to understand the basics, but I feel that familiarity with the basics and expertise with these tools represents a minimum baseline standard for professional frontend development, especially when working in teams on medium/large web apps. Granted it's not easy to get up to speed with all of it, but many fields in programming and CS are not easy either. As browsers become increasingly standardised and stable and web languages grow up (ES6+) we'll be able to do increasingly sophisticated things, and frontend web development will attract more serious programmers ... we're seeing that now with the interest in React and functional JS, there's a lot of cross pollination between JS and the Clojure/Haskell communities which until now have remained in their ivory towers. Modern/professional frontend development won't and indeed shouldn't be something you can still just get done with Notepad and a few <script> tags.
- findjashua 11y agoLike any tool, the value of these tools becomes apparent only when the alternatives become inconvenient. If your workflows are simple enough that you don't need them, more power to you! Also, while JS lib/framework fatigue is a very real thing, ever since I switched to React+Webpack, I haven't felt the urge to switch to the 'latest n greatest'. They are a major milestone in the JS dev tools space, and a pretty safe bet for someone who just wants to pick something and not have to think about it afterwards.