X Windows 风格的 JS UI 客户端
总而言之,
我有一段时间一直有一个想法:是否有像 X Windows 这样的 HTML+JS 标准图形库/协议?我主要是一名桌面开发人员,拥有 C#/WPF 等技术的经验,但我希望参与 Web 革命。 :)
对我来说,大多数用于显示交互式应用程序的网络技术似乎过于专有、缓慢或图形效果较差,与我对桌面应用程序的期望相比,即使是在慢速计算机上。看起来,如果有一种方法可以使用抽象的图形和用户输入层以及可靠的准双向通信,那么让真正的桌面应用程序在几乎所有浏览器中显示并不是非常困难。
现在我所说的不仅仅是闲聊:我已经得到了一些用 WPF 编写的东西,开始在 milcore 层提取图形基元,并通过 Orbited 和 Raphael 前端使用模拟套接字将它们推送到网络上端渲染主要是作为一种有趣的技巧。到目前为止,这并不难,所以我认为一定是其他人做到了。 WPF 不是每个人都喜欢的,但另一方面,许多人可能希望有一种可靠的 OOP 语言来编码大部分后端内容,并在前端使用标准化图形协议,而不仅仅是 HTML/CSS。
现在对我来说,这似乎是一个非常基本的事情 - 浏览器中真正的图形客户端,在几乎所有浏览器上,没有插件。我们的浏览器可以执行所有这些高级操作并播放音频和视频。我只想画可以变化的三角形。我想我只是错过了机会,正在重新发明轮子。有人可以给我指出一个已经做到这一点的项目吗,这样我就可以制作一些很棒的网络应用程序?
All,
I've had an idea kicking around for a while now: Is there a standard graphics library/protocol like X Windows for HTML+JS? I'm primarily a desktop developer with experience in technologies like C#/WPF, but I'd like my piece of the web revolution. :)
To me most web technologies for displaying interactive apps seem to be too proprietary, slow, or graphically poor compared to what I expect from a desktop app on even a slow computer. It seems like if there were a way to use an abstracted graphical and user input layer and solid quasi-two-way communication, it wouldn't be terribly difficult to make true desktop apps displayed in nearly all browsers.
Now what I'm saying isn't just idle chat: I've gotten a little something cooked up with WPF to start extracting graphics primitives at the milcore layer and am pushing those out across the web using simulated sockets via orbited and Raphael for front-side rendering primarily as a fun hack. So far it wasn't that hard, so I figure somebody else must have done it. WPF isn't everybody's cup of tea, but on the flip side many folks would probably love to have a solid OOP language to code most of the backend stuff with a standardized graphics protocol to the front end that's not just HTML/CSS.
Now to me this seems like a very basic thing - a truly graphical client in the browser, on almost all browsers, sans plugins. We have browsers that can do all these high-level things and play audio and videos. I just want to draw triangles that can change. I assume I've just missed the boat and am reinventing the wheel. Can somebody please point me to a project that does this already so I can make some awesome web apps?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
事实上,您对运行时来自后端的低级控制感兴趣,这可能是一个阻碍,除非您可以接受很多的滞后。
在网络世界中,服务器和客户端之间的通信需要更长的时间。在桌面上,延迟不值得测量,但在网络上,通过 HTTP 请求,延迟是真实的、高度可变的,并且可能会破坏用户体验。
(+50ms-500ms 传输)
所以...我不确定您的确切架构现在想到的在网络上是可行的。
如果你稍微重新审视你的假设,你的选择就会增加很多。例如,消除应用程序逻辑一直往返到后端的要求将是非常自由的。尝试对桌面范例的这种解释来了解大小:
有趣的问题!
The fact that you're interested in low level control from the backend at run time is probably a show-stopper, unless you can accept lots of lag.
It takes a lot longer to communicate between the server and client in the web world. In a desktop, the lags are not worthy of measurement, but on the web, with HTTP requests, the delays are real, highly variable and potentially UX-destroying.
(+50ms-500ms to transfer)
So... I'm not sure the exact architecture you're thinking of is feasible on the web.
If you revisit your assumptions a little, your options grow quite a bit. Removing the requirement to make roundtrips all the way to the backend for the application logic, for instance, would be very liberating. Try this interpretation of the desktop paradigm on for size:
Interesting question!
如果我理解正确的话,您正在寻找一个库,该库可以使构建 UI 的过程不再需要 HTML 零敲碎打的工作。嗯,值得说明的是显而易见的事情;除非在不久的将来发生重大事件,否则所有无插件 Web 应用程序最终都将基于 HTML+JS。
Raphael 是一个很好的工具,可以在所有浏览器上通用图形调用,提供一致的绘图 API,但它本身并不意味着是一个 UI 解决方案。
您可能想看看 extJs,它现在是 Sencha 的一部分。我自己已将其用作相当复杂的内部 BOM 管理工具。它提供了大量即用型 UI 组件,与 WPF 非常相似。它还提供了集成的 RPC 机制,用于与服务器端逻辑集成。
If I understand correctly, you are looking for a library that makes the process of putting together a UI less of an HTML piecemeal effort. Well, it's worth stating the obvious; unless something drastic happens in the near future all plugin-free web apps will, ultimately, be based on HTML+JS.
Raphael is a great tool for generalizing graphics calls on all browsers providing a consistent drawing API, however it is not meant to be a UI solution by itself.
You might want to take a look at extJs, now a part of Sencha. I have used it myself for a fairly elaborate internal BOM management tool. It provides a massive collection of ready-to-use UI components, much like WPF. It also provides an integrated RPC mechanism for integration with server-side logic.
有
有几家公司(手头上没有具体名称)拥有运行良好的纯 JavaScript RDP 客户端。还有一个名为 Guacamole 的开源项目,它可以与 RDP 和 VNC 通信。
您在具有远程桌面服务的计算机上运行他们的服务器,它充当“客户端”的 Websocket 网关。做工精美。我们将把它用于有大量数据输入 UI 的应用程序。
想象一下,必须编写一个复杂的应用程序,该应用程序需要 1000 万个数据点,并允许您放大到任何缩放级别。创建一个网络应用程序来做这件事会浪费资源。
现在大多数浏览器都提供了 websocket,坦率地说,我很惊讶我没有更频繁地看到这种情况。我敢肯定
There are
Several companies, don't have the names on hand, that have pure javascript RDP clients that work well. There is also an open source project called Guacamole which can talk RDP and VNC.
You run their server on a machine that has Remote Desktop Services and it acts as a websockets gateway to the "client". Works beautifully. We're going to use it for an application where there are huge amounts of data feeding the UI.
Imagine having to write a complicated application that took 10 million data points and allowed you to zoom in to any zoom level. Creating a web app to do that would be a waste of resources.
With websockets available now in most browsers, I'm frankly surprised that I don't see this more often. I'm sure