Ask HN: What web language for server side scripting?
I know this gets asked a lot, but some input on our specific situation would be appreciated, considering we don't have: a) experience with one of the languages already or b) bit of an app already coded.
For a dynamic web-based solution, what language would you recommend?
Some Criteria: 1) The languages we are thinking about are php, python, perl, ruby we are open to other suggestions, don't have enough experience in any of them to make a difference. 2) We value speed of execution most. 3) We are going to use postgres for a database. 4) Webhost compatibility is not an issue.
21 comments
[ 2.7 ms ] story [ 67.9 ms ] threadUnscientific as it could be, this test shows speeds comparable or better for python:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all...
[lines going right are better for python, the ones going left are better for php]
I don't mean to bring this as proof of any sort, but also according to my own experience python scripts outperform php ones.
So... whatcha building?
Honestly, if you care about speed as much as you say you do, you should be looking into Java. (Or Lisp, if you're not worried about hiring any time soon).
1) Django 2) App Engine 3) Highly expressive
#2. Python usually wins: http://www.alrond.com/en/2007/jan/25/performance-test-of-6-l...
#3. Django was written with Postgres in mind.
Here's the story of the guy who successfully optimized web app bottlenecks in C: http://fi.am/entry/the-limits-of-django-the-answers/
I use Java with Struts on Tomcat for a couple of projects and it's served me well.
In any case, even with a slow scripting language like Ruby, if the speed of the language is a concern, perhaps that part of the application should just be farmed out to a library in C (or a separate process in whatever language). Need more info, though.
The real strength of Java presents itself after you've moved to production; I almost always am able to hand somebody an .ear or .war file and completely offload deployment/operations to somebody else.
As a plug for EJBs (a lot of the negativity around EJBs are carryoversr from EJB 2.1 and earlier), EJB-based application can be easily scaled by putting a request into operations for an additional app server and administratively changing the number of "processors" (session beans). App server failover and recovery is also fairly transparent as well.
Just my $0.02..