简体   繁体   English

交互式Web应用程序的技术堆栈和最佳实践

[英]Technology stack and best practices for an interactive web application

I'm trying to pick a technology stack for an interactive web application. 我正在尝试为交互式Web应用程序选择技术堆栈。

Project requirements: 项目要求:

1) Application is actually a full-screen board, holding a number of rectangle objects which interact with one another. 1)应用程序实际上是一个全屏板,其中包含许多相互交互的矩形对象。

2) One lead user (demonstrator) is able to add new objects to the board, and to determine the position, angle, facing and the size of them. 2)一个首席用户(演示者)能够将新对象添加到板上,并确定它们的位置,角度,朝向和大小。 An ideal way to do that would be if a user could drag a simple left click selection on an empty space on the board, while being able to rotate that selection during the time the right click is also pressed. 这样做的理想方法是,用户可以将简单的左键单击选择拖到板上的空白区域,而又可以在按下右键的同时旋转该选择。 Upon releasing the mouse the rectangle object would be drawn on the selected surface. 释放鼠标后,将在所选表面上绘制矩形对象。

3) The demonstrator can resize the objects, rotate them and move the objects around by dragging them (while being able to rotate them while moving if the right click is also pressed). 3)演示者可以调整对象的大小,旋转对象并通过拖动对象来移动对象(如果还按下右键,则可以在移动的同时旋转对象)。 It would be really nice if I could measure how much the objects moved in the process (in arbitrary measurement units). 如果我可以测量对象在过程中移动了多少(以任意测量单位),那将是非常好的。

4) A number of observers / users / clients can join the demonstration room and observe: 4)许多观察员/用户/客户可以加入演示室并观察:

  • I would prefer that they observe the moving of the objects in real time. 我希望他们实时观察物体的运动。 If not, 如果不,

  • I would like that they can see the animation which translates the object from its previous position to its new position. 我希望他们可以看到动画,该动画将对象从之前的位置转换为新的位置。 If not, 如果不,

  • It would be acceptable if the object just moves instantaneously to its new position. 如果对象只是瞬时移动到其新位置,那将是可以接受的。

5) Number of supported observers: 5)支持的观察员人数:

  • I need to seamlessly support 50. 我需要无缝支持50。

  • I would like to support up to a thousand. 我最多支持一千个。

  • Please suggest an arbitrary number that the technology stack could support with a cheap non-dedicated server at start (but with the option for upgrade later and how it would scale with the number of supported clients). 请提出一个技术栈可以在开始时使用便宜的非专用服务器支持的任意数量(但可以选择以后进行升级,以及如何随支持的客户机数量扩展)。

6) The demonstrator can nominate another user to be an "assistant demonstrator" and get full privileges, but separate jurisdiction (cannot move demonstrator's objects, only add / move / delete his own) 6)演示者可以提名另一个用户为“辅助演示者”并获得全部特权,但是具有单独的权限(不能移动演示者的对象,只能添加/移动/删除自己的对象)

7) It must be able to work without Flash or Java installed (which effectively leaves them out of the equation). 7)它必须能够在没有安装Flash或Java的情况下工作(有效地使它们脱离了方程式)。

Bonus points: 奖励积分:

1) Scalability (responsive design) and how it affects the Canvas ("resolution" should stay the same, pixel size should adjust, while keeping the same aspect ratio of 16:9) 1)可伸缩性(响应式设计)及其如何影响Canvas(“分辨率”应保持不变,像素大小应调整,同时保持16:9的相同长宽比)

2) Mobile device support - Able to work reasonably well (maybe without some advanced aspects) on newer mobile devices and tablets 2)移动设备支持-能够在较新的移动设备和平板电脑上正常运行(也许没有某些高级方面)

3) Observers have the option to also move the objects around (only client-side, in their browser), while being able to revert back (sync) to the actual (current) state. 3)观察者可以选择也移动对象(仅在客户端,在其浏览器中),同时能够恢复(同步)到实际(当前)状态。

What comes to my mind: 我想到的是:

The first thing that comes to my mind is: 我想到的第一件事是:

  • HTML5 Canvas and a JS library for drawing and manipulating objects on it ( fabricjs seems promising) HTML5 Canvas和一个用于在其上绘制和操作对象的JS库( fabricjs看起来很有希望)

  • node.js with a suitable framework (Meteor seems to be in full swing at the moment, and equipped to handle real-time synchronizing with lots of clients) 具有合适框架的node.js(Meteor目前似乎如火如荼,并且能够处理与许多客户端的实时同步)

But I am not really familiar with either and cannot judge if they would be the optimal stack to develop this project on. 但是我都不是很熟悉,也无法判断它们是否是开发此项目的最佳堆栈。

Do you have any recommendations? 你有什么建议? I have experience with jQuery / PHP / AJAX and haven't ventured much outside of them, but have no qualms learning something new, especially if it's fairly modern and interesting. 我在jQuery / PHP / AJAX方面有丰富的经验,并且没有在它们之外进行任何尝试,但是对学习新东西没有丝毫兴趣,尤其是当它相当现代且有趣时。

PS: I'm at a loss as to how to tag this question, so feel free to tag it however you deem appropriate. PS:我对如何标记这个问题一无所知,因此,只要您认为合适,就可以随意标记。

Maybe the CollabSketch Vaadin plugin https://github.com/Mazku/collabsketch_vaadin with the source available here might give you a starting point. 也许CollabSketch Vaadin插件 https://github.com/Mazku/collabsketch_vaadin以及此处可用的源可能为您提供了一个起点。 Vaadin comes with push and mobile support and the required tech knowledge could be Java + Vaadin(GWT) + Maven + Tomcat Vaadin带有推送和移动支持,所需的技术知识可能是Java + Vaadin(GWT)+ Maven + Tomcat

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

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