Simple C ++ Web Framework?

I have been using Nancy's Web Framework for my C# application and it has been extremely simple to use and does an excellent job providing the functionality I need.

Do any simple Frameworks exist on the C++ front? All I have found seemed extremely complicated with a massive learning curve. I would like to write a plugin .dll for another application that embeds a Web Based Control Panel, so something along these lines would be very helpful.

As others said in the comments, Wt is the most complete web framework for C++.

But it may be overkill if you just want to write a small CGI based app. For that kind of project you have a few options:

  • write a regular old style CGI app, coding it against the CGI spec . This is really nothing more than writing an executable app that reads input from a bunch of environment variables and stdin, then writes the output of the page to stdout. Here is a tutorial (for C, you can adapt it to C++).

  • a little bit of an improvement over the previous idea is to use the FastCGI toolkit. Not much of a difference, simply that you can write your app as a DLL that is loaded by the server instead of a process that is executed again and again for every request.

  • better yet, use a CGI library that simplifies some of the tedious tasks, like parsing form fields, file upload, cookies, session management, etc. These are a few that I know, there are probably more:

Good luck.