Advantages and Disadvantages of ASP over CGI/Perl?

davidkay

Senior member
Nov 6, 2000
265
0
0
Would somebody be kind enough to give me some Advantages and Disadvantages of using ASP compared to Perl or CGI on my web site?

Thanks :)
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Disadvantage of ASP: You have to run it on an MS server.
Advantage of ASP: All that microsoft crap you can do, like integratino with access databases and stuff, is relatively easy.
 

davidkay

Senior member
Nov 6, 2000
265
0
0
Any more? I'll be honest: I got an exam i'm revising for but I cant seem to find any good reasons. Why would I use CGI over ASP?

Thanks, any more would be a great help!
 

kt

Diamond Member
Apr 1, 2000
6,032
1,348
136
Originally posted by: Tyler
Disadvantage of ASP: You have to run it on an MS server.
Advantage of ASP: All that microsoft crap you can do, like integratino with access databases and stuff, is relatively easy.

Uhmm.. ever heard of ChiliSoft ASP? Or now Sun ONE ASP? Both for Unix based OS'es.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The only reason I can think of is that with ASP on IIS you have access to a lot of COM objects, so you don't have to reinvent the wheel all the time. But with the mentioned ASP implementations on unix you're limited because noone of those COM objects so all you get is the ability to use VBScript.

I would personally recommend perl (using mod_perl on Apache) because you have tons of free modules to use and it's mostly portable, you're not tied to IIS on Windows. I would avoid CGI because it's slow, you need to fork a new process for each CGI request and it's hard to do session tracking for things like "shopping carts".
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Nothinman pointed out the most important factor: CGI applications create a new process for EACH HTTP request; ASP does not.

Some other advantages of ASP:

- You can use any language that has an ActiveX scripting engine (e.g. JScript, VBScript, Perl, etc.)
- You have access to a late-bound COM programming model, therefore you have almost infinite access to third-party components to do much of what you would otherwise have to do by hand.

There are many more disadvantages :) ASP.NET is an entirely different story, however...
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
I think you are confused about the issue. CGI is "Common Gateway Interface", you can use any langauge you want with it, or for that matter any executeable program that can print http headers and html. I don't claim to know much about ASP, but it seems to serve a somewhat similar purpose; to provide a common platform for doing web development in whatever language you decide to use.

As far as why you would want to use CGI over ASP, I suppose it depends on the context. I wouldn't call CGI an elegant solution by any means, but then again, I do use CGI and not ASP.. so there are reasons. :) From a "proper" standpoint, CGI is pretty barbaric, but for my basic uses (writing python scripts for fun), it doesn't really matter all that much, and it requires no effort to set up.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I think you are confused about the issue. CGI is "Common Gateway Interface", you can use any langauge you want with it, or for that matter any executeable program that can print http headers and html.

Noone is confusing that issue, it's that very feature that is the problem. The web server has to fork the interpreter to run the CGI every time a request to that CGI is submitted, it's the whole reason mod_perl was created, to stop the slow down from forking /usr/bin/perl with every request.

I don't claim to know much about ASP, but it seems to serve a somewhat similar purpose; to provide a common platform for doing web development in whatever language you decide to use.

Accept that it's interpreted inside the daemon so it's only interpreted once (well it probably checks the file mtime and reinterprets so you don't need to keep restarting the daemon to test code) and run many times.
 

davidkay

Senior member
Nov 6, 2000
265
0
0
Some fantastic answers :) I'm pretty sure this question will come up in my final paper. Thanks for your help :) You prob got me at least 5 marks :D
 

Zugzwang152

Lifer
Oct 30, 2001
12,134
1
0
Intersting...Perl seems to be the favorite around these parts...but why would one use Perl over an equally useful script like PHP for instance?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Intersting...Perl seems to be the favorite around these parts...but why would one use Perl over an equally useful script like PHP for instance?

I don't use php, but perl's string and regexp capabilies are astounding and most web page processing involves strings and for anything else there's usually a perl module from cpan, there's modules for everything from IMAP access to creating PDFs and mod_perl makes perl execution just as fast as php in apache.
 

Superwormy

Golden Member
Feb 7, 2001
1,637
0
0
Don't forget also that Perl is more of a tried and true solution than ASP. ASP is still relatively new while Perl has been around for like 15 years. A lot of Unix farmilar people also already know Perl because it has been used for system admin previously.

I also don't believe that Chillsoft ASP or SunOne ASP are complete solutions, they're still lacking I believe as compared to the Windows ASPversion... but I'm not sure on this...
 

EmperorRob

Senior member
Mar 12, 2001
968
0
0
Originally posted by: Zugzwang152
Intersting...Perl seems to be the favorite around these parts...but why would one use Perl over an equally useful script like PHP for instance?
Can't speak for php b/c I'm not all that familiar w/it. But perl has 1000s of modules including ones for CGI and HTML parsing. It's biggest power though is file/text read-writing, which is easy and fast. And basically it's got similar functions and solutions of everything you can find in C. Its syntax makes sense and is easy to learn.

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Its syntax makes sense and is easy to learn.

As much as people b!tch about perl, it's syntax is farily simple and is easy to learn. And whenver perl 6 is released there's a lot of little fixups that fix some of the stranger aspects like how you access an array as @array but you access an element of that array $array[0].
 

Shazam

Golden Member
Dec 15, 1999
1,136
1
0
Don't forget also that Perl is more of a tried and true solution than ASP. ASP is still relatively new while Perl has been around for like 15 years.
ASP new? It's been out since 1996!!
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Originally posted by: Superwormy
Don't forget also that Perl is more of a tried and true solution than ASP. ASP is still relatively new while Perl has been around for like 15 years. A lot of Unix farmilar people also already know Perl because it has been used for system admin previously.

I also don't believe that Chillsoft ASP or SunOne ASP are complete solutions, they're still lacking I believe as compared to the Windows ASPversion... but I'm not sure on this...

Perl has been around in the context of web-applications about as long as ASP (I'm not going to look up the exact years). ASP isn't tried-and-true? That's absurd.