Archive for August 7th, 2008

PHP to python. Why?

Thursday, August 7th, 2008

Well.. let me give a background first. I have been working with PHP for quite some time(>3 years) on various projects from small 500 lines to more then 20K lines. I like to keep up with the latest (or should I say hot since python is in no way “latest“) trends. Lately there has been quite a lot of buzz around “which language” is the best for web development. I thought may be it is time to experiment! Firstly I am ignoring Ruby/Ruby on rails completely. I just never got to like it much to put in extra effort. The hosting for ruby can be quite expensive and I like to have complete control on my code(down to last for loop :) which I dont think ruby on rails provides. If I am wrong, someone please comment and set it up for me.

Coming back to the comparison, I really am not the right person to judge which is better. But I know for sure: Even if I can do everything possible on web through PHP, there is one thing missing. The clean structure. For those who say that there is an “object oriented” way to go about to do things in php, I would like to say that php was never designed to be used that way. There are far too many inconsistencies in php to use oop at a large scale. I came across one more funny thing about it today on Google reader. The post can be found here.

So coming back to my situation, I got introduced to python about a year back in a completely non-web-development setting. The basic syntax and structure does not look or feel like it is good for web development. But it was so clean that I wanted to code in it! But how? I had heard about Django but had never tried to use it. From its description, It felt like it would be really handy to use django if I want to develop something in python. And so I started. About a month back, I did tried to use it. To say it in one line, I could not get it to install. The pages on django website are far too long to fit in my somewhat small brain. I could never get over with the problems compatibilities.

For some reason, my love for python has not gotten over yet. I’ll try to begin using it one more time. This time I have a project that I would like to do with it and so will try to be more careful.

I guess I’ll post soon how it went.