Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Let's assume I want (for fun at start) to play with some new DSL (domain specific language) idea. And I really want its user[s] (probably only me at first) to interact thru a web interface. I'll probably implement it in C++ (probably using LLVM).

Should I use an HTTP server library (like libonion or microhttpd) to talk directly HTTP or should I use FastCGI? I could also use libraries doing both like cppcms or wt...

In particular, I am noticing that several recent web frameworks (Opa, Ocsigen, ...) do not have any FastCGI interface but only HTTP one.... (but Ur/Web seems to have both)

So my feeling is that FastCGI is really out of fashion....

Any opinions on that? Do you know recently started project using FastCGI ? (and what about SCGI?)

share|improve this question
1  
FastCGI has a tremendous presence in scripting languages. It may simply be that it's not something that the C++ community has decided to pick up so far. –  Charles Dec 8 '12 at 6:37
    
FastCGI is usable from C++. The question is: it worth it, or is it slowly becoming obsolete or irrelevant? –  Basile Starynkevitch Dec 8 '12 at 8:03
add comment

1 Answer

Few notes:

So my feeling is that FastCGI is really out of fashion....

Telling this is like to tell that TCP/IP is out of fashion in days of HTTP.

FastCGI is the protocol between web application and the web server - however it does not mean that you need to use it directly from your application.

Should I use an HTTP server library (like libonion or microhttpd) to talk directly HTTP or should I use FastCGI? I could also use libraries doing both like cppcms or wt...

See if you want to develop even a simple web site it is very hard to do it using HTTP alone - there are many factors to handle - this is why there are web frameworks that solve the problem for you, more than that many stuff like static files handing and some security considerations are passed to web server and the framework itself.

So I'd recommend you to use Web framework like CppCMS that allows to implement web application using C++ easily - so basically you work on busyness logic, the rest web framework does for you.

And as a bounce you get support of HTTP, FastCGI, SCGI protocols and you can use either your internal web server or any industry standard protocol with powerful web server.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.