Archive for the ‘django’ Category
Coming soon – Django 1.0 !!!
Well, the people over at Django developer group are debating over the release of 1.0. You can read the thread for all the details.
There has been quite a lot of debate going on between the users and developer of Django about the release of a new version post their 0.96 release. I have been fairly comfortable developing using 0.96 version and have been pretty much a passive observer to this whole debate.
Recently I wanted to start using Review Board for doing code reviews for some of the projects/products we work on. I went to read the instructions and they list 0.97 (duhhh !!!!) as the version of Django. It pretty much meant that I had to use the Django trunk as of that day and I am not even sure against what revision Review Board was last tested. This definitely is not a good scenario to be deploying to and add to the fact that I already have a few applications running Django 0.96. Luckily the announcement comes in good time and even though I have to wait another couple of months I am super keen to be finally able to use review board in house and also to push all the other applications to make full use of the Django 1.0 features.
There has always been a debate ( read this blog post on popularising Django from 42topics) about the one killer application or a set of reusable applications that is going to get Django a lot more credibility and traction among developers and eventually the enterprise. Irrespective of whether its the killer application or the set of reusable applications , what I faced when i saw 0.97 as the supported django version is exactly the kind of things that can stop this from happening. How are people going to be using that one killer application or that set of reusable applications if they dont even know which version of django they all depend on? With this roadmap for release 1.0 Django is going to make it much more easier for that to happen.
Till then I am happy hacking on 0.96.
URL Design – A better starting point to build web applications ?
I have been working on web applications and web technologies pretty much for the past decade and one of the things that I have felt that is completely ignored during the design of an application is the URL design.
What made me write this post is the interesting interview with Jacob-Kaplan-Moss , one of the co-creators of Django. He talks about how URLConf system in django is one of his favourite features of django and how he obsseses over it from time to time. It is heartening to hear it from one of the core committers of Django. To me, Django has to be the most productive web application framework I have worked on till date.
Getting back to the topic in hand and why I consider URL design should be given more importance upfront.
To understand this better, we need to look at how a typical web application design & development takes place. If 37signals (creators of Basecamp, Backpack, Highrise , Campfire) are to be a good yardstick and boy oh boy they are, the whole concept starts with the UI. You work with a designer to come up with the UI to visualize the way the application is going to work, make changes based on feedback and the whole thing iterates till you are happy with the UI to start building web application. Once this is done, the developers look at the UI and figure out the overall design ( models/DB Tables, views/controllers, service layers etc) and then start implementing the same. While implementing each of these people need to communicate about what the URL of each page is going to be and how to go from one page to another. If you ever have built J2EE applications and used frameworks like struts you will totally understand the pain involved in this and the confusion it can cause.
Now lets say we start with the URL design. We know the basics of the application and what it should do. We start figuring out the first few set of URLs for the application. We then map each of these URLs to how they will look. If you are using Django, this can be easily done by using URLConf system and adding the relevant templates and a dummy method in a view that will call the relevant template for the URL. By the time the UI is done by the UI designer, all the URLs of the system are set in stone , all the templates are already written and also the dummy methods have also been created. If the Architect works with the UI developer so much the better at this stage since it will reduce some of the refactoring work later.
The developers can now concentrate on only implementing each of these view functions and not worry about building the UI and doing the correct linking etc etc etc. There are bound to be some changes when they refactor ( think multiple “applications” in Django), but if the URL design was done right, this would be a piece of cake.
For a project I worked on recently with django, this has saved me a ton of work since I was able to communicate to the team much more effectively by following this method. This will especially work the best for small teams working together.
I would definitely like to hear about other people’s experience in going about building a web application and how important/unimportant they consider URL Design.