您对使用嵌入式 Web 服务器的桌面应用程序的 Web GUI 有何看法

发布于 2024-07-30 04:37:20 字数 379 浏览 9 评论 0原文

重复:这是 .NET WebBrowser Control as User 的重复项界面。 让我们结束这个问题,并将任何新答案直接指向原始答案。

大家好,我需要你们在这些事情上的经验 我正在考虑一种尽可能跨平台的简单方法 最近我有一个想法,为我的用 C++ 编写的应用程序使用嵌入式 Web 服务器,作为提供跨平台 GUI 的简单方法 您对这项技术有何看法? 有人用吗? 保持轻量、跨平台、易于开发。 能够将应用程序保留为 1 个自包含的二进制文件

Duplicate: this is a duplicate of .NET WebBrowser Control as User Interface. Let's please close this question, and direct any new answers to the original.

Hello folks i need you experience in such things
im thinking on easy way to be as much as cross platform as i can
lately i had the idea of using embedded web server for my application written in c++ as a easy way to supply cross platform GUI
what do you think about this technique ? does someone use it ?
to keep it light ,cross platform , easy to develop .
ability to keep the application as 1 binary file self contained

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

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

发布评论

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

评论(2

挥剑断情 2024-08-06 04:37:20

为了可移植性而使用 Rich Web App 作为 UI 的想法是相当合理的 - 尽管跨浏览器支持确实增加了相当多的工作。

我不会想到嵌入服务器(我倾向于在多层应用程序中工作,我们自然地将表示层单独到其自己的层中),但我看不出不这样做的根本原因 - 正如你所说的单一自我包含的可执行文件确实有一些吸引力。 即使您选择将 HTML、图像等作为文件部署在文件系统中,而不是打包到应用程序中(为了便于更新,您可能会这样做),您的整体方法对我来说也是有意义的。

The idea of using Rich Web App as the UI for the sake of portability is quite reasonable - though cross-browser support does add quite a lot of work.

Embedding the server wouldn't have occurred to me (I tend to work in multi-tier apps where we natuallry separate presentation layer to its own tier) but I can't see a fundamental reason not to do this - as you say single self contained executable does have some attraction. Even if you chose to deploy the HTML, images etc as files in a file system instead of parcelled into the app (and for ease of update you might do that) you overall approach makes sense to me.

悲欢浪云 2024-08-06 04:37:20

这种方法的一个缺点是它需要最终用户启动两个进程——Web 服务器和 Web 浏览器。 您可以通过让您的应用程序同时执行这两项操作来限制影响,但最终可能会出现两个浏览器窗口而不是一个,除非您的应用程序足够智能,可以在现有浏览器中打开一个新选项卡而不是启动一个新选项卡。

但这只是冰山一角。 在走这条路之前,您应该考虑您的决定对最终用户的影响。 听起来您的主要目标是跨平台支持,而不是高质量的最终用户体验。 哪个对你来说更重要?

也许基于 Web 的前端最适合您的用户,或者更传统的 GUI 工具包可能会更好地为他们提供服务。 有许多跨平台 GUI 工具包可以让您轻松地为用户提供丰富的体验(例如,带有 python、ruby 或 Tcl 的 Tk)。

有人可能会说像 Tk、wx 等工具包必须做出妥协才能跨平台,但我认为它们提供的妥协比你在制作基于 Web 的前端时必须接受的要少得多。

当然,在做出这个决定时,你还必须考虑上市时间、你自己的技能等。 请记住,归根结底,软件应该使最终用户的某些任务变得更容易,因此问问自己,您的选择是否支持或阻碍这一点。

One downside to this approach is that it requires the end user to start two processes -- the web server and the web browser. You can limit the impact by making your application do both, but then the use may end up with two browser windows instead of one unless your app is smart enough to open a new tab in an existing browser rather than launching a new one.

That is just the tip of the iceberg though. Before going down this path you should consider the impact your decision has on the end user. It sounds like your main goal is cross-platform support rather than a high quality end user experience. Which is more important to you?

Maybe a web-based front end will be best for your users, or they may better be served by a more traditional GUI toolkit. There are many cross-platform GUI toolkits that will allow you to give a rich experience to your users with little effort (for example, Tk with python, ruby or Tcl).

Some may say that toolkits like Tk, wx, etc have to make compromises to be cross-platform, but I think they provide far fewer compromises than you have to accept when making a web based front end.

Of course you also have to consider time-to-market, your own skills, etc when making this decision. Just remember that at the end of the day the software should make some task easier for the end user, so ask yourself if your choice supports or hinders that.

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