Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Python for web development? [closed]

Tags:

python

I'm wondering if learning this language or not.

I've been 15 years mainly coding with PHP. I know C, C++, Java, Perl … but PHP has solved all of my problems for web development.

I've read carefully this: http://wiki.python.org/moin/PythonVsPhp

I find Python useful for sysadmin tasks for example, or for first programming language learning. Sincerely, I love its cleanliness and clarity (it's like a "Jquerized PHP") … but I'm still finding blogs defending Python for web development … Why ?

Can anyone explain me advantages of Python for web ?

like image 393
FlamingMoe Avatar asked Aug 30 '11 03:08

FlamingMoe


1 Answers

I wouldn't do Python web dev without a framework. Having moved from Rails to Django, Django is much better. It has great docs, a great community, doesn't try to force architecture (which can lead to hours of googling about where to put things), and doesn't hide things behind unnerving "magic" the way Rails does.

It secures against XSS by default (i.e. you have to tell it NOT to escape HTML) and since it has a great ORM interface there's little chance of silly SQL injection mistakes. Also has built-in protection against CSRF attacks which operates as middleware. It's not that PHP is inherently insecure, but it gives the developers too many opportunities to mess up.

It also has amazing extensions like Pinax and they integrate essential extensions into their core every release.

You should also not underestimate the psychological benefits of coding in a beautiful language.

like image 52
bcoughlan Avatar answered Sep 23 '22 11:09

bcoughlan