-
C++ in websites?
In wikipedia, i typed - Facebook.com and a page came, In that it was written- "Programmed in C++ and PHP". if it would be java and php i wouldn't be surprised, as java can be used for web programming as well. but c++? well, even if he made a program in c++ (by he, i mean Zuck). how did he incorporate it in his website?
kindly help...
-
Probably some backend code called through PHP. Or CGI.
-
Facebook's PHP code is translated to C++ as an optimisation: HipHop for PHP
-
PHP also allows you to write extensions which are modules loaded at runtime of the interpreter. These are generally written in C or C++. Here is an article which describes this
DevZone » Wrapping C++ Classes in a PHP Extension
So basically you would end up with a PHP application where you can use your useful classes that you've written in C++ which are also compiled/optimised to run natively on the server.
Also for option 2 you can use straight C++ to generate web pages. There's an interesting toolkit here which helps you do it: Wt, C++ Web Toolkit