Hi, 

>  In fact this alone is sufficient. No need to use bloated Catalyst,
>  Mason or Python CGI frameworks.

Can you justify how Python "CGI" frameworks are bloated ? Have 
you developed any sizable web application (something better than
a web based monitoring tool or a report generator) that you could
show us as proof that Perl CGI is "all"  you need ? 

>  If people talk about this in LUG it is only due to ignorance.
> How many people in LUG have grown beyond Linux?

Most people in LUG who know their stuff stay quiet (generally). 
Ignorance leads to biased, subjective opinion and misinformation. 
You don't grow *beyond* Linux as there's just empty space beyond it.
You rather grow from neanderthal UNIX-spinoffs to Linux :-)

Some folks just can't handle the strong concoction of pragmatism, 
ingenuity, creativity and intellectual potential that Linux kernel 
development demands - so they rant against it not on their chosen
favorite OS's groups - but rather in a LUG group.

>  
>  Anyway let us look at the first CGI code that does some real work now.
>  
>  $ cat interst
>  #!/usr/bin/perl
>  
>  use  CGI;
>  
>  $q = new CGI;
>  
>  print $q->header, $q->start_html;
>  
>  $uptime = `uptime`;
>  
>  print "The uptime of this host is : $uptime\n";
>  
>  $loggedin = `w`;
>  
>  print "The list of users logged in is \n";
>  
>  print "<pre>";
>  
>  print $loggedin;
>  
>  print "</pre>";
>  
>  print $q->end_html;
>  

Any beginner web developer will know that this is  *not* how 
you learn CGI programming nor how you develop web 
applications. Kindly stop feeding misinformation to those 
unaware.   

Hard-coding HTML elements and tags within your CGI 
program is a very bad idea - no matter how small your web 
application. The whole purpose of using perl is out-right 
defeated with the above approach.

Atleast, the code above should've followed idioms like the 
one below:
----------------------------------------------------------------
#!/usr/bin/env perl
use strict;
use warnings;
use CGI;

# The following template could be read from a file
my $template = <<END;
<!DOCTYPE HTML>
<html>
 <body>
   <p>The uptime of this host is %s</p>
   <p>The list of users logged in are:
      <pre>%s</pre>
   </p>
  </body>
</html>
END

my $q = new CGI;

print $q->header;
printf $template, `uptime`, `w`;
--------------------------------------------------------------

Most modern frameworks (Catalyst, Rails, Grails, DJango, 
Cherrypy, etc...) remedy this problem without the steep
learning curve of CGI scalability modelling and deployment.

Maybe, you must spend time learning some new languages
and frameworks and not to forget - Linux internals
to rid yourself from biased judgement.

Cheers,
Chandrashekar.

-- 
Chandrashekar Babu
http://www.chandrashekar.info/

_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to