我试图了解最新和最伟大的技术,并很好奇所有这些不同的技术如何结合在一起.
I'm trying to get an overview of what's latest and greatest, and was curious how all these different technologies fit together.
是这样的吗:
Nodejs 是一个网络服务器,主干只是一个可以在 nodejs 上运行的框架?
Nodejs is a webserver, backbone is just a framework that will run on nodejs?
SocketIO 是一个与骨干一起工作的库吗?
SocketIO is a library that works with backbone then?
实际代码可以用 coffescript 编写,编译后将是 javascript.
And the actual code can be written in coffescript, which when compiled, will be javascript.
那么快递呢?这个可以用吗.
What about express then? Could this be used.
请指出这些是否是不能一起工作的组件/框架等.
Please point out if these are components/frameworks that don't work together etc.
是的,CoffeeScript 可以毫无问题地与 Node.js 一起使用.事实上,如果你使用默认的 coffee 可执行文件,它就是 Node.js,你甚至不需要编译成 JavaScript 就可以运行它.
Yes, CoffeeScript will work with Node.js without problem. In fact, if you you use the default coffee executable, it is Node.js and you don't even need to compile to JavaScript in order to run it.
对于 Backbone,它实际上是一个客户端库.您也可以在这里使用 CoffeeScript,但您需要将代码编译为 JavaScript,因为浏览器只知道 JS.您通常不会在 Node 中运行 Backbone.js.
As for Backbone, it is really a client-side library. You can also use CoffeeScript here, but you need to compile the code to JavaScript since the browsers only know JS. You wouldn't typically run Backbone.js in Node.
至于Express,它是一个Node框架,所以预计在Node.js中可以在服务器上工作.
As for Express, it is a Node framework, so it is expected to work on the server in Node.js.
所以,总结一下:
这有帮助吗?
这篇关于node.js、backbone、socketio 和 express 和 coffee 脚本都在一起吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!