A few thoughts...

In Process vs. Out of Process

ASP runs "in process" in the web server. It's dynamically bound in (by DLLs). ASP scripts, wether they are Visual Basic, JScript, or PerlScript, don't run as separate processes. Startup can be fairly fast, and session state can be maintained across invocations.

CGIs, whether they be in Perl or in some other language, run in separate processes. They incur a per-invocation startup cost, and use the file system to cache session information between invocations.

(Both ASP and CGI can "cache" session information in URLs and in hidden form fields.)

If you're running Apache and control the web server, mod_perl is also an option. This allows Perl scripts to run in process, and is considerably more flexible than PerlScript on IIS.

Language Choice

Which of Visual Basic, JScript, or Perl is more flexible? All provide ready access to OLE components, though if this is how you're going to develop, the documentation is better for VB and JScript.

If you're going to be doing any type of sophisticated parsing or string manipulation Perl is an obvious choice.

If you're going to be doing any sophisticated page generation, consider also the facilities each language makes available, either directly or through readily available components. On the VB side there's... uh... On the Perl side there's CGI.pm and the Template Toolkit.

And consider which language had the best choice of off-the-shelf componentry for reuse. The standard Perl distribution has a lot of useful stuff, and more is available from CPAN or PPM. Reusable stuff is available for VB, but not in the form of reusable objects (unless you consider instances of OLE things to be Objects).

Development Considerations

Which are easier to develop, ASP scripts or CGI scripts? Since CGI scripts are stand-alone, they can be developed and debugged in isolation from the web server, with minimal scaffolding. ASP scripts are rather more difficult to develop and debug. Visual Interdev helps somewhat, but judging from the howls of pain from my comrades several cubicles over, I'll stick with CGI as long as possible for development, and migrate into an in-process solution as late in the process as possible.


In reply to Re: CGI/Perl vs. ASP by dws
in thread CGI/Perl vs. ASP by nysus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.