Main  /  Edit version 30  /  Edit version 31  /   /  Users Area

Difference "Frequently Asked Questions" ver. 30 versus ver. 31


###Are you crazy or a masochist?
As far as I know --- no.
###Why develop web sites in C++?
Many reasons, see [Rationale](/wikipp/en/page/rationale).
###Is CppCMS really a Content Management System, e.g. like Drupal?
No, CppCMS is not a Content Management System (CMS) like Drupal. It is a web development framework like Django or RoR.
###If CppCMS is not a CMS, where does this name come from?
The original idea was: "Write your own _CMS_ in _C++_".
The lead developer asked in 2008 for a better name but didn't get any suggestions, so the name stuck.
It was decided later to keep this name as it was already well known name and all the software around used `cppcms` as the namespace.
###Why develop web sites in C++? It's a dangerous language!
Modern C++ is indeed a difficult language and it takes much more time to get familiar with it, in comparison to dynamic languages like Python or PHP, or static ones like C#/Java, that are very popular in web development.
However, once you know it well, you have great set of tools that allows you to write applications rapidly and safely, without memory leaks, without random crashes. Once you stick to RAII principles, write exception safe code and _understand_ how the STL works, everything becomes simple and quite straightforward.
###Isn't the major bottle neck of any web application the SQL engine and not the server side language?
This is a quite common misconception. And it is quite easy to check. Running simple benchmarks on typical CMS you are going to find that it may create about 5-50 pages per second.
If you log the database queries and run them as if these were requests from the CMS engine, you'll discover that you can reach up to 1000 requests per second (requests, not queries)... So, SQL makes about 5% of your performance problem.
In fact, if you take real big projects like Wikipedia, you
can see that there are much more computing resources wasted on PHP processing than on processing SQL queries. See: [Is Data Base the Bottle Neck of Web Service?](
###How can I contribute?
Read [this guide](/wikipp/en/page/contrib)
###How is CppCMS licensed?
CppCMS is released under [LGPLv3]( and [commercial]( licenses.
CppCMS 1.2 and above is licensed under MIT license.
Versions before it were released under [LGPLv3]( and [commercial]( licenses.
Read [this]( to learn the difference and a guide to select
a suitable license for you.
###Do you plan to change the framework's license in the future?
Unless I become crazy (see Q1), I'm not going to change the license to proprietary or strong copyleft license. Meaning:
1. I will not close the source.
2. I will not switch to something like GPL.
I may change the license to something more permissive.
###What existing frameworks have inspired you?
Mostly Django. Sometimes, when I want to add a feature
to CppCMS, I read the Django documentation and try to understand how they did it.
Good examples are: templates inheritance and forms.
###Is this project cross platform?
It supports: Linux, Windows, Solaris, FreeBSD and Mac OS X.
###Why are HTML templates compiled? Why don't you use an interpreted template system or XSLT?
Let's start from the history. The first CppCMS template system (CppCMS 0.0.1b) was interpreted and dynamically typed. It required the user to provide some glue between the data he/she uses and the rendering system.
But this template system was abandoned in favour of statically typed compiled templates for the following reasons:
- C++ is a non-reflective statically typed language, so performing compilation time type checks would require implementation of a C++ parser, which is quite unfeasible.
- In compiled templates there are many checks that can be performed by the C++ compiler itself.
This is very important for HTML generation because Unit Testing of human interfaces is much more complicated and thus static typing gives significant advantages, moving more testing to the compilation stage.
- Much more complicated data types may be supported by just implementing operator `<<` over `std::ostream`.
- Implementation of template inheritance, support of standard data structures (containers) like lists, maps, hash tables and even user defined ones becomes trivial.
There are few disadvantages of compiled templates:
- Updating a template requires the recompilation and relinking of the view or even the application itself.
- Such updates require a restart of the application.
The first issue is not so critical because when using templates compiled to shared objects or dlls the compilation time becomes very short and users do not need to wait too long. For example: the wikipp template compilation and linking takes about 1.5 seconds.
The second issue was addressed in CppCMS 1.x.x where templates can be reloaded automatically as view's in a shared object or dll. You can then update without needing to restart the application.
_Also Note:_ Nothing prevents from you using any other template system if you find it suitable, you can always write an output directly without templates.


CppCMS is a web development framework for performance demanding applications.

Support This Project Logo

Поддержать проект

CppCMS needs You


Main Page

Valid CSS | Valid XHTML 1.0