Archived

This topic is now archived and is closed to further replies.

Fletch

C/Perl/CGI web development

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites