简体   繁体   English

单独使用Node.js或与其他服务器工具一起使用

[英]Node.js alone or as a companion to another server tool

For my final year project at University I'm going to be creating an application which will use Node.js to send messages to update the position of a set of elements on the screen. 对于我在大学的最后一年的项目,我将创建一个应用程序,它将使用Node.js发送消息以更新一组元素在屏幕上的位置。

Detailed description of my goal: 我的目标的详细说明:

A user should be able to create a room, a room can contain custom widgets such as pictures, ideas, music and video. 用户应该能够创建一个房间,一个房间可以包含自定义窗口小部件,例如图片,想法,音乐和视频。

Other users should be able to view this users room, and comment on these widgets, like them, tweet about them etc. All widgets are movable and have an x,y coordinate and this will be broadcast every time an element is moved (using websockets). 其他用户应该能够查看此用户房间,并对这些窗口小部件(例如它们,关于它们的推文)发表评论。所有窗口小部件都是可移动的,并且具有x,y坐标,并且每次元素移动时都会广播(使用websockets) )。

A widget can be deleted or edited by the owner, this will update the element (once again websockets). 所有者可以删除或编辑窗口小部件,这将更新元素(再次是websocket)。

There will also be a built in chat feature to allow users to talk (in real time, using web sockets). 还将提供一个内置的聊天功能,以允许用户交谈(使用Web套接字实时)。

The widget details will be stored in a database 小部件详细信息将存储在数据库中

There is more functionality which isn't relevant to web sockets so I've omitted it. 还有更多与Web套接字无关的功能,因此我省略了。

The following image demonstrates what i'm building : (sorry about the size!) http://jtbrown.me.uk/assets/unrelated/mindcloud.jpg 下图演示了我正在构建的图像 :(抱歉大小!) http://jtbrown.me.uk/assets/unrelated/mindcloud.jpg

I've really only got two questions: 我真的只有两个问题:

  1. Would I be better off using node on its own? 我会更好地自己使用节点吗? (I'm not experienced in server side JavaScript) (我没有服务器端JavaScript经验)

  2. Is it feasible to combine it with another web server such as Zend? 将其与另一个Web服务器(例如Zend)结合起来是否可行?

You should be able to do this in node alone, but maybe you want to use a basic web–framework based on node to make things a bit easier and to save time and work. 您应该能够仅在节点上执行此操作,但是也许您想使用基于节点的基本Web框架,以使事情变得更加简单并节省时间和工作。 I would recommend looking into ExpressJS or maybe even Zappa (based on ExpressJS) if you want to try out the excellent CoffeeScript . 如果您想尝试出色的CoffeeScript,我建议您研究ExpressJS甚至Zappa (基于ExpressJS)。

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

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