django


django logo
After attending EuroDjangoCon, it has become quite clear why I love this framework, & prefer it so much over its competitors. It’s not the fact that it’s much better than the others, much more simple & powerful, i.e., beautiful. It’s not the fact that it’s so valuable in allowing me & others to create so much with so little.
It’s actually because of the values of it’s authors & community.
Just like business companies’ values, i.e., map of perceiving reality, are usually determined by it’s founders & chief executives, & propagated throughout the organization (Microsoft & Google are good examples), the same is true for technology frameworks, & the authors & community behind them.
So, I love Django so much because of the values of its authors, which propagated nicely to the community using it. I heard more than once on people leaving the Rails community just because of the rude way they were treated by the framework authors or community members. I saw & heard the authors of Django, & it’s community, & rest assure it won’t happen much here.

Here’s, BTW, my summaries from the conference.

I gave a talk few days ago, in the local Django User Group, on Django deployment on Cloud Computing platforms. For the talk, I developed a small Django application, called Reality-Tree, which I deployed to Google AppEngine & Amazon EC2. You can find the application source code in its Google Code site:
http://code.google.com/p/reality-tree

You can find there also the mindmap that lists all of the steps & knowledge needed to deploy the application on these clouds.

The application itself is now only available in Google AppEngine (costs money to keep it running in EC2), but didn’t pass much QA. Hope to QA & announce it properly later.
http://reality-tree.appspot.com

[Update] A porting guide is now available.

Had a great opportunity to do the Django 1 upgrade for one of my projects during the Django sprint held this week in Tel Aviv university. Couldn’t dream of a better place to do it: with experts & other people doing the same thing.

Main things I had to do:

  • Changed the signals code to the new syntax
  • Changed the admin & admin docs url mapping
    • See the docs & also for admin docs
    • Also had some links in our app for admin pages (such as Logout, & Change passwords) whose links have changed in v1. Took the new URL’s from the admin source files.
  • Changed the models admin metadata to the new syntax & separated it to new admin.py for every app
    • This seems at first like a task that would take several days of manual labor. Luckily, a script was written to automatically migrate code, which worked great. I’ve applied it to all of our apps (about 20 in this project) manually (too bad it wasn’t extended to migrate full project).
    • Besides running the script, I had to remove the existing admin metadata code from the models.py files.

The sprint BTW was quite fun, though I didn’t get to help with Django bugs, just do the migration & testing. Meir Kriheli gave a great Django tutorial, & I gave a small presentation about some of Django projects I’ve done. I hope it’ll contribute to the local Django community to raise its head over the boring Java/.Net/PHP water.

I’ve opted till now on the Amazon cloud (EC2) as my grid vendor of choice, due to the flexibility of using your own machine image. Something that is lacking for example in the SalesForce platform. However, with the recent announcement of the Google cloud (AppEngine) it seems that they support almost the full Django stack!!! (what’s missing is the database layer, which is replaced with a very similar layer, working against the BigTable database, & the Auth & Admin apps, which are replaced by Google apps). This suits me like a glove (sorry for the rest of you though…) My existing apps can just be uploaded to their grid & build upon the BigTable database & the GFS!

I knew that Guido himself worked in Google on a Django-based app, but didn’t imagine Django being the basis for their Grid service. You should have seen the expression on my face when I noticed this!

Still need to learn their SDK & terms. Currently, it just sounds too good to be true!

I had an annoying problem in my Django app when I translated it to Hebrew, & started adding Hebrew data. It would yell the regular ‘ascii can’t decode non-ascii characters’ error page. I dug a bit inside the admin code but didn’t see something wrong or fixable.

So today I finally understood I need to change the __str__ method to __unicode__ . This solved the problem completely. Too bad it doesn’t appear in the Django documentation nowhere. I would expect it in the Internationalization page & the tutorials too!

For the past couple of monthes I’ve developed 2 large Web applications, using the amazing Django web framework, & recently chose it for my next large project. I can now say without any doubt that it is the platform of choice today for developing almost any type of software. Its slogan claims that it’s the web framework for perfectionists with deadlines, & I fully agree. It’s just a brilliant platform, that revolutionizes software development, in the amazing productivity that it enables. Beauty according to David Gelernter is simplicity & power, & the Django authors just achieved so much beauty!

I found the underlying programming language, Python, to be the programming language of my dreams, really powerful, simple & fun to work with!

When I tell people about Django, they either say that it’s just like Rails, or that they don’t see any reason to move away from their familiar PHP or J2EE.
Well, I can tell you what I think of these alternatives using a metaphor: if you need to buy a laptop today, you basically have 3 choices: a PC loaded with Windows, a PC loaded with Linux & a MacBook loaded with OS X. I worked extensively with all choices, & can tell you that I get things done much better, much faster & much much more enjoyably on my MacBook. I find Rails to be similar to a PC loaded with Vista, PHP/J2EE like a PC loaded with Linux, & Django like a MacBook loaded with OS X.

If you’re an entrepreneur today, BTW, you’re just committing a crime if you don’t take my recommendation seriously.

  • My tweets

  • My bookmarks

  • My pictures

    Fixed summary of Erlang workshop by Ulf Wiger

    Fixed summary of Erlang talk by Ulf Wiger

    Erlang talk, Ulf Wiger

    Erlang workshop, Ulf Wiger

    AppEngine updates talk - Barack

    More Photos
  • My Deezer default playlist


    Discover Count Basic!
  • Top Clicks

  • My previous posts

  • Listed on BlogShares