Differences between revisions 2 and 3
Revision 2 as of 2005-11-29 16:38:18
Size: 1701
Editor: EricHopper
Comment:
Revision 3 as of 2005-11-29 16:55:37
Size: 2026
Editor: EricHopper
Comment:
Deletions are marked like this. Additions are marked like this.
Line 19: Line 19:

 * ["tonfa"] thinks I should use {{{url.split('/')}}} for speed reasons.
  * Perhaps this is true, but I feel that choosing that path right now is premature optimization. It's quite possible an optimized URL parser could be written after a good syntax is decided upon. -- EricHopper [[DateTime(2005-11-29T16:55:37Z)]]

Rewrite of hgweb

This is just something [wiki:EricHopper I'm] playing around with, and it may not become 'official'.

There are two basic goals I'm going for in this re-write:

  1. I would like to eliminate GET form variable syntax from most of the URLs. I find URLs that say things like http://selenic.com/repo/hg?ca=68ec7b9e09a4;type=bz2 to be rather ugly and painful to create links to from other places. Additionally, I do not think they convey to a user who sees it exactly what is being linked to.

  2. I would like to clean up the code and make it obvious which code path is executed for any given URL. I would also like to abstract things sufficiently so that setting up different front ends is easy. For example, currently only CGI, and the simple Python http server are supported. It would be nice to add FastCGI, mod_python, and the Twisted http server, but right now the code makes it hard.

The URLs being used are a human factors issue, and I know that I don't know the best ideas for how they should work. So I'm really interested in what you all have to say about it. The code currently has a fairly generic engine for mapping URLs to functions using regular expressions. It can also pull out named sub-expressions to use as parameters. So, when making suggestions about URLs, keep in mind those limitations, or suggest a better engine.

  • ["tonfa"] thinks I should use url.split('/') for speed reasons.

    • Perhaps this is true, but I feel that choosing that path right now is premature optimization. It's quite possible an optimized URL parser could be written after a good syntax is decided upon. -- EricHopper DateTime(2005-11-29T16:55:37Z)


CategoryNewFeatures

NewWebInterface (last edited 2012-10-25 21:26:22 by mpm)