For years I have been hearing about the death of PHP, and I have ignored it. I bought a Rails cookbook a few years ago, but never even opened it. Now, as I write more code in other languages, I see how PHP enables my bad habits. My code get's uglier and uglier as a script ages. I have used MVC frameworks with PHP like Code Ignitor and Zend and they do force better habits, but I really hate singletons. I also just want to learn something new. So I can't ignore it anymore, people and startups are moving away from PHP and are using newer, sexier frameworks.
I have googled Python vs Ruby, Rails vs Django, etc and all I end up with is flamewars. It seems to boil down to personal preference, and I don't have one. So I need to program in both to decide what my preference is. Therefore, I am embarking on a new project to build something in both Ruby and Python web frameworks. I don't have a blog, and I have been thinking lately that I want a place to compose my thoughts, so that can be my project. I am going to build a wordpress-like blog engine in different frameworks and see what was my preference. However, if I am going to take the time to build something from scratch, I want to also tinker with some other new sexy technologies at the same time. So with that in mind, here are my requirements:
- Blog Engine using the web-framework
- NoSQL backend, I am picking MongoDB for this project
- Use twitter bootstrap for responsive UI framework
- Don't worry about commenting in my app, I will use Disqus for commenting
I am going to pick mongodb because as a document db it is a good fit for this type of app, and it also shows me the side effects that come when the requirements don't fit the conventions of the framework. In fact I have heard that Rails is difficult to work with if you step out of their box but I will find out for myself whether that is true or not. So now that I had a project in mind and some requirements, it was time to pick my frameworks. I, of course, want to try Rails and Django, but are there others I should consider? After doing some research I have narrowed my list down to Pyramid and Django on the Python side and Rails on the Ruby side, and possibly Node.js if I get time. For the Ruby side it is a no brainer, but Django isn't the one true web framework on Python so I want to try a few python options.
I decided to start with Pyramid because it seems to be more modular than Django, and I can remove SQLAlchemy and add Pymongo instead. I also wanted to start with Python because I am more familiar with it than Ruby. I have completed my first pass with Pyramid, and have actually deployed my blog to my production VPS and started blogging (obviously). I will post my thoughts on Pyramid here in my next post.