I was just looking at Django’s design philosophies and I agree on many of their points. It made me start to rethink the many mistakes that I made in coding. I often build things that are not loosely-coupled enough and when it comes to extending, things are a total mess. And I got used to working alone and I tend to get lazy and start to use the IF ternary operator (the question mark and colon) which is really messy.

  • Loose coupling
  • Less code – less code usually means less bugs for me.
  • Explicit is better than implicit – I don’t mind writing more code if it makes things clearer. The hardest thing about CakePHP is that it does quite a lot of behind the scenes things and I don’t really know what’s going on. CakePHP actually does a lot of automation for you and it’s harder for beginners to start understanding them.
  • Don’t repeat yourself (DRY) – Of course, of course.
  • Encourage best practices – Python forces you to indent things a particular way. Indentation is part of their code syntax. It would seem restrictive to begin with but it turns out to be some sort of bonus feature for me.

I saw some of Django’s features too. I was browsing through their documentations and they have so much model definitions. Also have very nice set of helpers to use. (Maybe they aren’t called ‘helpers’ in Django.) There is a lorem ipsum generator and it has a pretty cool Humanize helper to change ‘1’ to ‘one’, ‘2’ to ‘two’ and ‘10’ to still ‘10’ according to the Associated Press conventions. These little things make development more fun isn’t it?

[ad#highlight]

It’s sad that I don’t have the time to explore Django. My work is primarily using CakePHP 1.1 and I’m kinda exploring CakePHP 1.2 right now. Perhaps, just perhaps, after my examinations, I’ll try out Django by coding one of those simple application.

comments powered by Disqus