简体   繁体   English

对于非实时网站/应用,node.js是否过多?

[英]Is node.js excessive for non real time web sites/apps?

I just today heard about node.js, being new to web development. 我今天才听说node.js,他是Web开发的新手。 After hours of research, I finally found this article that explained clearly to me what node.js did. 经过几个小时的研究,我终于发现这篇文章清楚地向我解释了node.js做了什么。

I'm in the process of creating a reviews website. 我正在创建一个评论网站。 Content will mostly be stored and retrieved from a database, with an emphasis on user search for finding reviews. 内容主要是从数据库中存储和检索,重点是用户搜索查找评论。 There will be no real time content anywhere. 任何地方都没有实时内容。 It seems like the main purpose of node.js is to create web servers that can serve real time applications by using a persistent socket connection, something that my proposed website/app does not do. 似乎node.js的主要目的是创建可以通过使用持久套接字连接来提供实时应用程序的Web服务器,这是我建议的网站/应用程序不能做的事情。

I know that PHP will serve me just fine in what I need, but my question is, are there any other benefits that node.js can give to non real-time web sites/applications? 我知道PHP会在我需要的地方为我提供服务,但我的问题是,node.js可以为非实时网站/应用程序提供任何其他好处吗?

Node.js isn't just for writing real time websites. Node.js不只是用于编写实时网站。 It also provides a common language between server and client code, offers hundreds of modules — see NPM — and is moving at a good rate. 它还提供服务器和客户端代码之间的通用语言,提供数百个模块 - 请参阅NPM - 并且正在以良好的速度发展。

At the end of the day, it boils down to what you're comfortable with. 在一天结束时,它归结为你喜欢的东西。 If you're happy using PHP and see no reason why you'd ever want to have real time aspects, then use PHP. 如果您对使用PHP感到高兴,并且没有理由为什么您想要拥有实时方面,那么请使用PHP。 If you're not comfortable with JS and async paradigms, then stick with PHP. 如果你对JS和异步范例不满意,那么坚持使用PHP。 If you love JavaScript, there is no reason not to use it. 如果您喜欢JavaScript,则没有理由不使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM