On 4 Dec 2007, at 13:26, bobj wrote:

> Simon - These are GREAT!!! Ideas. The regular expression based URL
> dispatching  replacement has been something I personally have been
> thinking about for some time.  I would be interested in helping with
> this If you put together a proposal. One URL implementation worth
> considering is "Routes" ( http://routes.groovie.org ). I have used
> Routes for web applications and I think it is easy to grok. Have you
> taken a look at Routes?

I like Routes in principle, but the way it has the concept of a  
"controller" baked in to it didn't sit very well with me. I can't  
imagine it would be hard to use it without controllers though.

I'm generally pretty happy with regular expressions, but I watched  
Scott Guthrie's presentation on the ASP.NET MVC framework a few weeks  
ago (it's really interesting, they've taken a bunch of ideas from  
Django and it gets name-checked in the presentation) and one of the  
things he noted is that there are developers (especially in the  
Microsoft ecosystem) who never really got comfortable with regexps. I  
don't want those people to be turned away from Django on the first  
page of the tutorial. He also described the ASP.NET MVC syntax for  
URLs, which looks like this:

search/[query]
product/[id]

http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc- 
framework-part-2-url-routing.aspx

While I personally prefer the power of regexps, I can see how the  
above would make it much easier for developers just beginning to get  
their feet wet with Django. We can always enlighten them with the  
power of regular expressions once they're hooked. If URL handling is  
interchangeable we can have the best of both worlds. Incidentally,  
allowing URL logic to be swapped out was an initial design goal back  
when we put the URL stuff together - we were worried about  
performance, but when we benchmarked it turned out that Python can  
run through a list of a hundred or so regular expressions in less  
than 0.01 seconds.

Cheers,

Simon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to