Clueless !!!

A journal to keep track of my experimentation with different technologies

URL Design – A better starting point to build web applications ?

with 4 comments

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.

Written by vidyanand

June 11, 2008 at 10:15 am

Posted in django

Tagged with

4 Responses

Subscribe to comments with RSS.

  1. Also I have found out thinking upfront about what your URls are going to be, and what they are going to do gives some deep insights into what you are planning to build.

    shabda

    June 12, 2008 at 7:19 am

  2. @shabda. Totally. By doing this I really find that I think a lot more about the application and the consequence of every URL/page/action. And a lot of these help me improve my view or model layer much more earlier in the design phase.

    vidyanand

    June 12, 2008 at 7:43 am

  3. Then again European women are catching up and then some. ,

    Stinky60

    October 10, 2009 at 7:44 pm

  4. Why aren’t you answering any of these questions? ,

    Stinky86

    October 22, 2009 at 2:01 pm


Leave a Reply