On Fri, Apr 26, 2002 at 02:46:00PM -0700, Luke Opperman wrote: > > > Amazon is a pretty good example; there's a rather complex > > Web app that > > runs the site, and I can't ever remember seeing a > > ?query-string URL; > > it appears to pass all arguments as hierarchical elements > > separated by > > "/". > > We do things like this now, using Webware and mod_rewrite. > Not that I'm particularily enamored with having to create > page-specific regexps for mod_rewrite, but I think it will > be specific and hard to generalize for webware to > automatically handle.
Why? Imagine a configuration file that did nothing but this: /URI-pattern /filesystem-pointer So, /products /foo/bar/webware/ProductServlet.py And ProductServlet.py gets "/502" as an argument and does the right thing with it. Seems pretty straightforward. Now, I don't suggest this is how the mapping should go, since it's simplistic and laborious, but there's no reason it couldn't go this way. There's no reason you can't define a simple XML format to model URI space (in fact, it's been done) and use explicit containment relations and XPath queries to map URI space to Webware source resources. > For instance, old-style URL for us: > > http://www.somewhere.com/products.psp?id=502 > > is viewed/linked for the real world: > > http://www.somewhere.com/products/502 > > and could just as easily be > > http://www.somewhere.com/products/view/502 > > as opposed to perhaps > > http://www.somewhere.com/products/502/order > > which could map to the real webware URL of > > http:://www.somewhere.com/order.psp?productid=502 > > The main reason we switched to this was actually for search > engines, as they tend to ignore query strings, and our > customers would prefer that every product gets hit. I > imagine Amazon's reasons would be similar. Sure, that's one very good reason, actually. > I'm not sure at all how I would tell Webware to do this > stuff. I think the point is that presently it's not particularly easy, if doable at all, In my mind the purpose is to remove restraints of > the underlying technical solution (what Webware pages do > what processing), which mod_rewrite is perfectly suited > for. I use mod_rewrite heavily, but it's not terribly ideal: 1) It's grotty black magic voodoo and I usually have to ritually slaughter many Perl hackers to get it to work, and that's messy 2) I want to do these mappings in something like Webware (or XPath), i.e., something that's expression-based; I don't like regex much at all 3) Though mod_rewrite is C code, I think there's more overhead doing it in Apache than in Python as part of the algorithm of mapping URIs to source resources, but that's more of a guess than a solid opinion. There are several web and app servers that offere total flexibility to do this mapping; I can't think of any reasons why in principle Webware can't do the same thing. Best, Kendall Clark _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss