问题:
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: 我遇到的一些来源是:
- Diving into Node.js – Introduction and Installation 深入Node.js –简介和安装
- Understanding NodeJS 了解NodeJS
- Node by Example ( Archive.is ) 示例节点 ( Archive.is )
- Let's Make a Web App: NodePad 让我们制作一个Web应用程序:NodePad
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需要哪种类型的问题,而不是像PHP , Python和Ruby这样的强大之王。 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
来源:oschina
链接:https://my.oschina.net/u/3797416/blog/4463510