The goals of the library are to provide a decent API for writing CGI (+FastCGI) programs that can be super-fast, scalable, concise, etc. etc. A major "feature" of the library is that it only does CGI - there's no HTML templating here; no database interface; no session handling even. That said, it'd be nice for the library to offer basic session handling.
What's needed really are good, portable, modern C++ libraries for database programming, HTML templating, etc. If you use or wrote any particularly good ones, please email me at darren@omnisplat.com. The examples herein are quite contrived, mainly since they don't use a database. As soon as a de-facto database library comes around, they can be fleshed out.
There are examples that *use* HTML templates. The library used for doing that is Google's ctemplate. That library is very focused on templating (not even necessarily HTML - it could be XML, or even MSXML and it wouldn't make a difference) and it by far the best of its ilk that I know of.
This library has been developed to make CGI programming as easy in C++ as possible, with the explicit intention of exposing as much as possible to the programmer, just in case they find a use for it. I think the examples shown in the linked docs above should be relatively straight-forward, even to those relatively new to C++, or programmers who have used Python before.
There are several Boost C++ libraries used in the core of this one:
- Boost.Asio - for I/O and asynchronous dispatching.
- Boost.Thread - for multithreaded FastCGI stuff.
- Boost.Regex - powerful regular expression library.
- Boost.System - for reporting errors.
- Boost.MPL - for template metaprogramming needs.
- Boost.Fusion - for holding the request data.
- Many other Boost libraries.
Apart from the examples - a couple of which require Google ctemplate and another couple that require Boost.Chrono (it's currently in the Boost SVN sandbox and used for timing requests) - there are no library dependencies apart from Boost. The code aims to be completely standard C++, wherever possible.
It's been tested on a 64bit Ubuntu linux machine and MSVC9.0 on Windows. There are some MSVC projects in the libs/cgi/build/msvc directory, made using MSVC 2008 (sorry, I don't have any other copy).