Yesterday I had a meet­ing with a cus­tomer about a new site I should develop for them. Since they’re a book pub­lisher, they wanted an online book store. Apart from the tech­ni­cal details (the site isn’t as simple as you may believe, they need a lot of not-so-easy-to-do stuff), the most impor­tant point we focused on is the fact that they have an inter­nal IT tech­ni­cian that han­dles all their com­puter needs. If you’re asking your­self why this mat­ters, keep reading:

  • me (to be precise, my company) stopped development of PHP sites about one year ago in favor of Python
  • we release the web site’s code to them
  • for this project, we haven’t been asked any kind of future support; this means that when the site is finished, we won’t touch the product anymore (unless they don’t pay us to do the modifies they need)
  • but they don’t want to pay us to these modifies, because they have their internal IT technician
  • their technician knows only PHP (and he never even known the Python’s existence until yesterday)

So I had to illus­trate why me and my com­pany chosen Python for our web devel­op­ment needs, and here’s a sum­mary of what I told them yes­ter­day. Note that I’m not talk­ing about why a lan­guage is better than the other, because this would move us in another direc­tion, but why we chosen Python as our main pro­gram­ming lan­guage (even if this uncon­sciously lead us to say why, for us, Python is better than PHP, but that’s another story) :

  • Time: remember that time is money. If I’d build an application in PHP, I’d spend about 1/3 of the time more if I’d develop the same application in Python
  • Frameworks: nowadays all the popular languages have their web frameworks; Ruby has Ruby on Rails, PHP has Symfony, php.MVC, Python has Django, CherryPy, Pylons, and so on. But none of them (apart from rails, but we’re talking about PHP Vs Python) goes near to the completeness and functionality of django. And this take us at the previous point: less time in develop the same application
  • Future modifies: even if for this project this isn’t the case, it’s much easier to modify a Python application than a PHP one due to the syntax of the language and its strong OOP orientation. You may argue that PHP 5 introduced a deep OOP support too, but that’s not the same thing and you know. PHP is born as procedural programming language, and even if we had OOP introduction in version 5, it doesn’t even comes near to Python under this point of view

With this I’m not saying that PHP is use­less: what I mean is that Python is more con­ve­nient under the (our) busi­ness point of view. So if some­one ask me why I use Python to do the same thing I can make with PHP, the answer will be: because with Python I can make the same thing in a shorter time and, con­se­quently, with a lower budget.