[Tutor] Choice of Python

Octavian Rasnita orasnita at gmail.com
Tue Dec 28 14:57:13 CET 2010


From: "Abdulhakim Haliru" <abdulhakim.haliru at leproghrammeen.com>
> Hi Guys,
> 
> I am pretty new to python as this is just my 5th day reading through God
> knows how many books. I am really not new to programming, 
> 
> I come from a Cakephp, zend framework angle cutting through ASP.net,VB and
> C# at an intermediate level.
> 
> However, for some reason, I am thinking python but reading through lots of
> the input on forums like quora , keeps me confuse as to  whether to
> continue,
> 
> Unlearn my php ways (as that must certainly happen J)  and learn python and
> web development woth python, Jquery etal ?
> 
> I just need a quick opinion, I know geeks would always favour technologies
> they are used to in forums but then  what do you guys advise ?
> 
> Is python really worth the pain or should I just skip it ?
> 
> Thank you so much.
> 
> Abdulhakim Haliru


It depends on what you want to do.
If you want to create just simple low level apps that use mainly the functions/methods provided by the language distribution without installing other libraries, PHP is the best.

But you said something about CakePHP so you might be interested in more complex apps that use a framework, maybe an ORM and other things...

In this case, Python is much better than PHP. Its syntax is much different than the syntax of other languages because it is based on indentation like in the old days of Cobol, but the language is much more sane than PHP.

Python is a more general language than PHP and it is not specialized for the web so you can do much more things with it than just create web apps.
For creating web apps Perl and Ruby are better than Python, but Python offers a much better support for Windows apps and for desktop apps in general than Perl and Ruby.

Of course, the comparison is not made only among the features provided by the core language, but it takes into account all the modules, libraries, frameworks, ORMS, form processors, templating systems that can be used.

The advantages also depend on your preferences. If you like to have a framework that forces you to use just a single ORM or a single templating system, you might prefer something, and if you like that framework to allow you to use any templating system, any ORM, any form processor you can choose... you may like another framework.

For example, I have tested more PHP frameworks and I didn't like their very limited URL dispatching possibilities.
Some of them even require to define a separate file with URL maps which is ugly and hard to maintain, there is no a very powerful ORM for PHP yet, some of them use their own templating system which is very limited and other things like these.

So yes, if you need to use higher level code, there are better possibilities than those offered by PHP, even they are harder to learn.

Octavian



More information about the Tutor mailing list