Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Perl CGl Programming: No experience required.
(Publisher: Sybex, Inc.)
Author(s): Erik Strom
ISBN: 0782121578
Publication Date: 11/01/97

Bookmark It

Search this book:
 
Previous Table of Contents Next


Visual Basic

Visual Basic is Microsoft’s workhorse language for simple Windows application development. Figure 1.13 shows some VB code in a Word macro.


Figure 1.13:  A Visual Basic example in a Microsoft Word macro

Advantages

Some of the advantages of VB in a CGI context are:

  VB is Microsoft’s version of the BASIC language, which has been around for decades and is familiar to just about anyone who’s ever done any programming.
  It is easy to learn, easy to use, fast, and popular.
  In a totally Microsoft environment, it can work quickly and efficiently for CGI applications.

Disadvantages

Some of VB’s disadvantages are:

  VB was developed primarily for doing Windows applications, so at least half of its power is wasted on CGI programs, which most often run in the background and depend on sending properly formatted HTML to a Web browser for display.
  VB would be extremely difficult, if not impossible, to port over to a UNIX system.

Shell Languages

Shell scripts, including batch and command files on MS-DOS and Windows 95 and NT, are easy to use and easy to write.

Advantages

Some of the advantages of the shell languages are:

  For very quick and dirty CGI programs, these utilities can be very powerful tools. The UNIX shell languages are powerful programming tools in their own right.
  Windows NT complies with the Posix standard, which means that the most common UNIX tools, such as sh, will run on it, too.
  Programs written in these languages are small and tight, don’t involve the overhead of the Perl interpreter, and easily port from one system to another.

Disadvantages

Some of the disadvantages are:

  Shell programs don’t allow any of the flexibility and powerful control structures that “real” programming languages do.
  You constantly need to call other utilities such as grep or sed (or even Perl!).


WARNING:  Anything of more than a minimum level of complexity should be avoided in the shell languages. They are slow, difficult to maintain, and generally not worth the trouble.

Proprietary CGI Methods

Some of the proprietary CGI methods such as ActiveX from Microsoft and JavaScript from Netscape are worth mentioning. These are very powerful tools, make no mistake about it. Because they take full and specific advantage of the hardware/ software platforms on which they run, the proprietary packages are naturally much faster and much more efficient than more “traditional” CGI software.

After all, there’s just no comparison between a program that runs according to a strictly imposed set of rules, basically on top of the operating system, and a program that is able to utilize even the most bare-metal of operating system functions.

However, it is not in the spirit of CGI to adhere to a particular hardware or software platform. Like the spirit of the Internet, it is to let as many people as possible, with as many varied machines as possible, become part of the community.

No restrictions—that’s the way it’s supposed to be.

What’s Ahead?

Now you know a little about Perl, CGI, and the World Wide Web. In Skill 2 you’ll write your first CGI program.

Are You Experienced?

Now you can…

  create a simple Perl program
  run the program from the UNIX or Windows NT command line
  understand Perl variables, scalars, and lists
  understand the basics of the CGI environment and how CGI and Perl work together on the World Wide Web


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited.