SunQuest
 
       Reviews
  Home arrow Reviews arrow Page 3 - New Technologies and What They Mean To You...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
VeriSign Whitepapers 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
REVIEWS

New Technologies and What They Mean To You: Part 3
By: Jeremy Wright
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 5
    2003-02-04

    Table of Contents:
  • New Technologies and What They Mean To You: Part 3
  • JSP
  • CGI
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    New Technologies and What They Mean To You: Part 3 - CGI


    (Page 3 of 4 )

    Definition

    CGI stands for Common Gateway Interface and is a standard for running external programs from a Webserver. CGI specifies how to pass arguments to the executing program as part of the HTTP request. It also defines a set of environment variables. Normally each program is created in order to dynamically generate HTML which will be passed back to the browser, but it can also do a variety of server-side tasks such as redirects, reading/writing to text files, etc.

    In order to improve performance, Netscape devised NSAPI and Microsoft developed the ISAPI standard, which allows CGI-like tasks to run as part of the main server process, thus avoiding the overhead of creating a new process to handle each CGI invocation.

    What It Really Is

    CGI is, more than anything, a framework. It isn’t a language at all. In fact, languages are written for use within CGI (save as CGI extensions, and are run by the CGI interpreter on the server). The most common language for use is Perl (others include C/C++, Fortran, TCL, Visual Basic, AppleScript), which we’ll cover later in this article.

    CGI was developed for Unix systems in the 1980s and is still only on version 1.1. This, unlike other software, is in fact a good thing. It was designed with a specific goal in mind, and that goal hasn’t changed.

    CGI is in fact extremely powerful in that it can be both compiled (when written using languages like C++) or interpreted (using languages like Perl and TCL).

    More often than not, CGI scripts and applications are written in Perl. In fact, the use of Perl is so commonplace, as the language for writing CGI scripts, that most people think they are one and the same.

    Advantages
    • Can be written in a multitude of languages
    • Fast and efficient
    • Powerful and robust
    • Compiled or interpreted, as appropriate
    • Cross platform
    Disadvantages
    • Steeper learning curve than newer technologies
    • Less and less resources, the more “old school” it becomes
    • Can run slower than newer technologies
    Examples

    For many, many examples of CGI usage, as well as the full manual, go to http://hoohoo.ncsa.uiuc.edu/cgi/.

    Here are some standard types of things you might find.

    Displaying Date & Time:

    ($theday, $themonth, $thedate, $thetime, $thezone, $theyear) = split(' ', `date`);
    print "It's $thetime $thezone on $theday $themonth $thedate, $theyear.";


    Showing a Random Word:

    @words_list = ('Hammer', 'in', 'those', 'screws.');
    $random_word = $words_list[rand(@words_list)];
    print "<CENTER>$random_word</CENTER>";


    Similar Technologies

    CGI has similar technologies on 2 fronts. There are other “container technologies”, and there are also other Unix-based cross-platform technologies.

    • PHP: Like CGI, PHP is cross-platform. PHP is a very strong language with an incredibly large and supportive community.
    • ASP: ASP is similar to CGI in that it is also a “container technology”. ASP pages can be written in several languages including VBScript and JScript (the server-side version of JavaScript).
    Links

    There are many sites out there dedicated to CGI, lots of great resources, and we’ve gathered some of the best ones here:

    CGI @ NCSA
    http://hoohoo.ncsa.uiuc.edu/cgi/

    PerlMasters
    http://www.perlmasters.com/

    WebReference.com – CGI
    http://www.webreference.com/programming/cgi.html

    Matt’s Script Archive
    http://worldwidemart.com/scripts/

    WebDeveloper.com – Perl/CGI
    http://www.webdeveloper.com/cgi-perl/

    W3.org
    http://www.w3.org/CGI/

    More Reviews Articles
    More By Jeremy Wright


     

    REVIEWS ARTICLES

    - Super Styling with a Dedicated CSS Editor
    - Book Review: Ground-Up Java by Philip Heller
    - Book Review: Winning E-Brand Strategies: Dev...
    - New Technologies and What They Mean To You: ...
    - Review: Namo WebEditor 5







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway