CGI versus PHP, CF, ASP

jag5311's picture

They have: 202 posts

Joined: Jan 2002

Is there a distinct difference, or is CGI just something these languages use. I don't know much about PHP, CF, or ASP, but I can fiddle with a cgi script and make it workable for whatever I am working on. You can do databasing with CGI, especially with Mysql, so what makes those other languages more powerful?

thanks
bryan

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

CGI is not a language, it's a concept. CGI scripts are usually (but not always) written in Perl. When you fiddle with CGI, you're likely fiddling with Perl.

CF is a markup language that masks server-side processing. It's main advantage is that someone else has done all the hard work and you just use the tags.

PHP/ASP/JSP are embedded server-side languages, meaning you can put them right into the page, and have HTML mixed in with generated code in the same place, instead of templates and other harder-to-troubleshoot options in Perl and Java (which are purely server-side and output based on the script and everything has to be inside it).

The advantage of this is nested includes, and the ability to restructure how a page works very very easily.

Of course you can use SSI to approximate this with CGI/Perl, but it is fairly limited and cumbersome by comparison.

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

funny, I always thought that CGI was PHP because when I look through some hosting sites they say ASP support and PHP Support, I guess it's not always so good to assume ... :S

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.