CGI PROGRAMMING LANGUAGES by our company
The Web server fills in a standard list of environment variables when it runs; it fills in others when requests are made of it. Because the Web server runs all the time, anything it places in the environment can be read by another program, such as your Perl script, if the other program knows the names of the variables to read. In the simplest sense, this is how CGI gets information between the server and your program. The details are a little more complicated, howeverCGI PROGRAMMING LANGUAGESThis chapter deals with Perl as the preferred programming vehicle for CGI applications. However, the HTTP-CGI gateway has no requirements or preferences when it comes to the language in which a CGI application is written. Let’s examine briefly the advantages and disadvantages of some of the most widely used languages. C, C++ C and, more recently, C++ are the most popular languages for application and systems development. Show a snippet of code in C++. Advantages These are some of advantages of C and C++: When it comes to sheer, raw power, it is very difficult to beat these two complied languages for either CGI or normal applications. For extremely large and complicated CGI projects, C or C++ probably is a better choice than Perl, especially on a busy Web somewhere processing speed will be a concern.Both languages are common on both UNIX and Window NT system, so generally there are few problems porting code between the platforms. The popularity of C/C++ means that there is a large body of existing code that you can tap into. Disadvantages – some of the disadvantages of these two languages are:
As you learned earlier , there are many nifty shortcut built into Perl that you generally can accomplish a lot more in a lot more in a lot less code than you can in C or C++ . Perl’s string-manipulation functions especially, are so much stronger that it’s almost ridiculous to try to do the same thing in C/C++. Here’s some thing else to keep in mind: it would not be an exaggeration to say that upward of 90 percent of all CGI programs involve heavy string manipulation. Visual Basic Visual Basic (VB) is Microsoft’s workhouse language for simple windows application development. Advantages Some of the advantages of V B 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 totally Microsoft environment, it can work quickly and efficiently for CGI applications.
DisadvantagesSome of VB’s disadvantages are: VB was developed primarily for doing Window application, so at least half of its power is wasted pf CGI programs, which most often run in the background and depend on sending properly for matted HTML to a web browser for display. VB would be extremely difficult, if not impossible, to port over to a UNIX system.
Footer:-