如何决定何时使用Node.js?

青春壹個敷衍的年華 提交于 2020-08-05 13:29:01

问题:

Locked . 已锁定 This question and its answers are locked because the question is off-topic but has historical significance. 该问题及其答案被锁定,因为该问题是题外话,但具有历史意义。 It is not currently accepting new answers or interactions. 它目前不接受新的答案或互动。 Learn more . 了解更多

I am new to this kind of stuff, but lately I've been hearing a lot about how good Node.js is. 我对这种东西是陌生的,但是最近我已经听到很多关于Node.js有多出色的信息。 Considering how much I love working with jQuery and JavaScript in general, I can't help but wonder how to decide when to use Node.js. 考虑到我一般喜欢使用jQuery和JavaScript有多少,我不禁想知道如何决定何时使用Node.js。 The web application I have in mind is something like Bitly - takes some content, archives it. 我想到的Web应用程序有点像Bitly-需要一些内容,然后将其存档。

From all the homework I have been doing in the last few days, I obtained the following information. 从过去几天我所做的所有作业中,我获得了以下信息。 Node.js Node.js

  • is a command-line tool that can be run as a regular web server and lets one run JavaScript programs 是一种命令行工具,可以作为常规Web服务器运行,并且可以运行一个JavaScript程序
  • utilizes the great V8 JavaScript engine 利用强大的V8 JavaScript引擎
  • is very good when you need to do several things at the same time 需要同时做几件事时非常好
  • is event-based so all the wonderful Ajax -like stuff can be done on the server side 是基于事件的,因此所有出色的类似于Ajax的工作都可以在服务器端完成
  • lets us share code between the browser and the backend 让我们在浏览器和后端之间共享代码
  • lets us talk with MySQL 让我们与MySQL对话

Some of the sources that I have come across are: 我遇到的一些来源是:

Considering that Node.js can be run almost out-of-the-box on Amazon's EC2 instances, I am trying to understand what type of problems require Node.js as opposed to any of the mighty kings out there like PHP , Python and Ruby . 考虑到Node.js几乎可以直接在亚马逊的EC2实例上运行,我试图了解Node.js需要哪种类型的问题,而不是像PHPPythonRuby这样的强大之王。 I understand that it really depends on the expertise one has on a language, but my question falls more into the general category of: When to use a particular framework and what type of problems is it particularly suited for? 我知道这确实取决于一个人在某种语言上的专业知识,但是我的问题更多地归结为以下一般类别:什么时候使用特定框架,它特别适合什么类型的问题?


解决方案:

参考一: https://stackoom.com/question/LF14/如何决定何时使用Node-js
参考二: https://oldbug.net/q/LF14/How-to-decide-when-to-use-Node-js
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!