josh.code
Python, not PHP

Python, not PHP

 : 409 words

The first few posts of this blog dealt with PHP and Zend Framework. I am now leaving PHP behind. I am going to focus on using Python and Django (probably a few others: Flask and web.py look great for small sites) from now on.

This leads to a question: why?

First, I have dabbled in Python and liked it. I had created a few simple Google App Engine sites. I used webapp (an App Engine framework) to build them. Webapp is a very simple framework with which you can easily map the route to a HTTP verb and tell it which function to run. I was able to get something running with very little trouble, despite the fact I knew almost nothing about Python.

Secondly, I have heard many good things about Django. I am always reading blog posts about different frameworks just to see what ideas/methods they have. Django looked great so I decided to use it for a small project I had.

On a side note, the PHP framework Laravel looks great. I have not used it and do not plan to, but if I were to develop something in PHP I would use Laravel.

Was this quick? I believe so. Was it dirty? Certainly not.

Finally a blog post kicked my butt and took every excuse I could make and silenced them – Quick doesn’t have to mean dirty. The author live blogs building a guest book app in Flask. I do not want to be incendiary, but Python just felt more correct. I did not see a need for a lot of boilerplate. There is no web server set-up. I did not have to spend time trying to figure out if you have the correct extensions and correct INI files. I agree with the author by the end: “Was this quick? I believe so. Was it dirty? Certainly not.”

I also have to comment about another post Alex (veekun) wrote. I do not see how this is not incendiary, but here it is: PHP: a fractal of bad design. I have not been able to work on a PHP project since reading this post. I was already moving away from PHP, but I was still using it for a few projects. After reading this I decided to go cold turkey on PHP.

This is not an opening shot to a language flame war. I look forward to posting a lot more Python and Django content.

comments powered by Disqus