views:

420

answers:

7

Regardless of how hard/long it is, has anybody ever used C or C++ for web development?

+19  A: 

Yes.

Shog9
Can't really let you be downvoted for answering the question accurately.
Noon Silk
-1: one of the most useless answer ever
dfa
+1 for accuracy
Cyril Gupta
+1 for sense of humor
Adrian Grigore
+1 because you were downvoted for having a sense of humor and answering
baeltazor
The answer's quality matches that of the question.
anon
+1  A: 

Yes they have (and apparently some still do, though I can't name them off the top of my head...been a while since I heard about it).

Used to be possible by writing something that hooked in to isapi.dll (in IIS) and handled raw HTTP requests. I'm guessing Apache has a module that can handle it as well.

Good times...

Justin Niessner
+4  A: 

At least on Apache / Linux environments, it's possible to use any file that can be executed as a CGI script. I've used C++ for one tiny shareware keygenerator script many years ago, but only because I already had the source in C++ and no knowledge of better suited programming languages.

I guess it would even be possible to use shell scripts for that purpose.

It makes little sense these days though. On database-driven websites, the SQL commands take usually much more resources than the program code. Therefore it would seldom make sense to use C++ over languages with much better support for web development, like C# / .NET.

Adrian Grigore
-1 ...never said he wanted to do it himself on a new project. Just asked if anybody has ever done it.
Justin Niessner
When someone asks a question in this forum, I do imply that he does that with a purpose, not out of pure curiousity.
Adrian Grigore
+1  A: 

You might want to see this question

http://stackoverflow.com/questions/746309/which-is-the-best-c-web-framework

Sake
thank you for the link checking it out now.
baeltazor
+4  A: 

The smart-ass answer: almost all web development is done in C or C++. It's just that C or C++ is a layer in the stack, and not the topmost layer. .NET, Java, Ruby, Python, PHP - all the most prominent runtime execution engines for these languages are written in C or C++.

Barry Kelly
OMG BARRY I HAVE YOUR BLOG IN MY FAVORITES I'M A REGULAR READER OF YOUR BLOG! YAY I love the article you wrote on Compiler and "How to be happy" very good stuff!
baeltazor
+3  A: 

If you were in the pre-historic age of web development, you'd do a lot of web development in C++.

There was a time when dynamic content was channeled through CGI scripts and a lot of scripting jobs were handled through C++ based executables.

Later it was possible to patch into the inner workings of HTTP and handle data any-which-way you want by writing an ISAPI DLL (which classic ASP was).

So yes, web development has been and will be done in C++.

Cyril Gupta
i was there, and done that.... except that at that time, C++ was far too new and exotic! it was all C
Javier
I've seen C++ executables for scriptin too
Cyril Gupta
+1  A: 

It still goes on -- You only have to look at the web offering for products like Crystal Reports that are written in C++,but it's on the fine line of being the framework itself, rather than actual "web development".

Rowland Shaw