> when recieving "#!/~somestring" as a url what is the best method for > determining whether "somestring" is the name of a User or a Devteam? > The only things i can come up with are: > 1. Query the database to see if a user with that name exists. If it > doesnt, try devTeams. > 2. Hava different symbol for each >
Right ... they are sharing a namespace so by definition, we can't be sure from the name which one we are dealing with. I think option #1 is fine, since as I said yesterday, we don't expect any users to ever conflict with a devteam. If anyone really wants to veto this, we can go with a different symbol. We could potentially use the hyphen (/-myteam) though that looks a bit weird. For what it's worth, there is a formal reason to use tilde. RFC 3986<http://tools.ietf.org/html/rfc3986>(URI syntax) defines "unreserved characters" (section 2.3) as: unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" This means that the only non alphanumeric characters which may be used in URLs (including all possible Unicode characters) are the hyphen (-), the period (.), the underscore (_) and the tilde (~). Everything else is reserved for use in URI syntax, or non-ASCII which is not allowed. All other characters must be percent-escaped. I suppose, though, that we are already breaking this rule with the + character. As I see it, all the other characters look very weird as part of generic syntax in front of a name. An alternative approach is that rather than unify the user and devteam namespaces, we unify the devteam and game namespaces. After all, they will only share when we promote a game, so we can change the name of a game we promote if it conflicts with a devteam, and we can avoid naming devteams after games. That way, there will be no funny characters in the URL of a promoted or non-promoted game. It will be: /myteam/mygame/ I'm for that approach. By the way, I think I figured out the significance of the "!" which is not really necessary except by convention. Apparently, the Google web crawler recognises URLs with the "#!" in them as distinct pages, allowing it to crawl web pages that are rendered entirely using Ajax. It can't do that for all # URLs, because that would include any page with anchors (such as all section headings on Wikipedia).
-- Mailing list: https://launchpad.net/~mugle-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~mugle-dev More help : https://help.launchpad.net/ListHelp

