Live data from Hacker News

Why is a Java guy so excited about Node.js and JavaScript?

blog.sourcerer.io

61–70 of 117 posts

Re: Why is a Java guy so excited about Node.js and JavaScript?

#61

I don't really care what this guys credentials are; he claims npm and yarn are better than maven and gradle but doesn't bother explaining why (and it's evident he hasn't used gradle) Nor has he moved beyond a Java 6 mindset considering the things he complains about in terms of modularity, verbosity and even strict type checking. The fact that he thinks that the IDE race is between Eclipse and Netbeans is telling. As…

You say React but then complain about Redux. I get it I'm not a fan of Redux either, so why not direct your criticism to Redux instead of React? Also I would like to add that Redux is not needed to build a React app.

Hahaha <3

Re: Why is a Java guy so excited about Node.js and JavaScript?

#64
post #9

This person definitely needs to try out some JVM languages like Scala, Kotlin or Groovy. They solve nearly everything he talks about while keeping the good parts of the JVM ecosystem and avoiding a lot of the bad parts of NodeJS.

I went from Java to (dabbling in) Scala to TypeScript. While my heart is still with Scala, the ecosystem around Node is incredibly persuasive. The speed with which you can accomplish practical tasks, like building a desktop app with Electron, beats anything I've experienced in Javaland. (Of course that greatly depends on what kind of projects fill your time.) I think you could argue that the way Node hops domains -- web front-end, back-end, and desktop -- fulfills a broader version of Java's original vision: to be the cross-platform language.

Re: Why is a Java guy so excited about Node.js and JavaScript?

#65

I don't really care what this guys credentials are; he claims npm and yarn are better than maven and gradle but doesn't bother explaining why (and it's evident he hasn't used gradle) Nor has he moved beyond a Java 6 mindset considering the things he complains about in terms of modularity, verbosity and even strict type checking. The fact that he thinks that the IDE race is between Eclipse and Netbeans is telling. As…

I agree, React is overcomplicated for most things. But there are quite a few other options.

Re: Why is a Java guy so excited about Node.js and JavaScript?

#66

Earlier quoted context omitted.

Seems to be stuck at 2000-2010 java. And hasn’t spent a whole lot of time with npm or tried to maintain a project for a significant time, wrestling the issues that the fluid npm ecosystem brings. Maven gets a lot of flack for its rigidity but the fact that one can get a ten years old complex project and build it reliably today is simply amazing

Exactly, I deal with npm on a daily basis and I really wish deterministic builds were more of a concern in the javascript/npm universe. I can't count how many times a project broke because a "minor" release came out and broke existing code. Also the majority of projects have a caret in their package.json package versions so you automatically get the updates.

https://docs.npmjs.com/files/package-locks has been the default for awhile. Are you using a pretty old version?

Re: Why is a Java guy so excited about Node.js and JavaScript?

#67
post #9

This person definitely needs to try out some JVM languages like Scala, Kotlin or Groovy. They solve nearly everything he talks about while keeping the good parts of the JVM ecosystem and avoiding a lot of the bad parts of NodeJS.

No love for Clojure? I know many people that swear by it.

Oh, for sure! I just mentioned the three that first came to mind (which is biased by the fact I personally use them). But yes, I know lots of people who love Clojure.

Re: Why is a Java guy so excited about Node.js and JavaScript?

#68

It's not Java, it's the java culture. Yes, Maven and Gradle are weirdly complex, but they are workable. And .jar files are just downright amazing compared to most other things (I'm looking at you madman Python dependencies!) Hint: maybe you could come up with something like npm for Java ? Maybe it's waiting to happen? And Javadocs are mundane but still better than 'nodocs' which is the standard on Node.js which reall…

The standard for Node.js is highly modularized code where every module gets a README with examples and usually fairly comprehensive documentation.

If you mean that you think Javadocs format and type of details is ideal or ideal for JavaScript then please study JavaScript and Node.js more.

Re: Why is a Java guy so excited about Node.js and JavaScript?

#69
post #9

This person definitely needs to try out some JVM languages like Scala, Kotlin or Groovy. They solve nearly everything he talks about while keeping the good parts of the JVM ecosystem and avoiding a lot of the bad parts of NodeJS.

For a long time I worked with Java and tried to make the move to Groovy since I could appreciate what I read about it, having a background in Smalltalk. But somehow using Java for some large projects just seemed more straightforward and safe, because of type-checking which supports large-scale refactorings. But since I moved to mainly work on Node.js I feel that Node.js is what Groovy should have been. A simple but a…

I agree with you about ES6 - very much in many ways it's captured the best of the syntax from languages like groovy without relaxing so much that things become ambiguous etc.

Nonetheless, I find JavaScript still simply isn't structured enough and doesn't have the ability to tap into the underlying strengths of the JVM ecosystem. Static compilation has improved enormously incidentally, which to me means I almost never drop into Java any more where I used to code 50/50 in Groovy / Java.

Mind you, if all you want is ES6 on the JVM, you already have a pretty good subset of it in Nashorn / JDK9. I don't know how well it can use Node libraries though ...

Re: Why is a Java guy so excited about Node.js and JavaScript?

#70
post #26

I expected (2012) after the article's title. This type of hype about Node and JS is long gone I'm afraid.

I’m not so sure about that. I see node getting more and more traction these days. In 2012 it was a hipster tech, in 2018 it’s actually starting to see its way into production. At least around here, my own place included.

We’re a .net shop, like half the country I live in, but I could’ve written a somewhat similar story as the author. Not exactly similar, I don’t think NPM is really better than maven or nuget and coming from .net, the IDEs for JS are certainly weaker than they are for .Net.

The reason we’re doing more and more JS, and using node, is because of how fast it produces stuff that works.

It’s simply faster to write the same functionality with JS and node than it is in .net, and it gives us the advantage of only using one language for back-end, front-end and mobile. Which is extremely useful for a small team in an enterprise setup.

It also works everywhere. We’re a .net shop like I said, that means we run on IIS, which can be done with other techs than .net through stuff like fastcgi, but have you ever tried setting that up and keeping it up-to-date? I have, and really showed me how little of an operations guy I am because it was horrible. IIS-node on the other hand worked out the box.

It’s a little ironic, but it’s now easier for us to deploy Node apps than .net apps because .net apps often need different configuration on the IIS than it does on your development box and Node works exactly the same.

It’s mostly the easy, fast part that does it for us though, and not so much the language or node itself. We’re simply more productive when we’re using Node.

Of course you need a lot of governance with the JS stack, but you honestly need that for any tech, and we already had pretty strict rules in place for how we write things in .net.

Disclaimer, it’s entirely possible that we are not as good at .net as we think. It’s also possible that I’m noticing Node in more places than I did in 2012, or 2016 for that matter, places because I’m more focused on it now that we use it in production. Node is a rising trend throughout my network though, with more and more people picking it up for stuff that isn’t just weekend projects.

Post reply on HN