Well, this question is very interesting. I have been wondering what to reply to my Chief Development Officer, who is using Servlets where I would use CGI (with mod_perl of course).

So, I just did some fetching with google, and with 3 links that I found I could summarize the following:

1)http://www.pscu.com/articles/1997/September/article548.htm:

This view of the situation is of course discutable, because I have heard that mod_perl was very reliable and very fast also. And extremely just argued that CGI is not bad for security either.

BUT:
This is basically the only reason, according to this article, of keeping your CGI scripts... Well, I am wondering if that webmaster (the author) was not born in a Java and is not going to drawn in a Java also :-)


2)http://www.cs.odu.edu/~cs745/presentations/servlet/my_presentation/sld008.htm:

This is all for that one, it is just a slide presenting the advantages of the Servlets... It's funny how people talk about security "just because it's Java". The author of that slide is apparently trying to convince us to see the world in Java, and this is probably a wrong idea. Besides the fact that using threads can be an advantage, all the other points have no real impact on Perl/CGI, IMHO.


3)http://www.sunworld.com/sunworldonline/swol-12-1998/swol-12-servlets_p.html:

The first point is quite fun. With mod_perl, I don't think so. And everybody knows how slow a JVM can be, even with JIT. The third point, about development, might be true, but I have never really suffered of not developing Perl scripts in Visual Studio... About debugging, if the author would know about CGI::Carp and FatalToBrowser, maybe that he would not argue he prefers Java exceptions!

BUT:
Duh! Excuse me, I have a hard time understanding what this guy means. This is contradictory with the development advantage presented above!!! Then, the end of the article compares an "Hello World" servlet with an "Hello World" CGI script, and this is pretty funny: 3 lines in Perl, and about 25 for the Servlet :-) - I know why I stick with Perl!!!


4)http://scitec.uwichill.edu.bb/cmp/online/CS22K/web_server_apps/comparison.htm:

Well, maybe that Google likes Servlets better... This "Comparative View of Servlets and CGI" starts with the title "Servlets are better" - which is very comparative...


Hmmm, what can I say? We got mostly Servlets advantages there. I don't think that those article authors spent enough time considering the CGI advantages. For me, developing in Perl is going to be *always* the fastest and most powerful way to develop a CGI application. It requires more attention, maybe, to make the code portable and reusable, but people who have never developped a full project in Perl cannot know how much power can be hidden is so few lines of Perl code... It's almost evil, and this is what makes it so good!
More seriously, I do think that the future is in the neurons of Larry and the Perl6 development crew. The "Camel Lot6" talk by Larry last week says it: we do not want to throw Java (and its exceptions:-) away, we want to have a getaway to it from within Perl!

In reply to RE: Servlets vs CGI by gaggio
in thread Servlets vs CGI by vroom

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.