开发者

Node.js: Socket.io + Express needed for real-time apps?

I have just began working with node.js and have gotten the hang of the basics.

Right now I'm trying to see if I can create my very first real-time web application using n开发者_Go百科ode, during my research I have seen modules like "express.js" and "socket.io' pop up very often as frameworks used for node web apps.

My question is; do I really need to learn these two in order to make real-time production level node.js applications?

Also, what other things should I look at? I heard about tempting engines being an asset, but 'm not sure of their use.


You don't need to use any modules but you give up a lot when you don't. Express.js is a great place to start. It has good documentation and makes the whole process much easier. I use jade and stylus for my css and templates.

Socket.io is again optional but if you are doing real-time updates it sure makes things a lot simpler. Socket.io deals with all of the browser differences with one api and the client will always connect using the fastest technology.


Socket.IO is mandatory for real-time applications. If you have to implement a chat, a broker, a server status tool or something like that and other natural real app, you must consider use this Node package. If your site do not require something real-time bi-directional message handler you just avoid the usage of this tool.

In case of all application needs to be made in real-time situation, you can see a more appropriate framework to approach it, like Meteor

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜