You are not logged in.

#1 2010-01-03 05:27:14

caelestis
Member
Registered: 2009-04-04
Posts: 88

Out of the three: Python, Perl, and PHP which is best for web scripts?

I really don't know what to choose. I like Python and Perl more than PHP since it would have broader use. Perl is not so mainstream but some users at these forums seem to like it. I also want to be able to access mysql databases. My host provides all 3 as well. I have used PHP before, but I don't really like using it that much, and tutorials have narrow scope, as wc3schools doesn't cover more features of PHP such as classes, and other functions etc.

Offline

#2 2010-01-03 05:47:28

Dead Code
Member
Registered: 2009-01-18
Posts: 227

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

I know Perl, and I am learning Python atm. Knowing what is the best is the tough question, but as per my industry we currently use Perl and we have developed robust client-server programs for years now. But slowly we are moving towards Python. I certainly like Python and I recommend it

Offline

#3 2010-01-03 08:45:28

dcc24
Member
Registered: 2009-10-31
Posts: 732

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

As far as I'm concerned, PHP has one of the best - if not the best - documentations online. I've been developing in PHP for almost 6 years now and I don't have any significant complaints. Database bindings are excellent and syntax is self-explanatory.

Perl, I don't know anything about. I've also been using Python for the past 2 years, not for web purposes though. Still, I've heard a lot of good things about Django and increasingly more people are using it, so it's definitely worth trying.

Still, for anything web-related I'd recommend PHP, YMMV though.


It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt. (Mark Twain)

My AUR packages

Offline

#4 2010-01-03 08:50:27

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

I personally like Python (+web.py) best, since I can express my problem succinctly and the code is still readable afterwards.
For often used JSON I use (linear) PHP, because in a test I made it took less than 20ms while python (+web.py) needed over 100ms. That's without network latency.

I'm a bit wary of Perl, since every time I used it, I produced write-only code. On the other hand, a better programmer with a good command of Perl might not have this problem.

Offline

#5 2010-01-03 09:01:39

GGLucas
Member
Registered: 2008-03-13
Posts: 113

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

One more vote for python. Using wsgi or a small framework (I recommend django for large applications).

I used to use PHP for my web scripting, then I switched to Python and I never looked back, so much easier on the eyes and the brain.

Offline

#6 2010-01-03 09:42:52

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

I've always used Python for offline scripts and programs and such, and PHP for websites, and never really tried Python on the web, so I can't say what it'd be like.  That being said, I think PHP is very useful online for some things (creating dynamically loading webpages and reducing the number of .html files you have).  Of course, this could be possible in Python too (probably is), but I still like having separate languages for each use, simply because it keeps me in practice.  My advice to you is: Try creating a basic webpage in both, and see which one feels most suitable for you (doesn't even have to be very fancy, just a quick tryout of the things you want most in your webpage).


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#7 2010-01-03 09:43:32

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

I like python for most things these days. Having said that PERL + cgilib is quite cool to use.

Offline

#8 2010-01-03 11:46:21

JuseBox
Member
Registered: 2009-11-27
Posts: 260

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

I would go with PHP personally


Linux ArchLinux 3.2.8-1-ARCH
#1 SMP PREEMPT Mon Feb 27 21:51:46 CET 2012 x86_64 AMD FX(tm)-8120 Eight-Core Processor AuthenticAMD GNU/Linux
8192MB DDR3 1300MHz | Asus m5a97 | GeForce GTX 550 Ti | 120 GB SSD

Offline

#9 2010-01-03 15:09:43

upsidaisium
Member
From: Vietnam
Registered: 2006-09-16
Posts: 263
Website

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

i say go with python.

have you considered ruby? i've never done any serious ruby programming of any sort, but i've heard many nice things about ruby on rails. just a thought. (i prefer the python syntax, so that's why i've stuck with it and not spent too much time continuing to learn ruby.. but you might as well look at all of the options wink)


I've seen young people waste their time reading books about sensitive vampires. It's kinda sad. But you say it's not the end of the world... Well, maybe it is!

Offline

#10 2010-01-03 17:09:43

Stalafin
Member
From: Berlin, Germany
Registered: 2007-10-26
Posts: 617

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

For Python there is Django... So one can either use Ruby on Rails or (Python on) Django. big_smile

Offline

#11 2010-01-03 17:52:02

h_al
Member
Registered: 2009-12-30
Posts: 17

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

I prefer Python and Ruby.

Offline

#12 2010-01-03 17:54:17

winch
Member
Registered: 2008-04-13
Posts: 43

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

First I'd check how well the host supports each language.
Loads of hosts use mod_php where php is loaded into apache, makes handling php scripts fast because the php interpreter is loaded and ready to go.
Other languages may not get the same treatment. If the interpreter and libs need to be loaded for every request then it is going to be slower. If a big web framework also needs to be loaded it gets worse.

Offline

#13 2010-01-04 14:13:56

samuele.mattiuzzo
Member
From: Treviso, IT
Registered: 2009-10-12
Posts: 307
Website

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

actually php offers best for documentation, support and database related features. and it's easier to learn.

if you want more tricky but powerful language, i'd suggest perl, which i'm using now... the only problem is that not every host let you use your cgi scripts...

Offline

#14 2010-01-05 06:34:35

caelestis
Member
Registered: 2009-04-04
Posts: 88

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

I've chosen python and am pretty happy. I made several small scripts to do automated tasks that would've taken me alot longer to learn in C++ and the standard library is very helpful. My host doesn't support django, but does have a module called MySQLdb. The cgi module is also very handy. I find it alot easier than browsing through php manuals, which are not that great if you ask me (80% of php is taken from user comments in docs). I'm really feeling the benefits of a great general purpose scripting language for more than just the web as well. Thanks guys.

http://xkcd.com/353/

Last edited by caelestis (2010-01-05 06:36:18)

Offline

#15 2010-01-05 07:30:47

Dead Code
Member
Registered: 2009-01-18
Posts: 227

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

awesome! good luck!

Offline

#16 2010-01-05 07:41:13

Zeist
Arch Linux f@h Team Member
Registered: 2008-07-04
Posts: 532

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

Lately I've been doing some things using Pylons, it is actually quite impressive. I can recommend trying it out.


I haven't lost my mind; I have a tape back-up somewhere.
Twitter

Offline

#17 2010-01-05 09:13:41

Gigamo
Member
Registered: 2008-01-19
Posts: 394

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

I think Ruby and Rails are definitely worth a look smile.

Offline

#18 2010-01-05 10:01:19

crankyadmin
Member
Registered: 2009-09-27
Posts: 117
Website

Re: Out of the three: Python, Perl, and PHP which is best for web scripts?

Python + Django, Web.py or web2py which ever takes your fancy!


:: Github :: My AUR :: Coreboot ::

Offline

Board footer

Powered by FluxBB