Hi Eduardo -- > Sorry if this is a FAQ, but I am really confused about how > many different ways > to create Web apps are around these days, how Pure CGI > compares to them all, > advantages/disadvantages, and the like. I have been led to > think by some press > that perhaps CGI programming is not *serious* web app > programming, not any > more... I presume You people on this list have to do with > CGI on a regular > basis, but are we sort of a decadent species? Or? Where can I > check up some > survey I can trust on this subject? Your opinion, if you'll mind? > Thank you in advance, hope this doesn't sound too off-topic
CGI is a completely valid (and often preferable) foundation on which to build sophisticated and important web applications. When someone says that CGI is not for "serious" applications, what they probably mean is that the old-fashion method usually associated with CGI applications involving spawning sub-processes for each request is a performance bottleneck, to be avoided. I fully agree! IMHO, use CGI but use it in an embedded fashion via something like mod_perl. Anyone who tells you that these performance problems are unique to CGI, or that they are only solved by using some other technology does not know what they're talking about. Period. Once you get beyond the run-time performance issue there are many, many good reasons for using CGI as the bases for your web applications. For starters, it is easy and familiar for most programmers. CGI is also very cross-platform compatible. IOW, a CGI application you write to run on a UNIX/Apache server will quite likely work just fine on a Windows/IIS server with little or no modifications. Mark made an important point about understanding what CGI is, and is not. CGI is just a standardized Application Programming Interface (API) for interactive web applications. The alternative to CGI is not "Java" or "C++" or any other programming language. In fact, you can write a CGI application in Java just as you would write one in Perl. The alternative to CGI is another API -- typically the proprietary API built into whatever web server you're using. Microsoft's IIS server uses the "ISAPI" and Netscape's iPlanet server uses "NSAPI". Both have similar functions, but code written for one API is completely non-portable to the other. The Java "Servlet" architecture is yet another API for web applications. It, too, provides functions similar to web-server specific APIs. Servlets are not inherently better. In fact, the Servlet API is less mature than other APIs (it has not been around as long) and it is slower (it is build on top of the web server's API -- thus unavoidably slower). Servlets promise to be portable between web servers some day, but in practice different web servers have slightly different Servlet API features. In contrast, the CGI API is portable TODAY, and it is uniform across all web servers which support CGI -- which is ALL of them. Of course, once you've selected CGI, Apache, mod_perl and Perl as the platform on which to build your web applications(!), be sure to use CGI::Application! Remember that good or bad code can be written in any language. CGI-App focuses on helping you write good code in Perl-based CGI applications. TTYL, -Jesse- ---- Jesse Erlbaum, CTO Vanguard Media 212.242.5317 x115 [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
