JQuery/JavaScript 可以用来编写大量的客户端应用程序吗?

发布于 2024-09-02 16:44:52 字数 469 浏览 2 评论 0原文

我遇到了一个不寻常的情况 - 我有一个带有复杂 UI 的嵌入式视频流设备,并且我需要使用嵌入式 Web 服务器通过 Web 浏览器重现该 UI。我正在考虑在 C++ 后端上使用 JavaScript/JQuery(我不是自己编写所有这些代码,我需要雇用人员来完成繁重的工作)。

嵌入式Web服务器的功能远不如PC强大,因此我想编写一个在浏览器中运行整个UI的应用程序,并且仅与服务器通信以来回传递新的程序设置,从设备获取状态更新,并控制视频播放。

换句话说,客户端获取一个大页面或少量大页面(有效下载应用程序),应用程序维护大量本地内存存储,并且一旦页面首次加载,服务器就不会发送任何与布局相关的内容。

该应用程序有两行选项卡可导航约 40 个菜单页面、拖选控件可在网格中选择单元格、排序列表、大量标准数据输入选项,并且应该能够控制最多 16 个嵌入式视频播放器立即(最好是 VLC)。

这在具有 C++ 后端的 JavaScript/JQuery 中可能吗?

I have an unusual situation - I have an embedded video streaming device with a complicated UI, and I need to use an embedded web server to reproduce that UI through a web browser. I'm thinking of using JavaScript/JQuery on a C++ backend (I am NOT coding all this myself, I need to hire people for the grunt work).

The embedded web server is much less powerful than a PC, so I want to write an application that runs the entire UI in the browser, and only communicates with the server to pass new program settings back and forth, get status updates from the device, and control video playback.

In other words, the client gets one big page or a small number of big pages (effectively downloading the application), the application maintains significant local memory storage, and once the pages are first loaded the server never sends anything layout-related.

The application has two rows of tabs to navigate ~40 menu pages, drag-and-select controls to pick cells in a grid, sorted lists, lots of standard data entry options, and it should be able to control up to 16 embedded video players at once (preferably VLC).

Is this possible in JavaScript/JQuery with a C++ backend?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

巨坚强 2024-09-09 16:45:04

您可能会考虑使用富客户端技术,例如 Silverlight。它是为复杂的用户界面而构建的,并且开发体验比大多数其他选项要好得多。

Silverlight 服务器上不需要 .NET,并且可以通过简单的方式轻松通信REST 或 SOAP 服务(请参阅 gSOAP)。

You might instead consider a rich client technology like Silverlight. Complicated UI is what it's built for and the development experience is much nicer than most other options.

Silverlight doesn't require .NET on the server and can easily communicate over simple REST or SOAP services (see gSOAP).

怂人 2024-09-09 16:45:02

您可能想看看使用 Dojo 而不是 jquery。它确实更适合这类事情。这绝不意味着您不能在 jquery 中做到这一点,Dojo 只是更好地设计 IMO 来创建整个 JS 应用程序。当然值得注意的是,这也使得它的使用比 jQuery 复杂得多。

You might want to take a look at using Dojo as opposed to jquery. Its really gear more towards this type of thing. By no means does that mean you couldnt do it in jquery, Dojo is just better design IMO to create an entire JS application. Of course it should be noted that this also makes its usage much more complex than jQuery's.

ゃ人海孤独症 2024-09-09 16:45:01

一切皆有可能。

值得吗?取决于您的要求。请记住:

  • 您必须有某种应用程序服务器支持。手动编码会占用资源。
  • 您还必须更新嵌入式设备上的 C++ 可执行文件。您最终可能会支持多种设备。因此,如果支持的设备数量增加,这可能会成为一个问题。
  • 与服务器上的 php/ruby/perl 开发人员相比,C++ 工程资源通常更昂贵(对于廉价的 C++ 工程师,您将支付 2 倍的错误修复费用)。

Everything is possible.

Is it worth it? Depends on your requirements. Keep in mind:

  • You'll have to have some kind of application server support. Coding it by hand will take resources.
  • You'll also have to update the c++ executable on the embedded device. You may potentially end up supporting multiple devices. So this can be a problem if a number of supported devices grows.
  • c++ engineering resources are typically more expensive (and with cheap c++ engineers you'll pay 2x in bugfixes) vs php/ruby/perl developers on the server.
负佳期 2024-09-09 16:44:59

这绝对是可能的。研究一下 Jquery 与服务器通信的 AJAX 框架,然后看看 一些C++ Web 工具包,用于制作一些轻量级 Web 服务控制器。

It's definitely possible. Look into Jquery's AJAX framework for communicating with the server, and then look at some C++ web toolkits for making some lightweight web service controllers.

当梦初醒 2024-09-09 16:44:57

Ext JS 会在 UI 方面为你节省很多,它可用于在很短的时间内创建具有丰富控件的非常复杂的布局。它甚至有自己的图形编辑器,您可以在添加处理程序之前创建 UI。

它的 API 文档也非常好,比大多数其他库要好得多。

至于其余的,我很确定有现成的网络服务器可供您研究;看看此处 - 其中大多数可能会暴露 CGI 应用程序。

Ext JS would save you a lot on the UI side, it can be used to create very complicated layouts with rich controls in very little time. It even has its own graphical editor where you can create the UI prior to adding handlers.

Its API Documentation is also very good, its far better than most other libraries.

And for the rest, well, I'm pretty sure that there are ready made webservers that you could look into; take a look here - most of these can probably expose a CGI application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文