使用 Wt C++ 的经验框架?

发布于 2024-08-11 16:02:00 字数 1437 浏览 4 评论 0原文

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

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

发布评论

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

评论(6

空‖城人不在 2024-08-18 16:02:00

我一直在使用 Wt 构建直接链接到 C++ 库的应用程序,但并没有特别花很多精力来练习 CSS 等布局功能。到目前为止,在构建此类应用程序时,它可以很好地替代 GTK。我是一个纯粹的 Linux 用户,也是一个真正喜欢用 C++ 编程的未洗礼的异教徒之一,这个框架是我构建一个实际上可以跨多个平台使用的应用程序的完美方式。

I've been using Wt to build apps that directly link to C++ libraries but don't particularly make a lot of effort to exercise the layout features such as CSS. So far, it works great as a replacement for GTK when building these kind of applications. I'm a Linux user exclusively and I'm also one of the unwashed heathen who actually enjoys programming in C++, and this framework is a perfect way for me to build an application that can actually be used across many platforms.

廻憶裏菂餘溫 2024-08-18 16:02:00

我个人没有使用过该框架,但与一些使用过的人讨论过。它们实际上没有任何限制,但我发现很难相信它们每次都在编译。他们的主要评论是,就内存使用而言,服务器的负载相当轻。就我个人而言,我认为 php、python、ruby 等解释语言非常适合 Web 开发的本质 - 但这不是您问的问题。最大的优势可能是能够利用您现有的技能在新媒体中工作。

网上也有一些很好的评论讨论利弊。这是我发现的 http://discuss.joelonsoftware.com/default.asp? biz.5.599655.33

然而,我认为这里的主要答案是,如果没有考虑到特定的项目需求,就很难评估任何框架的适用性。如果您认为尝试用它编写一些东西会很有趣,那么就尝试一下吧。这将是确定它是否适合您的需求的最佳(如果不是唯一)方法。

I have not personally used the framework, but have discussed it with a few people that have. They didn't really have any limitations, but I found it hard to believe they were compiling every time. Their main comment was that it was quite a light load on the server in terms of memory usage. Personally, I think the interpreted languages of php, python, ruby, etc work well with the nature of web development - but that's not the question you asked. Probably the biggest advantage is being able to use your existing skill set to work in a new medium.

There are also a few good comments online discussing pros and cons. Here is one I found http://discuss.joelonsoftware.com/default.asp?biz.5.599655.33

However, I think the main answer here is that without a specific project requirement in mind, it is going to be difficult to evaluate any framework for suitability. If you think it will be fun to try coding a few things with it, then give it a go. That is going to be the best (if not only) way to determine if it suits your needs.

淡墨 2024-08-18 16:02:00

我尝试过几种 C++ 嵌入式 Web 服务器。它们使用起来往往是一个挑战,而且对 Windows 不友好。

(你没有提到你的平台。如果你在 Unix 上,那么我怀疑你会发现可用的服务器更容易使用,并且可能会忽略这个答案。如果你在 Windows 上,请继续阅读...)

我已经尝试过 Wt ,但被大量的安装所击败,这需要几个小时的编译并生成一页又一页的警告,以及广泛的学习曲线。 Wt 是以 Qt 为模型的,因此如果您熟悉 Qt,学习曲线将不那么困难。

我尝试过 John Bartas 的 Webio 我喜欢这个概念,而且效果很好。然而,我发现它使用起来过于复杂,而且服务器代码很难理解。 Webio 的许多复杂性是由于使用“HTML 编译器”隐藏 HTML 页面而导致的,这些 HTML 页面控制嵌入在应用程序代码中的文件系统内的 GUI 外观。我更喜欢将 HTML 页面放在外面的简单视图中,这样我就可以调整 GUI,而无需重新编译应用程序。

我还查看了 TWS 这是由 Richard Hipp 撰写的,他负责 SQLITE 和FOSSIL,我是它的忠实粉丝。不过TWS从2001年开始就没有维护了,也不是真正的WINDOWS,所以我无奈决定不追究了。

最后,我推出了自己的,名为 WEBEM,基于最小修改版本boost::asio 网络服务器。在概念上与 TWS 类似但更简单,它允许 html 代码执行 C++ 方法。

I have tried several C++ embedded web servers. They tend to be a challenge to use, and not Windows friendly.

( You do not mention your platform. If you are on Unix, then I suspect you will find the available servers easier to use, and can probably ignore this answer. If you are on Windows, read on ... )

I have tried Wt, but was defeated by the massive installation, which takes hours to compile and generates page after page of warnings, and the extensive learning curve. Wt is modeled on Qt, so if you are familiar with Qt, the learning curve will be much less of a challenge.

I have tried Webio by John Bartas I liked the concept and it worked well. However, I found it overly complicated to use and the server code hard to understand. A lot of the complexity of Webio is caused by using an “HTML compiler” to hide the HTML pages that control the appearance of the GUI inside a file system embedded inside the application code. I prefer to have the HTML pages outside in plain view where I can adjust the GUI without recompiling the application.

I have also looked at TWS This is by Richard Hipp who is responsible for SQLITE and FOSSIL and of whom I am a great fan. However, TWS has not been maintained since 2001 and is not really WINDOWS, so I reluctantly decided not to pursue it.

In the end I rolled my own, called WEBEM based on a minimally modified version of the boost::asio web server. In concept similar to, but simpler than TWS, it permits html code to execute C++ methods.

甜`诱少女 2024-08-18 16:02:00

说实话,我看过它,但我发现了一个重大的 Wt 设计缺陷——它模仿 Qt。尝试使 Web 应用程序的外观和行为类似于 GUI。

我认为,这种做法是错误的。客户端和服务器端之间应该有明确的分离。

如果您对 C++ Web 编程感兴趣,请查看 CppCMS,它具有更传统的 MVC 模型。

请注意,我有偏见,因为我是 CppCMS 的开发人员。

To be honest, I had looked on it but I see one significant Wt design flaw -- it modeled after Qt. Trying to make web applications to look and behave like GUI.

I think, this approach is wrong. There should be clear separation between client side and server side.

If you are interested in C++ web programming take a look on CppCMS which has more traditional MVC model.

Note, I have biased opinion, because I'm developer of CppCMS.

谁的年少不轻狂 2024-08-18 16:02:00

使用它制作了一个待办事项列表应用程序。效果很好,没有问题。

Made a todo list app using it. works great, no problems.

生生不灭 2024-08-18 16:02:00

我目前使用它来开发一个 GPS 测量处理 Web 应用程序,该应用程序基于用 C 实现的处理算法。它运行良好,并且与旧版 C/C++ 代码具有良好的协同作用。

它的文档不是那么广泛,并且缺乏学习教程和相关书籍使得它在某种程度上难以学习。

I currently use it to develop a GPS measurements processing web application, based on processing algorithms implemented in C. It works well and has a good synergy with legacy C/C++ code.

It's documentation its not so extensive and the lack of learning tutorials and related books makes it somehow hard to learn.

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