Lambda the Ultimate

inactiveTopic Server-side scripting languages
started 4/20/2001; 8:03:45 AM - last post 4/23/2001; 11:21:16 PM
Ehud Lamm - Server-side scripting languages  blueArrow
4/20/2001; 8:03:45 AM (reads: 2290, responses: 9)
Server-side scripting languages
This paper (found via PHP everywhere) compares PHP, Perl and Java servlets.

The paper is built around three examples of varying complexity. Each example is solved using each language, so you can make up your own mind.

This is how the paper summarizes the different language philosophies:

Perl creator Larry Wall says that he designed Perl to make the easy things easy while making the difficult things possible. By contrast, PHP makes some of the easy things even easier and still gets the harder ones done. Java makes the big things more scalable and makes everything more object-centered.

On the other hand, Perl makes a lot of things weirder. It's a simple language to learn, once you can get past the culture shock. PHP has removed much of the quirkiness from Perl, but in the process it has lost just a little of the power. Java makes the hard things easier, especially since a lot of them have already been done and can be included or inherited efficiently. But it also makes some of the easy things a bit harder than perhaps they should be.


Posted to critiques by Ehud Lamm on 4/20/01; 8:06:46 AM

nickmain - Re: Server-side scripting languages  blueArrow
4/20/2001; 10:44:48 AM (reads: 1784, responses: 0)
It seems unfair to compare Servlets to PERL and PHP - a more appropriate comparison would have used JSP (Java Server Pages).

Ehud Lamm - Re: Server-side scripting languages  blueArrow
4/20/2001; 3:27:52 PM (reads: 1771, responses: 0)
Why? Wouldn't you say Perl is a full fledged programming language (it even supports OOP).

nickmain - Re: Server-side scripting languages  blueArrow
4/20/2001; 10:22:12 PM (reads: 1774, responses: 0)
JSP's are translated to Java source and then compiled (on the fly - with caching based on file timestamp checking). They are actually Servlets. I was not insulting PERL.

The point I was making concerned the syntax. The PERL and PHP examples look much prettier than the Servlet example. The HTML in the former two is in plain sight, whereas the Servlet contains a bunch of "println(..)" statements. A JSP would be funtionally equivalent to the Servlet and be as easy to read as the PERL and PHP examples.

Ehud Lamm - Re: Server-side scripting languages  blueArrow
4/21/2001; 2:49:29 AM (reads: 1757, responses: 0)
Ok, now I see your point. Sorry...

Brian Zhou - Re: Server-side scripting languages  blueArrow
4/21/2001; 8:50:33 AM (reads: 1739, responses: 0)
IMHO jython servlet can be compared with mod_perl or mod_php. It's interpreted but relying on the java servlet architecture. You can program it in various style: OO, functional or procedure. See http://jywiki.sourceforge.net/index.php?JythonServlet for more info. Used with XMLC http://xmlc.enhydra.org it can achieve better presentation/logic separation than JSP: code in code, markup in markup, no mix.

pixel - Re: Server-side scripting languages  blueArrow
4/21/2001; 9:02:16 AM (reads: 1729, responses: 1)
As for the perl version, it would have been much nicer using CGI.pm

Another server-side scripting language that would be worth investigating is pliant. I just took the time to have a better look at it and a lot of concepts are really nice/clean (here are my comments for now)

andrew cooke - Re: Server-side scripting languages  blueArrow
4/21/2001; 11:23:17 AM (reads: 1793, responses: 0)
Is there a copy in http-land? FTP upsets my firewall... (sorry!)

Thanks.

pixel - Re: Server-side scripting languages  blueArrow
4/23/2001; 1:42:53 PM (reads: 1737, responses: 1)
here it is: http://mandrakesoft.com/~prigaux/tmp/critiques-pliant

andrew cooke - Re: Server-side scripting languages  blueArrow
4/23/2001; 11:21:16 PM (reads: 1800, responses: 0)
Cheers!