On Thursday 15 November 2001 04:17 pm, Ian Bicking wrote:
> On Thu, 2001-11-15 at 17:21, Sascha Matzke wrote:
> > My suggestion is that we move the file system stuff were
> > it (IMO) belongs - into the ServletFactories that handle
> > physical files.
> There does seem to be a concensus that URL mapping needs to be
> generalized, to enable exactly the things you are thinking of (and other
> stuff -- there's a list of ideas on the Wiki). None of this is
> implemented, though.
I thought Terrel implemented this with URLDecoders:
Any opinions from the crowd as to whether or not they like the design? I
haven't had a chance to look at it yet and while everyone begs for this, I
don't recall too many comments on Terrel's long standing product.
> As far as the fix, you can't really do this entirely in the
> ServletFactory, because you don't know which kind of ServletFactory to
> call until you've parsed the URL to find what name matches to what
> resource (which may or may not be a file). Extensions in the URL, for
> all their ugliness, do make the framework's job easier :)
Just to clarify: There are no extensions in WebKit URLs.
> Personally, I think there should be URLMappingFactories, and the whole
> process should be much more recursive than it currently is (thus
> allowing arbitrary hooks at different points in the URL space). Much
> more computationally complex, but still not that bad relatively, and it
> could be quite efficiently cached.
See Terrel's code.
> Just whatever we do, we must not reproduce Aquisition :)
On Thursday 15 November 2001 04:37 pm, Sascha Matzke wrote:
> If the extension is .py or .psp some other ServletFactory would have
> to do the work. If they need it, they could check the file system for an
> matching physical file.
We will continue to use extensions on disk to "do the right thing", but
will never encourage the use of extensions in URLs as that makes them
brittle. On the other hand, WebKit doesn't explicitly break on them so if
you're a sadist, then feel free. ;-)
On Friday 16 November 2001 01:40 pm, Sascha Matzke wrote:
> <form action="doSomething.yaa" method="post">
> - no matter where you are in your "webpath", as the extension .yaa is
> automatically mapped to the controller servlet and never seen by the
Doesn't the user see the .yaa URL as soon as they click submit? I'm not
aware of any method to hide the action URL from the user...
BTW I also use "views" and "controllers". I typically have a top level of
directories named after the objects they deal with and then servlets like
View, Edit, Delete, etc. Main.py usually gives an overview of the objects
for browsing. For example:
I admit it's not quite as pretty as:
which lacks the extra punctuation (?=), but it's still a pretty clean URL
and no user has complained so far.