Live data from Hacker News

Step-by-step tutorial to build a modern JavaScript stack from scratch

github.com

91–100 of 211 posts

Re: Step-by-step tutorial to build a modern JavaScript stack from scratch

#91
post #71

I feel like the people complaining about how many libraries there are in this stack don't know what these tools do. Most are small tools that do one thing very well. Yarn installs packages, much like Gem, NuGet, whatever. Pretty standard. React is a frontend framework. Not surprising that you'd use one. I suppose you could opt to write a giant pile of vanilla JavaScript instead (I'm assuming you're not using this kit…

I think the reason most of us dislike the ecosystem isn't because therre are many libraries and tools in the stack. In the C-world, every time you type 'make' I am probably executing two dozen different programs, so we are very comfortable with "Make each program do one thing well". The problem that most of us dislike the javascript/web ecosystem is that those set of libraries and tools keep changing every couple yea…

I don't buy that either. The youngest thing on that list is yarn, but aside from that everything is a few years old at least.

And nobody is saying you need to use anything. Npm works fine, bower still works fine, hell pulling down tarballs still works fine. You don't need to use the newest thing if you don't have the problems it's trying to solve.

Re: Step-by-step tutorial to build a modern JavaScript stack from scratch

#92
post #44

Earlier quoted context omitted.

How do you think you get to a standard library? How do you package the best tools when you don't know what the best tools are?

How long do you think something like that should take? It's already been 25 years... I think it says something about the browser ecosystem and the language itself. The entire WPF ecosystem for example was developed and refined in a fraction of this period. Heck even .NET itself is only 14 years old.

Languages with one single corporate implementor obviously will centralize and standardize their library. Languages with a bunch of competing implementors stay fragmented. JavaScript is a lot like C++ in this regard.

Re: Step-by-step tutorial to build a modern JavaScript stack from scratch

#93
post #6

I would give up Immutable because of it's bad performance and often confusing api. Also I'd give up Mocha, Chai & Sinon for tape, which is way simpler and more than enough: https://medium.com/javascript-scene/why-i-use-tape-instead-o...

Gulp is obviously not needed as well. That's the most confusing dependency in this stack imo.

Re: Step-by-step tutorial to build a modern JavaScript stack from scratch

#94
post #71

Earlier quoted context omitted.

I think the reason most of us dislike the ecosystem isn't because therre are many libraries and tools in the stack. In the C-world, every time you type 'make' I am probably executing two dozen different programs, so we are very comfortable with "Make each program do one thing well". The problem that most of us dislike the javascript/web ecosystem is that those set of libraries and tools keep changing every couple yea…

I don't buy that either. The youngest thing on that list is yarn, but aside from that everything is a few years old at least. And nobody is saying you need to use anything. Npm works fine, bower still works fine, hell pulling down tarballs still works fine. You don't need to use the newest thing if you don't have the problems it's trying to solve.

Yeah, from the outside I can understand the "everything keeps changing!!" complaint, but having been involved in JS for a few years, every single tool that got replaced was replaced for completely valid reasons, that couldn't have been solved incrementally by improving what was already there.

    Grunt > Gulp > Webpack
    manual polyfills > 6to5 > Babel
    script tags > bower > NPM > Yarn
    nothing > Flow/Typescript
All of these were significant improvements upon the status quo. If you don't understand why, that's fine! Keep using what you know.

Re: Step-by-step tutorial to build a modern JavaScript stack from scratch

#95

I feel like the people complaining about how many libraries there are in this stack don't know what these tools do. Most are small tools that do one thing very well. Yarn installs packages, much like Gem, NuGet, whatever. Pretty standard. React is a frontend framework. Not surprising that you'd use one. I suppose you could opt to write a giant pile of vanilla JavaScript instead (I'm assuming you're not using this kit…

Did you not read the memo? "the javascript ecosystem is a mess!!111" etc

Re: Step-by-step tutorial to build a modern JavaScript stack from scratch

#96
post #8
post #3

I appreciate the effort, certainly do. But, and this a big but: the amount of tooling, libraries, complexity and systems needed for a "modern" web app is almost comical at this point.

Are you sure it doesn't seem that way to you because you're less familiar with the ecosystem? Compare it to a Java backend. You might pick Ant, Ivy, Docker, Dropwizard, Guice, Jersey, Jackson, Mockito, JUnit, etc. I don't consider that to be radically less complex than the front-end stack proposed here -- but it just seems that way because a lot of those are "de facto" tools.

> Compare it to a Java backend. You might pick Ant, Ivy, Docker, Dropwizard, Guice, Jersey, Jackson, Mockito, JUnit, etc. I don't consider that to be radically less complex than the front-end stack proposed here -- but it just seems that way because a lot of those are "de facto" tools.

For the benefit of folks unfamiliar with Java, Docker is not necessary nor tied in any way to Java. The majority of Java is not deployed on Docker, and Docker is written in Go. In fact, the Java mantra "write once, run anywhere" is accomplished by the JVM, so you don't need Docker. You would need it for other languages not on the JVM.

Also, Dropwizard is just a bundle of libraries (most of those you mentioned), so you don't need to include both Dropwizard and a list of libraries that it includes.

Re: Step-by-step tutorial to build a modern JavaScript stack from scratch

#97
post #71

I feel like the people complaining about how many libraries there are in this stack don't know what these tools do. Most are small tools that do one thing very well. Yarn installs packages, much like Gem, NuGet, whatever. Pretty standard. React is a frontend framework. Not surprising that you'd use one. I suppose you could opt to write a giant pile of vanilla JavaScript instead (I'm assuming you're not using this kit…

I think the reason most of us dislike the ecosystem isn't because therre are many libraries and tools in the stack. In the C-world, every time you type 'make' I am probably executing two dozen different programs, so we are very comfortable with "Make each program do one thing well". The problem that most of us dislike the javascript/web ecosystem is that those set of libraries and tools keep changing every couple yea…

Just google "yarn vs npm" and you'll know the answer...

the tools change because the technology is evolving, despite node the front end is still the driver, and mobile phones / browsers / etc are constantly being improved and evolved, and the ecosystem keeps up with it. Would you rather it all stayed static like in the C world and then you program a 2016 smartphone with a 2006 stack?

Re: Step-by-step tutorial to build a modern JavaScript stack from scratch

#98

From section 1 of the tutorial: > Since it came out in October 2016, [Yarn] received a very quick adoption and is becoming the new package manager of choice of the JavaScript community. We are going to use Yarn in this tutorial. It's October 2016 as I write. Tell me this tutorial is satire. Please.

Yarn solve some problems that the npm folks were unwilling / unable to solve, and is backed by Facebook + Google (+ others) so it's likely to be here to stay. Unless npm wake up and smell the coffee and implement some of it themselves, but experience shows they are quite opinionated and not in a good way.

Re: Step-by-step tutorial to build a modern JavaScript stack from scratch

#99

From section 1 of the tutorial: > Since it came out in October 2016, [Yarn] received a very quick adoption and is becoming the new package manager of choice of the JavaScript community. We are going to use Yarn in this tutorial. It's October 2016 as I write. Tell me this tutorial is satire. Please.

Step up your game.

Re: Step-by-step tutorial to build a modern JavaScript stack from scratch

#100
post #84

I feel like the people complaining about how many libraries there are in this stack don't know what these tools do. Most are small tools that do one thing very well. Yarn installs packages, much like Gem, NuGet, whatever. Pretty standard. React is a frontend framework. Not surprising that you'd use one. I suppose you could opt to write a giant pile of vanilla JavaScript instead (I'm assuming you're not using this kit…

I love this ecosystem. It's living, it's thriving. I love the fact that tons of great engineers are coming up with new ideas everyday to make my life as a developer easier. I love hearing a developer at a daily stand-up meeting saying he's been up all night trying out a new shiny thing and concluding by saying it also solves a big issue we had in our product and here's the pull request (timestamp 4am). The hype is he…

So, i'm someone that uses gulp and webpack together. But probably not in the way you think.

Webpack is great as a compiler, but it's not great at being "make". It still needs something to kick it off. And something to setup the environment correctly, run the tests, do the commit for the deploy, run the db migrations, clean the build directory, etc...

So a little bit ago I wrote a tool called `gulp-run-command`[0] that basically turns gulp into a command-line task runner, and it works great.

Gulp sets up the task dependency list for me, most things are command-line tools, and every now and then I use a gulp-plugin (like with mocha) rather than the CLI because it adds some feature over using the tool standalone.

[0] https://github.com/Klathmon/gulp-run-command

Post reply on HN