Hacker News new | past | comments | ask | show | jobs | submit login
Does Node.js Have a Future?
2 points by pyeri 15 days ago | hide | past | favorite | 6 comments
I've been toying with the idea of adding node to my arsenal of programming skills but unable to decide if the payoff is worth it in the long run.

Right now, PHP+Bootstrap suffices most of my needs when it comes to app development as a freelancer. As for JavaScript, I've always treated it as a language meant for client-side scripting and nothing more than that.

Now, as much as Node and npm narratives have become the biggest chatter of the day, I'm still not sure how much of that really translates into jobs or freelance projects or even real world industrial usage for that matter.

As far as I know, about 80% of the web is still powered by PHP and while JS certainly tops the TIOBE index, we don't know how much of it can be attributed to Node.js and how much to frontend JS technologies like jquery and react?

There is no doubt that for many folks, npm has become a critical part of webdev toolchain today (though the actual utilitarianism of some popular libs like babel and webpack is questionable IMHO). But when I compare Node with the established "run of the mill" languages like PHP, Python or even Ruby, what Node really lacks is proven works and street cred. Where is the node's equivalent of say sqlalchemy or rails or flask or laravel? Are there standard database drivers to access mysql or mssql or sqlite, for eg? Where are the open source folks in Node.js producing equivalents of WordPress and Magento and Drupal?

And what about the enterprise usage? The big ones are all obviously wedded to either Microsoft's .NET or Oracle's Java stacks. But among the smaller startups, how much mindshare do you see Node getting where it already has to compete with these other languages?

I understand that at a theoretical level, the event based async threading model of Node.js is truly innovative and since most typical CRUD apps spend most of their time waiting for an sql query to perform or network resource to be fetched, async should be the hot cake compared to synchronous programming. But that doesn't work out in practice for some reason. If that really were the case, 80% of web apps would have been powered by Node instead of PHP today, right?




> Where are the open source folks in Node.js producing equivalents of WordPress and Magento and Drupal?

I can't speak for the community at large, but I specifically switched from large opinionated frameworks to Node.js/TypeScript and a carefully selected stack and modules. Once you reach a certain level of complexity, these frameworks start to get in the way. For me, Node.js/TypeScript gives me type safety, easy refactors, an ergonomic language, and a large community.

On the other hand, if you have to churn out projects for clients, a rigid opinionated framework is probably more appropriate as it makes project handover easy and cuts down on decision fatigue.


> Right now, PHP+Bootstrap suffices most of my needs when it comes to app development as a freelancer. As for JavaScript, I've always treated it as a language meant for client-side scripting and nothing more than that.

PHP still has advantage of having cheapest shared hosting.

> Are there standard database drivers to access mysql or mssql or sqlite, for eg?

Yes, for example https://www.npmjs.com/package/typeorm

> I understand that at a theoretical level, the event based async threading model of Node.js is truly innovative and since most typical CRUD apps spend most of their time waiting for an sql query to perform or network resource to be fetched, async should be the hot cake compared to synchronous programming. But that doesn't work out in practice for some reason.

Async/Await is what has become available in Node.js. But for some web frameworks, it has required to do a lot of changes to change from Fibers to Async/Await, because Fibers has been deprecated and does not work anymore. Async/Await syntax is complex.

So just keep coding your serverside PHP.


"[...] async should be the hot cake compared to synchronous programming. But that doesn't work out in practice for some reason. If that really were the case, 80% of web apps would have been powered by Node instead of PHP today, right?"

You're not taking into account people's reluctance to change. PHP has been around for much longer than Node has. This fact is practically enough to explain the phenomenon you're pointing to.


Go, Zig, Rust/C

Pick one of those, that is order of "best bet" for next to learn.

Pick something that complies to binary (without hacks). Pick something that has strict types at its core (late addition to PHP...). Pick something that you can write CLI tools, and a server, and a web app in.


Take language you enjoy and learn how to solve problems. That's it :)... All (best bets) will lead to confusion and burnout.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: