On Sun, 2001-11-25 at 17:16, Chuck Esterbrook wrote:
> > 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:
>     http://www1.ics.uci.edu/~tshumway/webware/urldecode.html
> 
> 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.

I've looked at it before, and as I look at it again I'm still not too
clear about the design.  For instance, there's mention of side-effects,
but I'm not sure what sort of side effects there would be.  It also
seems odd to have classes with only one method -- whenever I make
something like that, I usually feel like I haven't factored things
correctly -- he actually mentions that at the bottom, but... well, it is
a complicated issue, it *should* have a complicated implementation, so
purely by intuition it seems like there's something missing.

Also, Terrel's design doesn't seem recursive, and it feels like an
intensly recursive problem.  It also didn't seem to deal with the state
of Application.serverSidePathForRequest, which is a total mess, IMHO,
and should be refactored as part of the design.

I kind of like the idea of ServletFactory actually dealing with the
decoding, by extending it to do a little more -- a kind of
ServletFinderAndCreator or something.  So at the root would be a
FilesystemServletFinder, which would branch out into other
FilesystemServletFinder's (for subdirectories), into ServletFactory's
(found servlets), and other abstract stuff.  



> 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:
>       http://myhost.com/MyApp/Documents/View?doc=foobar
> 
> I admit it's not quite as pretty as:
>       http://myhost.com/MyApp/Documents/foobar/view
> 
> which lacks the extra punctuation (?=), but it's still a pretty clean URL 
> and no user has complained so far.

One thing that bothers me about Aquisition is how it conflates nouns and
verbs into one namespace... which is actually what Python does too :) 
But I think I prefer:

  http://myhost.com/MyApp/Documents/foobar?action=view

Because that is unambiguous when compared to accessing subelements,
which are fairly common.  For instance:

  http://myhost.com/MyApp/Documents/foobar/rdf?action=edit

At some point I had a strong opinion on why it wasn't right just to have
the verb be the last part of the URL, but I've forgotten what that
opinion was based upon.  Oh well... maybe because it was falsely like
Python, where Python has x.y(0).z(), but x/y/0/z is odd, and x/y/z?arg=0
is ambiguous... but that wasn't really my objection.  Oh well.

  Ian



_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to