A few months back I posted that I wanted to away from PHP for web development and started learning some of the major MVC web development frameworks. The first one I tried was Pyramid, and I wrote about creating a blog engine with Pyramid and MongoDB. This was an awesome experience and I loved using it, so next I wanted to try using Django.

Django's Strengths

You can find many good comparisons on the web. So these are my thoughts after build a blog engine in both systems. Getting started with Django was quicker and easier than with Pyramid because it had everything built in and had much better documentation and tutorials. I loved the kitchen sink manage.py utility vs several Pyramid commands like pserve and pcreate. Also the settings.py was easier and had a better structure than Pyramid's ini files.

Read more

In my previous post about creating a blog with Pyramid, I mentioned that I really didn't like Chameleon or Mako (To be fair I never really tried Mako; I just read through the documentation trying to understand how to perform inheritance) templates. A commenter(thanks Matt) suggested I give Jinja2 a try. Some of my gripes (or my lack of understanding) about the those template engines were:

  • I couldn't find an easy way to break my templates into various pieces like header, footer, sidebar etc. Then have a layout template that pulls them in, and lastly inserts my individual view on top of that portion of the template.
  • The syntax should be easy and I believe template portions of your markup should stand out from the static markup.
  • I don't have any concern over speed or jython compatibility and this seems to be a major focus for chameleon.

Chameleon uses a macro language called METAL and it adds a bunch of extra markup to your document and making it less clear over which parts were part of the template and which were static. This became apparent when I was retrofitting my templates to Jinja2 and ripping out the chameleon parts, I kept finding remains of the chameleon templates after I had made the switch.

Read more

In my previous post I explained that I wanted to explore new non-php web development frameworks like Rails and Django. So I decided to build a blog engine with each of them and see which framework felt the best. I also decided that if I am going to embark on a relatively time consuming learning project, that I wanted to expand my scope and experiment with Twitter Bootstrap and MongoDB as well.

I have used Python several times in the past, and have never touched Ruby outside of a Hello World rails tutorial. I also have some peers that hate rails (even though they like Ruby), so I decided to start on the Python side of the fence. After some research and discussion with peers I decided to start with Pyramid rather than Django.

Pyramid seems to provide more flexibility when break ingaway from the convention, and considering I wanted to use Mongo instead of SQL this felt like a great place to start. After completing this exercise I found that I really enjoyed working with Pyramid(and Mongo), so much so that I pushed my code to my VPS and went public with my blog. This also delayed my Django and Rails trails as I had to prepare to deploy a production version of my Pyramid site. I will start the Rails version soon, but for now here are the steps I took to create the Pyramid version.

Read more

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.

Read more