TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Does Node.js Have a Future?

2 点作者 pyeri11 个月前
I&#x27;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.<p>Right now, PHP+Bootstrap suffices most of my needs when it comes to app development as a freelancer. As for JavaScript, I&#x27;ve always treated it as a language meant for client-side scripting and nothing more than that.<p>Now, as much as Node and npm narratives have become the biggest chatter of the day, I&#x27;m still not sure how much of that really translates into jobs or freelance projects or even real world industrial usage for that matter.<p>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&#x27;t know how much of it can be attributed to Node.js and how much to frontend JS technologies like jquery and react?<p>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 &quot;run of the mill&quot; languages like PHP, Python or even Ruby, what Node really lacks is <i>proven works and street cred</i>. Where is the node&#x27;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?<p>And what about the enterprise usage? The big ones are all obviously wedded to either Microsoft&#x27;s .NET or Oracle&#x27;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?<p>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&#x27;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?

5 条评论

nov21b11 个月前
&gt; Where are the open source folks in Node.js producing equivalents of WordPress and Magento and Drupal?<p>I can&#x27;t speak for the community at large, but I specifically switched from large opinionated frameworks to Node.js&#x2F;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&#x2F;TypeScript gives me type safety, easy refactors, an ergonomic language, and a large community.<p>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.
xet711 个月前
&gt; Right now, PHP+Bootstrap suffices most of my needs when it comes to app development as a freelancer. As for JavaScript, I&#x27;ve always treated it as a language meant for client-side scripting and nothing more than that.<p>PHP still has advantage of having cheapest shared hosting.<p>&gt; Are there standard database drivers to access mysql or mssql or sqlite, for eg?<p>Yes, for example <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;typeorm" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;typeorm</a><p>&gt; 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&#x27;t work out in practice for some reason.<p>Async&#x2F;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&#x2F;Await, because Fibers has been deprecated and does not work anymore. Async&#x2F;Await syntax is complex.<p>So just keep coding your serverside PHP.
ingonealan311 个月前
&quot;[...] async should be the hot cake compared to synchronous programming. But that doesn&#x27;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?&quot;<p>You&#x27;re not taking into account people&#x27;s reluctance to change. PHP has been around for much longer than Node has. This fact is practically enough to explain the phenomenon you&#x27;re pointing to.
zer00eyz11 个月前
Go, Zig, Rust&#x2F;C<p>Pick one of those, that is order of &quot;best bet&quot; for next to learn.<p>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.
评论 #40702806 未加载
dgoxow11 个月前
<a href="https:&#x2F;&#x2F;world.hey.com&#x2F;dhh&#x2F;why-i-retired-from-the-tech-crusades-107a51ea" rel="nofollow">https:&#x2F;&#x2F;world.hey.com&#x2F;dhh&#x2F;why-i-retired-from-the-tech-crusad...</a>