Live data from Hacker News

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

blog.sourcerer.io

21–30 of 117 posts

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

#21
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.

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

#22

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…

As someone who has to deal with Spring stack traces and React/Redux stack traces on a daily basis ... I'll take React/Redux 100% of the time.

There is a lot to complain about both but I think the Java boilerplate mess is at least one order of magnitude worse.

Just one man's opinion, anecdotal evidence, YMMV, etc.

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

#23

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…

It's not just Java culture, though, it's also Java. For instance, you can't have "npm for Java," because that's not how Java works at a very fundamental level. Java gets gigantic monolithic framework libraries because Java's class loader works fundamentally differently from Node's CommonJS module system.

Please elaborate.

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

#24

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…

It's not just Java culture, though, it's also Java. For instance, you can't have "npm for Java," because that's not how Java works at a very fundamental level. Java gets gigantic monolithic framework libraries because Java's class loader works fundamentally differently from Node's CommonJS module system.

Wha? I don't think so. An npm-like framework could work for Java. The difference between classloading and node.js 'require' module loader is not super relevant.

Frankly - the reason that Maven and Gradle are more sophisticated is because many Java projects are massive compared to most JS projects, the amount of complexity, various kinds of packaging, testing etc. necessitates some inherent complexity in modules. Java modules tend to be a lot bigger as well.

Again I think it's a cultural issue.

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

#25

Earlier quoted context omitted.

I teach javascript to students coming from Java and Python and, while I do agree npm could be better, students find it to be so much more intuitive rather than have some IDE handle packages (in the case of java) or be stored somewhere in your system path with python. Being able to see the dependency within node_modules and make that connection between you saying "i want to install this" and it appears in your project…

I honestly don't get why I was down voted but mkvirtualenv, workon xyz, pip install -r requirements.txt isn't exactly a huge barrier to entry with a python project. Personally I always saw the node_modules directory as something to be ignored. It's a crowded bunch of junk.

Fully agree. NPM is a complete three ring circus compared to pip and a requirements.txt file.

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

#27
post #7

Earlier quoted context omitted.

What's wrong with python dependcies? It's literally a small requirements file. If anything npm and js is the shit show for that.

I teach javascript to students coming from Java and Python and, while I do agree npm could be better, students find it to be so much more intuitive rather than have some IDE handle packages (in the case of java) or be stored somewhere in your system path with python. Being able to see the dependency within node_modules and make that connection between you saying "i want to install this" and it appears in your project…

Just so you know, 95% of the few hundred Java devs I've worked with in the last few years used maven or gradle on the command line to handle packages, including junior developers. I think the Java = IDE concept is outdated (although IntelliJ IDEA is an amazingly well-integrated IDE with Java).

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

#28

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…

As someone who has to deal with Spring stack traces and React/Redux stack traces on a daily basis ... I'll take React/Redux 100% of the time. There is a lot to complain about both but I think the Java boilerplate mess is at least one order of magnitude worse. Just one man's opinion, anecdotal evidence, YMMV, etc.

I'm a Redux maintainer. FWIW, I'm always open to suggestions on how we can make using Redux easier and better for everyone (example prior discussion: https://github.com/reactjs/redux/issues/2295 ).

We're currently working on a "starter kit" package that's intended to address some of the most common concerns about using Redux, and hope to make it an official Redux-branded package in the near future. I'd appreciate any feedback or ideas you have for improving it:

https://github.com/markerikson/redux-starter-kit

Also, since you mention stack traces: if anyone out there has a bit of free time on their hands, I'd _love_ to see the Redux DevTools core and extension updated to show a stack trace for where each action was dispatched:

https://github.com/zalmoxisus/redux-devtools-extension/issue...

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

#30

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…

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.
Post reply on HN