Hello,

My team is currently doing an exploration and prototype for a server-
side javascript environment. We are currently using the dojo toolkit
and its implementation of the DTL templates to help develop this
technology. Upon examination of Django's framework for development, I
have come to really love its URL Mapping system and wish to emulate
it.

Before doing so, I was wondering if I could get some input from you
about your system. Pros, cons, things you wish you could have done
differently, difficulties, etc.

One of my main questions lies in the fact that when configuring URL
patterns, a function call is made as opposed to using a dictionary. I
can understand that this makes sense for Python developers, but was
there any other reasoning behind it?

I ask because i was contemplating having the user create their URL
patterns with JSON. Not only is this natural for Javascript
developers, but i also find it to be clear for new users to understand
what each property does. an example of the format I am thinking of
looks like this:

[
    {
        urlPattern: [ <regex>, <regex>, <regex> ],
        callback: "some.module",
        optionalParameters: { foo : bar },
        templatePath: "/someTemplate.dtl"
    }
]

But is there a better tradeoff to have the patterns be created with a
function instead?

I apologize if the answer to this question is obvious for a Python
developer, I am asking it coming form a background of zero Python
experience.

Thank you.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
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