Hello and welcome to the Webmasters Forums!. This is the best place to get webmasters resources for free. Get $2 for free today, read more - Make your payment today. Download premium and professional templates for free. Get free web hosting without ads, read more. You can get lot more by simply join with this forum. To gain full access to the forums you must sign up for a free account.


Post Reply  Post Thread 

CGI Programming Languages

Post Bank
Posting Manager
******

Posts: 995
Group: Forum Team
Joined: Sep 2006
Status: Online
Download FileShield free from PermissionResearch!
Make money from now. You can make money just for posting on this forum. Every discussions on this community gives you more money. $2 minimum payout. So get your payment today, SignIn with this forum.

Signin to Remove this Post

casien
Newbie


Posts: 8
Group: Registered
Joined: Sep 2006
Status: Offline
Reputation: 0
Post: #1

CGI Programming Languages


Because CGI is a "common interface". CGI applications can be written in any language that can be executed on Web servers, either compiled or interpreted. These languages may include PERL, C/C++, Shell Scripts, Visual Basic, FORTRAN, etc. Which language is better in a particular environment depends upon many factors including systems and servers.

CGI first appeared on UNIX-based systems. The most popular Web servers are NCSA httpd server and CERN httpd server. PERL was first designed as an UNIX system script language. Its ease of use and strong pattern-matching and string-manipulation properties have made it very popular as a CGI programming language. C and Shell Scripts (C Shell, Bourn Shell or Korn shell) are also very popular in UNIX-based servers.

With Window NT's rapidly growing acceptance, more and more Window-based servers are entering our lives. The most popular servers are Website , Netscape Enterprise Server and Microsoft Internet Information Server. UNIX-born PERL, which was adapted for the Windows NT platform, is still one of the most popular CGI programming languages.

Visual Basic is also very popular in Windows CGI programming. One reason is that Visual Basic has the largest number of users among all the programming languages in the world. Another reason is that Visual Basic is easy to learn and use. So Visual Basic will play an important role in the future in Windows CGI programming.

C is also a very good programming language for CGI. It is suitable for any platform.

Probably you may ask which language you should use. My suggestion is to use the language that you know best. If you only know Visual Basic and you do not want to learn the somewhat annoying C or PERL languages, that's fine. If you only like C, you still can do anything you want. But if you want to become a real CGI programmer, I still suggest you learn PERL. If you have any programming experience, you'll find PERL is pretty easy to learn. If you need one year to master the C language, I think one month is enough for PERL. In this tutorial I will talk more on using PERL script.

Ok, now we know C, PERL, Shell Script and Visual Baisc are good stuff for CGI. Then how about Java, Javascript, VBscript or ActiveX Control technology? How do they work for CGI? The answer should be that these languages will probably work fairly well but since they are so new, the "jury is still out" on most of them.

Actually, Java, ActiveX control, JavaScript and VBscript can be executed on the client directly, not like CGI in which the client's request is first sent to the server, the server executes the program and then sends the output back to client.) This means that they can do the same job as the other languages with CGI can do. This is why these languages are becoming more and more popular.

The recent popularities of Java may have given you the idea that you should study Java or similar languages instead of CGI. This is not complete true. Java , ActiveX are pretty new techniques. They are indeed very attactive (I spent a lot of time playing with them) but they have a lot of limitations and do not yet provide all the functionality of traditional CGI. So knowing how CGI works is still very useful.

29-09-2006 06:25 AM
Find all posts by this user Quote this message in a reply
madly
Newbie


Posts: 8
Group: Registered
Joined: Sep 2006
Status: Offline
Reputation: 0
Post: #2

RE: CGI Programming Languages


Quote:
Because CGI is a "common interface". CGI applications can be written in any language that can be executed on Web servers, either compiled or interpreted. These languages may include PERL, C/C++, Shell Scripts, Visual Basic, FORTRAN, etc. Which language is better in a particular environment depends upon many factors including systems and servers.


This is a new information to me...

That is amazing...
This means we can run a C++ program online??

24-10-2007 05:31 AM
Find all posts by this user Quote this message in a reply
geekyone
Junior Member
*


Posts: 32
Group: Registered
Joined: Apr 2008
Status: Offline
Reputation: 1
Post: #3

RE: CGI Programming Languages


Well, you can run a C++ program once compiled as a CGI script, as any language.

I personally use Perl to write CGI scripts as I am very comfortable with it, but there is a performance hit due to the fact that Perl is an interpreted language, rather than a compiled language. This means that every time your script is called the server has to compile it before it runs. For most pages, this really doesn't matter that much. However, once your pages start to become very popular, you might notice the time they take to load increases.
This is why I am looking into learning how to properly code cgi scripts in the C language eventually. I know that eventually I will have to learn how to do so, as sites I personally code become more popular, and my scripts become more advanced. The speed of C is incredibly fast, however there are some extra security risks involved, as Perl really protects you from a lot of things. For one thing, you don't have to worry about buffer overflows in Perl, as it is taken care of it for you.
I think first I will likely just start to switch comonly used personal libraries over to C, as these are used by multiple perl scripts I use, so they will decrease site load time without having to worry about a link someone's made going dead on them.

14-04-2008 09:04 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites
Rate This Thread:

Forum Jump:

Sign In to Remove Ads

Download 1000's of web templates. Unlimited access!
World's Best Web Hosting
Resources

Recommended Sites:



Visit our Sponsors!

Current time: 13-03-2010, 11:09 PM


Copyright © 2002-2010 MyBB Group
Powered By MyBB