Live data from Hacker News

The Hitchhiker's Guide to Modern JavaScript Tooling

reactkungfu.com

41–50 of 120 posts

Re: The Hitchhiker's Guide to Modern JavaScript Tooling

#41
post #3

Gulp is really great and better, than Grunt, but sometimes make seems to be a good choice that people forget about.

Make can be good but can also be quite tedious/verbose to get started. I actually prefer using the npm scripts and using the binary files in `./node_modules/.bin/{ webpack, babel, etc }`

Takes no time at all and there is no interface that can break like in gulp or grunt

Re: The Hitchhiker's Guide to Modern JavaScript Tooling

#42
Reading the page then the comments, even as a senior developer who only touches JavaScript when necessary; I don't see much unification in the JavaScript world today compared to 12 to 15 years ago.

React seems to be a theme, if I want to develop a modern (is Web 2.0 still the term) single-page site (is that still a phrase?) using HTML5/CSS3/JavaScript...what environment exists that is cohesive and complete as either Eclipse for Java or Visual Studio for .NET?

Here's my answer, as an outsider, Java dude who only suffers brief interludes with JavaScript...I'd pick jQuery Mobile or DART.

The thing is...whenever these JavaScript tooling articles comes up I don't see those listed. I see names like React, Meteor, Gulp, Grunt, Webpack and maybe 3 dozen more.

Re: The Hitchhiker's Guide to Modern JavaScript Tooling

#43
post #16

Earlier quoted context omitted.

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. 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…

> 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…

Your first 2 responses fit into this category:

> people who just don't have enough problems in their lives already.

Re: The Hitchhiker's Guide to Modern JavaScript Tooling

#44
post #3

Gulp is really great and better, than Grunt, but sometimes make seems to be a good choice that people forget about.

Make can be good but can also be quite tedious/verbose to get started. I actually prefer using the npm scripts and using the binary files in `./node_modules/.bin/{ webpack, babel, etc }` Takes no time at all and there is no interface that can break like in gulp or grunt

I too used to do this, until I needed more complex things, or am trying to find a bug in my code and have to make a few small edits, save, run `npm run build` then refresh my browser, make changes, repeat step 40 times in a 15 minute timespan.

Or I can create a couple gulp tasks (which honestly, is easy as heck) then a watcher using livereload, and run `gulp watch` then just be done with it.

Re: The Hitchhiker's Guide to Modern JavaScript Tooling

#45
post #27
post #11

We talk about "modern JavaScript tooling" but year after year, the list essentially stays the same. Maybe few new players have appeared (Gulp, WebPack, Babeljs) but they do exactly the same thing that the tools we had before (e.g. Grunt, Browserify, Traceur). It occurs to me that "modern JavaScript tooling" is growing only vertically (better tools to build, better tools to modularize, better tools to transpilation),…

> * better editors for HTML/CSS, maybe even some decent WYSIWYG Editors? How about an IDE. In the java environment I can manage an application container, profiler, debugger, compiler, packager, test suite all from one application. Also included: near-omniscient auto-complete, hot-code replace, incremental building, dependency fetching, visual version control, automatic refactoring, deployment and many other convenien…

Some of those features are only possible because Java is statically typed. They couldnt exist in the same way for "pure" JavaScript.

Re: The Hitchhiker's Guide to Modern JavaScript Tooling

#46
post #30
post #24

Earlier quoted context omitted.

No 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".

I 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 explana…

Of course you can write code using cat but there is no good reason to do so. That would be like being a carpenter who refuses to use powertools and instead relies on manually operated ones. If you don't understand how to use the tools of the trade that will greatly improve your productivity, then you simply are not a professional.

Re: The Hitchhiker's Guide to Modern JavaScript Tooling

#47
post #45
post #27

Earlier quoted context omitted.

> * better editors for HTML/CSS, maybe even some decent WYSIWYG Editors? How about an IDE. In the java environment I can manage an application container, profiler, debugger, compiler, packager, test suite all from one application. Also included: near-omniscient auto-complete, hot-code replace, incremental building, dependency fetching, visual version control, automatic refactoring, deployment and many other convenien…

Some of those features are only possible because Java is statically typed. They couldnt exist in the same way for "pure" JavaScript.

But they can exist in a statically typed extension to javascript. See typescript in Visual Studio.

Re: The Hitchhiker's Guide to Modern JavaScript Tooling

#48
"The biggest weakness of such small tools approach is that it is hard to learn what to use and how to configure it."

No. By far the biggest weakness of such a small tools approach is a Balkanization of development tools that generally refuse to work with one another and often don't work very well by themselves. One library I really wanted to try was using Browserify but I wanted to use brunch/bower because my workflow was already in brunch. Even with the brunch-browserify plugin this wasn't possible. After wasting two days on it, I gave up and just used Browserify by itself. Another couple of hours it was actually working. This is typical. On another app, I use gulp. Another piece of garbage that claims that when you run a command 'gulp watch' it will automatically rebuild your assets. It won't.

These are only three small projects, each using a different build tool: browserify, gulp, and brunch + bower. None of them are compatible with each other and it's unlikely they will ever work together in one project without hours or days of trial and error. If there was one monolithic (or not) dependency / build tool that actually worked, I'd much rather use that, and it would be a much better approach than having a whole bunch of small crappy tools that don't work together.

tl;dr: Not only is having multiple tools doing the same thing in this area not appealing, it just leads to developers wasting massive amounts of time and "what the fucks?" working with half a dozen tools that do the same thing and do it poorly.

Re: The Hitchhiker's Guide to Modern JavaScript Tooling

#49
post #27
post #11

We talk about "modern JavaScript tooling" but year after year, the list essentially stays the same. Maybe few new players have appeared (Gulp, WebPack, Babeljs) but they do exactly the same thing that the tools we had before (e.g. Grunt, Browserify, Traceur). It occurs to me that "modern JavaScript tooling" is growing only vertically (better tools to build, better tools to modularize, better tools to transpilation),…

> * better editors for HTML/CSS, maybe even some decent WYSIWYG Editors? How about an IDE. In the java environment I can manage an application container, profiler, debugger, compiler, packager, test suite all from one application. Also included: near-omniscient auto-complete, hot-code replace, incremental building, dependency fetching, visual version control, automatic refactoring, deployment and many other convenien…

WebStorm (https://www.jetbrains.com/webstorm/). Or if you use other languages as well, check out any of Jetbrains' IDEs: https://www.jetbrains.com/

I haven't found a better IDE for any language yet.

Re: The Hitchhiker's Guide to Modern JavaScript Tooling

#50
post #13

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.

Like 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.

Post reply on HN