Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: CGI (Perl) vs JSP

by perrin (Chancellor)
on Mar 10, 2002 at 19:26 UTC ( #150751=note: print w/ replies, xml ) Need Help??


in reply to CGI (Perl) vs JSP

Here's the deal: JSP pages get compiled into servlets, and have performance equivalent to servlets. They are faster than CGI, but so is molasses. They are NOT faster than mod_perl, and similar options like FastCGI. (Don't believe what the Resin guys say: their benchmark used slow perl code because they didn't know much about performance under mod_perl.) If you're using a database, the quality of the database drivers will have a large effect on the speed of your application. Last time I benchmarked it, DBD::Oracle seemed to be a little faster than Oracle's JDBC stuff, but not much and they may have improved it since then.

With the speed issue gone, you have two things to consider. The first is what it's like to use JSP. In my opinion, it's not so good. JSP uses embedded Java code, which is actually much worse than embedded Perl code because of all the casting and the difficulty of treating Java types generically. I think you'd be much better off with a good templating tool for Java, like FreeMarker, WebMacro, or Velocity. You can read more about why this might be a better choice in "The Problems with JSP". If you want to use a Perl tool that is similar to JSP in terms of embedding code in pages, you can read about the best perl options here.

The other thing you should consider is the experience that your team has. If you are mostly more experienced at Perl than Java, you will definitely write a better site quicker by using Perl. I personally find Perl to be more productive, but someone who had written as much Java as I've written Perl might disagree.

If you do decide to use JSP, do yourself a favor and at least get a decent tag library like the one that the Struts project provides. It basically turns JSP into a templating tool, which is a bit silly since the other templating tools are probably simpler and faster, but it does let you use something decent and put "JSP" on your resume.


Comment on Re: CGI (Perl) vs JSP

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://150751]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2014-07-11 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (217 votes), past polls