Forum Moderators: coopster & phranque

Message Too Old, No Replies

Which server side scripting languages are best?

Experts, gather round, and fill in the details

         

Sebastian

1:18 am on Oct 8, 2002 (gmt 0)

10+ Year Member



Which server side scripting languages are best, and for what circumstances? Advantages, disadvantages of each; execution speed?

I'm looking for script formats that would be highly supported by most web hosts, and therefore would be ideal for the average web site. Nothing that's going to require anything too fancy/proprietary/top end.

I think, we'd be main considering
1) PERL
2) PHP
3) ASP
4) SSI

Did I miss any MAJOR, mostly universally available server side scripting language that the "average" site might use? Of course, there's also JAVA and XML (which I think tend to be used by more serious corporates, with larger database needs).

You may have suggestions on which languages we should add.

Ideally, I'd like feedback from people who know all/most of these quite well, as opposed to users who only know their "favorite" language, and hence will always recommend it.

I'll make a start, and you can fill me in / correct me as need be.

From what I can understand:

PERL
Strengths:
Super powerful. Ideal for processing pretty much anything, and is superior to virtually anything else when it comes to text parsing (read: string matching, regular expressions).
Best Used:
Best used for pages where at least a significant part of the returned page is non static, and where computations, string processing etc are needed.
Weaknesses:
Sometimes takes a couple of extra steps to perform web specific tasks when compared to PHP.
Speed:Set up time is relatively slow (except with mod_perl), but very quick to execute.

PHP
Strengths:
Ideally suited for "web type" processing: sending emails, handling forms etc.
Best Used:
Because it is embeded in an html file, it can be easily used to dynamically generate one or two fields on a basically static page, and where form processing and other web type processing is needed.
Weaknesses:
Not as powerful as PERL when it comes to string parsing/regular expressions
Speed:
?

ASP
?
Best Used:
Um, database, something...?

SSI
Strenghs:
Ideally suited for adding a few dynamic elements to a mainly static page. eg: adding navigational menus; current date etc
Best Used:
Because SSI is embedded in static html pages, it is ideal for where a small amount of the page is dynamically generated, and the majority is static
Weaknesses:
Not suited as a full blown processing language(?)
Speed:
Quite fast(?)

Cleary I have some holes in my understanding, which is why I've posed the question (in my case I'm a PERL expert, but I'd like to learn to use the 'best tool for the job' for each of the right occasions).

I thought it would be useful to gain a consensus on when each server side scripting format/language should be used, and the advantages, disadvantes, and execution speed of each.

dingman

4:21 pm on Oct 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've used three of the four you mention here. (The exception being ASP.) My favorite is PHP, largely because I find it easier to read the next day, the next month, or the next year than Perl. At this point I also have more experience with it, so for me it's often faster to get something done in PHP than it would be in Perl. I think that's a big factor in language choice for a project - if two tools are very simillar in functionality, use the one you know best. Perl does have smoother regex handling than PHP, which is nice, but I don't think its enough of a diference to override the above consideration. On the other hand, I think Perl makes portability of code between different SQL servers easier than PHP does, and that might be a real strong consideration depending on how important database portability is to you.

SSI is nice for little stuff, but I found that I very quickly ran into its limitations. Unless it has gotten more powerful since I last used it, there are no flow-control statements. If what you're doing is really simple enough that you never need an 'if' statement, though, they are simple and easy to use.

ASP - no clue. PHP can do anything I've ever wanted to do. So can Perl. ASP makes me think of IIS, which makes me cringe. (I hate windows, and only partially because I'm a Free software fan. I don't want to start a religious war about OSes, though, I just mention it because it may be relevant for people trying to evaluate my oppinions.)

Dreamquick

4:28 pm on Oct 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ASP is kinda like PHP in most respects - the obvious difference is that lots of the Apache/PHP configuration is modular (e.g take .htaccess, or even upgrading server versions) with ASP you are forced to the much more "one size suits all" philosophy of MS which all too often forces you to work around the ASP engine/server rather than with it.

- Tony

richlowe

4:30 pm on Oct 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ASP is an extremely powerful scripting language, certainly one of the best. I have not used PHP so cannot compare it to that. My opinion: if your site is hosted on IIS, use ASP as IIS is optimized for it. ASP is very supported inside and outside of microsoft. It's also very easy to use.

<aside>I've used Apache, IIS, and Firstclass (a very obscure web server), and I've found them all to be roughly equivilent in performance, security (when properly maintained), and ROI. Which webserver to use depends, in my opinion, more on the background of your staff than on the strength's and weaknesses of the server itself.
</aside>

Richard Lowe

andreasfriedrich

4:41 pm on Oct 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I only know and use Perl and PHP.

With mod_perl you get even more than a server side scripting language. You are within the server and are free to do anything you like. This is great for larger web applications. I suspect (itīs all I can do since I donīt know java server pages) mod_perl to be en par with some java application server in that respect.

PHP is great for your ordinary scripting and shared hosting. Since I donīt like PHP all that much, my CMS (written in Perl) will produce the PHP code for me from different templates and classes.

Sometimes [Perl] takes a couple of extra steps to perform web specific tasks when compared to PHP.

Just build your own module containing shortcut functions like the ones available in PHP and itīs no longer a problem.

Andreas