Skip to main content
gamedev.net
🔒 Locked

C/Perl/CGI web development

Started by Fletch 0 replies 550+ views
Original Post
Fletch
Fletch
I hear people saying that they use Perl as a "front end" with a c/c++ "backend" in their web sites. What exactly does that mean? How does perl interface with c/c++ ? Which parts of a web site would be written in c++ and which parts in Perl?
dmikesell
dmikesell
Perl is normally used to write the CGI proper - it accepts the HTML request, parses it, and writes out the resulting HTML page. It also has database and LDAP modules available for building dynamic content.

If your site requires something that's done in C++ - like image manipulation/generation - then your Perl CGI could call out to that and return the results to the browser. There are various ways to interface Perl to C/C++. The only way I've ever used is with the freely available SWIG compiler, but there are others.

But, nothing stopping you from writing CGI in C or C++. I've done it before. But Perl has much nicer text parsing capability and is better suited, IMO.

--
Dave Mikesell Software & Consulting

[edited by - dmikesell on October 16, 2003 7:39:39 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.