简体   繁体   English

用于与USB设备连接的Web应用程序的Python或Node.js?

[英]Python or Node.js for a Web app which interfaces with a USB devices?

I'm looking to develop a web app that controls Concept2 rowing gym equipment connected to the users computer via USB. 我正在寻求开发一个Web应用程序,该应用程序控制通过USB连接到用户计算机的Concept2划船健身设备。 I'm trying to decide what approach I should take in developing something like this. 我正在尝试决定在开发这种东西时应该采取什么方法。

Control of these devices has been achieved in the past both in python: ( https://github.com/uvd/PyRow ) and using node/jQuery: ( https://github.com/tijmenvangulik/ErgometerJS ). 过去,这些设备的控制都可以通过python:( https://github.com/uvd/PyRow )和使用node / jQuery:( https://github.com/tijmenvangulik/ErgometerJS )来实现。

An SDK and documentation is provided by the developers of Concept2 gym equipment. Concept2健身器材的开发人员提供了一个SDK和文档。 DLL and CSafe commands are used to interface with the machines monitors. DLL和CSafe命令用于与机器监视器连接。 ( https://www.concept2.com/service/software/software-development-kit ) https://www.concept2.com/service/software/software-development-kit

I'm looking for recommendations on how I should this tackle this project. 我正在寻找有关如何解决该项目的建议。 At the moment python seems like the best approach however I have no idea how I can run these python files through a website interacting with the java script front end. 目前,python似乎是最好的方法,但是我不知道如何通过与Java脚本前端交互的网站来运行这些python文件。

Any advice or pointers is appreciated. 任何建议或指针表示赞赏。

David 大卫

You task looks like a simple SCADA solution with web interface. 您的任务看起来像一个带有Web界面的简单SCADA解决方案。

You choice depends on whether you have experienced developers, who are able to use modern frameworks like Vue.js , Angular , React and others or not. 您的选择取决于您是否有经验丰富的开发人员,他们是否能够使用Vue.jsAngularReact等现代框架。

Really, in your particular case - monitoring equipment over web, you don't necessary need to invest a lot in your front-end - depends on your target audience. 确实,在您的特定情况下-通过Web监视设备,您不需要在前端投入大量资金-取决于目标受众。 Is it a single service engineer? 是一位服务工程师吗? If yes , probably your front-end should be minimalistic, you can use Python with Twisted for static web server and build your frontend on bootstrap plus jquery . 如果 ,则您的前端应该是简约的,您可以将Twisted与Python一起用于静态Web服务器,并在bootstrap plus jquery上构建前端。 This is a fast win solution and you can implement it even if you've never worked with web. 这是一个快速获胜的解决方案,即使您从未使用过Web也可以实施它。

More complex approach, requiring more engineering, is Python + Flask . 需要+ +更多工程的更复杂方法是Python + Flask

If you feel ready for modern frameworks, like Vue, React, Angular, then, possibly, you'd better look at NodeJs as a backend. 如果您准备好使用Vue,React,Angular等现代框架,那么最好将NodeJs作为后端。 They are better integrated with NodeJs and its package manager npm . 它们与NodeJ及其包管理器npm更好地集成。 You will need it to build the project on your server side; 您将需要它来在服务器端构建项目。 also some people treat it as a solid solution, when using the same language ( javascript ) for both backend and frontend. 当后端和前端使用相同的语言( javascript )时,也有人将其视为可靠的解决方案。 As for me, it doesn't really matter a lot. 对于我来说,这并不重要。

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

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