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

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