7 ms·
HN why all the hate agains NodeJS? It's still ( IMHO ) amazing. Yes the versioning is sad and breaks almost every time. Also some modules look fragile and what
by drinchev 11y ago
HN why all the hate agains NodeJS? It's still ( IMHO ) amazing.
Yes the versioning is sad and breaks almost every time. Also some modules look fragile and what was good yesterday is not good today anymore.
But still. Those are the reasons why I still stick with NodeJS :
1. Electron. Simply awesome - I copied 90 % of my app, changed Sequelize ORM to have it's storage to sqlite and boom. I have a webapp as a OS-packaged app.
2. Isomorphic code - I'm rendering React / Flux applications on the server-side and on the client-side. Reusing code, storage and syncing logic between them. Even my logger module works on client-side / server-side.
3. Front-end / back-end needs very similar skills - This is one of my top reasons to tell my clients ( I work as a freelancer ). There will not be a big deal for a front-end guy to write / understand backend code and vice-versa. Also it's javascript. The most popular language.
4. Libraries for most popular services - There is always something, someone wrote that is NodeJS or at least javascript.
P.S. I'm heavily using TypeScript nowadays. I think this solved a lot of NodeJS syntax/compiler problems.
- cdnsteve 11y agoSome environments cannot handle all the churn. Things breaking for no reason are delivering no value to the customer or your product.
- drinchev 11y agoYep, but environments also change. Microservices are so popular nowadays and I see so many libraries written by Yahoo, Microsoft, Airbnb, etc., which are NodeJS oriented. And no. Things break all the time and still give value to customers. Things break for A reason and still give value to customers. Yep it would be cool and more non-breaking if 20-years of Java experience was injected into NodeJS, but I bet in 20-years NodeJS will be even better than the popular alternatives these days.
- xemdetia 11y agoI think the point trying to be raised is that node seems to be built on a mindset of endless churn where some of us need to be able to write software that we aren't going to be able to CI and develop on for a year and expect it to work the same time next year without further development. Also like some have mentioned a high severity CVE that comes out turns into 'how fast can I move to fix it and then go back to something else.' Sometimes the value to customers is just a system that works without downtime or failures, and the next increase in value is not even related to something that was built on this bleeding-edge packaging model. The only types of development projects that seem to benefit from it are the kind of project that can dedicate a full-time or mostly-full-time developer to it forever (forever being the lifetime of the product/service). If dependency issues crop up every few months for a perodically updated project that could almost be a death knell, if you have to pivot or do major work on the backend all of a sudden you could come back to just a broken set of shambles. So the only thing it fits is a really strange gap between hobbyist/side project and stable production which ends up being just plain risky for a technology choice.
- drinchev 11y agoUpvoted your comment. I mostly agree. IMHO Node isn't built on this mindset ( endless churn ). I think it's just rapidly evolving. It's just enthusiasm by the community. As far as my experience goes, I just put more effort in finding the right module rather than finding >any< module that will do the work. Afterwards I can usually npm-shrinkwrap, upload to DigitalOcean and leave forever.
- Touche 11y agoNo one's suggesting using Node.js in the space shuttle. These are mostly disposable web apps we're talking about.
- pikzen 11y ago>1. Electron. Simply awesome - I copied 90 % of my app, changed Sequelize ORM to have it's storage to sqlite and boom. I have a webapp as a OS-packaged app. And your users get to enjoy awful performance and insane resource usage for their app. How generous of you. Also, the hate for NodeJS is because Javascript is a terrible language, no matter how many things you put on it (TypeScript, Babel, etc.). It's also because V8 performance is laughable. Everything you mentioned is also mentioned in http://notes.ericjiang.com/posts/751 http://notes.ericjiang.com/posts/751 , which I believe does a nice job of explaining why NodeJS is terrible.
- drinchev 11y agoI usually answer "Javascript is bad" statements with "English is not the most declarative language too, but ... it's the most common". Anyway I think JS is not a part of my statement, so I'm not going to agree on why JS sucks. It's opinionated. And contrary to logic it works good when you get used to it. About Electron. I think nobody will build Photoshop or 3D Games ( at this point ) using it as a platform. I would personally decline if I have an assignment like this. But for apps like Slack, Visual Studio Code, Atom, etc, it works pretty good. Something more. I'm actually working on my own accounting app that suits my needs, which I would not be able to do for that limited spare-time I have these days If I used Objective-C / Swift.
- pikzen 11y ago>But for apps like Slack, Visual Studio Code, Atom, etc, it works pretty good. I won't get into a long rant, but aside from on OSX, Slack and Atom are slow, resource hogging and unstable piles of crap. Atom couples that with bad architecture and engineering choice, but that's not Electron's fault. (Also, your comparison with English is bad. English naturally evolved to the state it is in today. Javascript was designed from scratch, and it still manages to be awful. Also, sorry, Javascript isn't the most common language, thankfully.)
- ufo 11y ago> Atom couples that with bad architecture and engineering choice How? (Other than choosing HTML and JS in the first place)
- klodolph 11y agoTypeScript is awesome, and using the same code client and server is also a great benefit. However, I would like to inject a little bit of skepticism. JavaScript is not the most popular language. TIOBE, for example, ranks it #8. It's a great language for you, but last time I checked, the Java and Ruby shops were still hiring. And it's a bad sign when your community isolates itself by creating its own jargon, like "isomorphic". "Isomorphic" means that something has the same shape, but the term we're really looking for is "portable", "runtime agnostic", "environment agnostic", or something like that. Java called it "write once, run anywhere" and it's clear that the terminology used here is more driven by marketing than by actual technology. But don't take it personally. HN truly has hate for every language (name a language it doesn't hate!), and the internet supports sharing your hatred with others more than it supports sharing love. You've found a system that earns you money by writing software, and that itself earns you some respect here.
- tracker1 11y agoAnd these Java and Ruby shops never touch JS code? I'd bet at least half of them do.. same for .Net shops for that matter, even some Python shops... it may not be the primary language for the job, but almost every job with a web interface will contain at least some JS... no other language is as pervasive.