我知道 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?
发布评论
评论(4)
首先,有几个区别:
想要开发一个像 GUI 一样的代码,它适合您。
模板内的 C++ 代码并没有明确分离视图和控制器。
稳定性,我只能说CppCMS,稳定,有应用程序在运行
7月24日,作者博客和包含CppCMS文档的Wiki都是用CppCMS编写的。
因此,不应该存在严重的错误。
披露:我是 CppCMS 的开发人员。
First of all, several differences:
want to develop a code as if it was GUI it is for you.
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.
我是 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.
顺便说一句,我不久前使用 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.
2018年的回答:
我运行在有限的硬件资源上,所以C++是我首先想到的。 我通过查看 此 Web 框架基准测试。
cutelyst
(Qt
衍生品)和 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
(aQt
derivative) and Wt dominate the top spots. They are all non-libre. So, I looked intotreefrog
. Right after its first and only tutorial, it is apparent that it usesqmake
fromQt
and thusQt
's LGPL applies.I reluctantly go with
CppCMS
at the bottom of the list, asffead
has too many errors andpoco
is not a fullstack framework.Diving into the tutorials,
CppCMS
is way ahead oftreefrog
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 withtreefrog
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. GotLaravel
(a very popular PHP framework) installed and about to test something. Then, theCppCMS
issue seemed resolvable and I am back to it. Guess I am about to get stuffs done withCppCMS
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 useQt
with dynamic linking. This has to be researched, and Qt cannot be mastered within a single day. I suppose that makescutelyst
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 fanQt
'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++.