CppCMS 与 C++ 服务器页面与 Wt

发布于 2024-07-27 20:56:23 字数 330 浏览 12 评论 0 原文

我知道 Wt 是其中最稳定的,但使用起来有点不舒服。
CppCMS 听起来不错,但它的稳定性如何? 它的安全性如何?
我也遇到过 C++ 服务器页面,但其中没有任何关于其安全性的信息。
有谁对这些图书馆有过一些经验并且可以启发我吗?

I know Wt is the most stable of them, but it's a bit uncomfortable to use.
CppCMS sounds good but how stable is it? How secure is it?
I have encountered C++ Server Pages as well but there's nothing about their security in there.
Has anyone had some experience with any of those libraries and can enlight me?

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

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

发布评论

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

评论(4

别靠近我心 2024-08-03 20:56:23

首先,有几个区别:

  1. Wt是类似GUI的框架,它与传统的Web开发相差甚远。 所以,如果你
    想要开发一个像 GUI 一样的代码,它适合您。
  2. CppCMS 是针对性能进行优化的传统 MVC 框架,它具有许多功能,如模板引擎、表单处理、i18n 支持、会话、高效缓存等,支持各种 Web 服务器 API:FastCGI、SCGI 和 CGI​​。 如果您来到姜戈世界,您会发现自己就像在家里一样。
  3. 我对第三个项目不太熟悉,但它感觉更像 PHP——你把
    模板内的 C++ 代码并没有明确分离视图和控制器。

稳定性,我只能说CppCMS,稳定,有应用程序在运行
7月24日,作者博客和包含CppCMS文档的Wiki都是用CppCMS编写的。
因此,不应该存在严重的错误。

披露:我是 CppCMS 的开发人员。

First of all, several differences:

  1. Wt is GUI like framework, it is quite far from traditional web development. So, if you
    want to develop a code as if it was GUI it is for you.
  2. CppCMS is traditional MVC framework optimized for performance, it has many features like template engines, forms processing, i18n support, sessions, efficient caching and so on, support of various web server APIs: FastCGI, SCGI and CGI. If you come for Django world, you would find yourself at home.
  3. I'm less familiar with the third project, but it feels more like PHP -- you put the
    C++ code inside templates and has no clear separation of View and Controller.

Stability, I can tell only about CppCMS, it is stable, and there are applications running
it 7/24, the authors blog and the Wiki with documentation of CppCMS are written in CppCMS.
So, there shouldn't be major critical bugs.

Disclosure: I'm developer of CppCMS.

成熟的代价 2024-08-03 20:56:23

我是 libapache2-mod-raii 的开发者,我很失望我们没有推荐这个库用于生产工作...因为我这样做! :)

我还想指出的是,该项目页面也有英文版本。

另一方面,我不同意 Steve 的观点,即 servlet 不是即时编译的,因为它们本来就是这样!

否则,尽管我正在研究这个问题,但缺乏 prefork 支持并不是我的观点。

I am the developper of libapache2-mod-raii and I am very disappointed we did not recommend this library for production work... Cause I do ! :)

I also like to point out that the project page is also available in English.

On the other hand, I do not agree with Steve about the fact that servlets are not compiled on the fly, as they are !

Otherwise, on the lacks of prefork support is not my point of view, although I was looking on the issue.

書生途 2024-08-03 20:56:23

顺便说一句,我不久前使用 mod_raii 快速移植了Web 上现有的 C++ 应用程序。

它采用与 JSP 完全相同的方法,将整个编译部分委托给 Apache 模块。

我不能推荐将它用于生产用途,因为我没有太多的经验,但是它绝对是值得使用的东西,而且我没有任何经验当时的问题。

它缺乏一些功能,例如对预分叉 apache 的支持,但具有所有需要的核心功能。

On a side note, I used mod_raii a while ago to rapidly port some parts of an existing C++ application on the web.

It takes exactly the same approach than JSP, with the whole compilation part delegated to the Apache module.

I cannot recommend it for production use, since I don't have much experience in it, but it is definitely something worth playing around with, and I didn't have any issue at the time.

It lacks some features like the support of a preforked apache, but has all the needed core features.

み青杉依旧 2024-08-03 20:56:23

2018年的回答:

我运行在有限的硬件资源上,所以C++是我首先想到的。 我通过查看 此 Web 框架基准测试cutelystQt 衍生品)和 Wt 占据了榜首。 他们都是非自由派。 因此,我研究了treefrog。 在第一个也是唯一一个教程之后,很明显它使用了 Qt 中的 qmake,因此适用了 Qt 的 LGPL。

我不情愿地选择了列表底部的 CppCMS,因为 ffead 错误太多,而且 poco 不是一个全栈框架。

深入研究教程,在文档方面,CppCMS 远远领先于 treefrog。 前几个教程很容易理解。 然而,当我开始遇到问题时,几乎不存在帮助。 我无法想象使用 treefrog 来完成某件事会是什么样子。 缺乏文档(以及好的文档)是我首先抛弃它的原因。

由于严重的障碍,我差点就放弃了 CppCMS。 一个小小的社区无法提供太多帮助。 安装了 Laravel (一个非常流行的 PHP 框架)并准备测试一些东西。 然后,CppCMS 问题似乎可以解决,我又回到了它。 我猜我即将使用 CppCMS 完成工作,但它的局限性正在显现。

这件事引起了我的思考,我回顾了一下基准,允许 Java 和 PHP 存在。 我需要一些替代方案,以防万一事情不顺利。 你瞧,前三名都被 Java 框架占据了。 Laravel 可能不是最快的,但它现在确实很热门。 另外,我可以从 PHP 代码调用我的 C++ 可执行文件。

根据此讨论:如果您使用Qt< /code> 与动态链接,如果您使用 Qt 与动态链接,似乎您不必公开您的代码。 这个得研究,Qt不是一天就能掌握的。 我想这使得 cutelyst 再次成为一个可能的选择,当且仅当您可以进行动态链接,并以这种方式完成所有事情。 我只是不喜欢 Qt 的合法雷区和跳圈。

通过这一切,我对Java有了不同的看法。 由于 Laravel 的流行,我仍然会使用 Laravel,而且我现在对 C++ 以外的事物持开放态度。

Answer from 2018:

I am running on limited hardware resources, so C++ is the first thing I think of. I made a decision by looking at this benchmark of web frameworks. cutelyst (a Qt derivative) and Wt dominate the top spots. They are all non-libre. So, I looked into treefrog. Right after its first and only tutorial, it is apparent that it uses qmake from Qt and thus Qt's LGPL applies.

I reluctantly go with CppCMS at the bottom of the list, as ffead has too many errors and poco is not a fullstack framework.

Diving into the tutorials, CppCMS is way ahead of treefrog when it comes to documentations. The first several tutorials are easy to follow. However when I start encountering problems, help is almost non-existent. I can't imagine how it would be like going with treefrog to get something done. Lack of documentations (and good ones) is the reason why I dumped it in the first place.

I almost dumped CppCMS also due to a serious roadblock. A tiny community cannot offer much help. Got Laravel (a very popular PHP framework) installed and about to test something. Then, the CppCMS issue seemed resolvable and I am back to it. Guess I am about to get stuffs done with CppCMS but its constraints are showing.

The incident got me thinking, and I look back at the benchmark, allowing Java and PHP to be there. I need some alternatives in case things don't work out. Lo and behold, the top three spots are occupied by Java frameworks. Laravel may not be the fastest, but it is really hot right now. Plus, I can call my C++ executables from PHP codes.

According to this discussion: if you use Qt with dynamic linking, it seems that you do not have to disclose your code if you use Qt with dynamic linking. This has to be researched, and Qt cannot be mastered within a single day. I suppose that makes cutelyst a possible choice again, IF AND ONLY IF you can do dynamic linking, and do all your things that way. I am just not a fan Qt's legal minefield and jumping hoops.

Through all this, I have a different look towards Java. Will still do Laravel because of all the rage, and I am now open to things other than C++.

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