Encoding information in the path info was, in fact, the way Tapestry originally operated.
It has a few defects. As you wander the application, your base URL (used, by the client browser, to calculate relative URLs) varies considerably ... this is especially bad in Tapestry, because the number of "terms" in the path info varies depending on service. The end result is that you have to use absolute, not relative, paths to all your static resources (images, stylesheets, etc.). Worse, the first "term" in the URL is "/context" (as in "/context/servlet? service=...."). This is variable depending on deployment, so you end up in a situtation where your implementation mandates a deployment detail that is supposed to be variable. That's why Sun (in model 1 and 2) strongly suggests that you always use relative URLs to assets. -- [EMAIL PROTECTED] http://tapestry.sf.net > Howard, > > I have an idea for the URL's that you could probably > either confirm or shoot down pretty quickly. > > What about the way Amazon does it? Of course I don't > understand all the details, but here are some basics: > > 1. Here is a pretty URL that goes to a unique page, > but is stateless > http://www.amazon.com/exec/obidos/ASIN/0618260587 > > 2. One a person goes to that page, state is added > automatically so taht it looks like > http://www.amazon.com/exec/obidos/ASIN/0618260587/102-3321578-2400930 > > 3. The URL actually contains state, but without using > the querystring indicator, i.e. "?" > > Now, there are two key points about this form of URL. > A) It looks like a stateless URL so all search engines > will crawl it and record it. B) > > 4. If someone else was to go to Amazon using the URL > in #2 above, it would be silently converted to > represent their session with Amazon, not mine. In > other words, the part of the URL that has state would > cause an internal Tapestry exception, since it would > be invalid. Then Tapestry would create a new session > (Visit) and attach it to the end of the URL. > > Now, as I see it, there are two very important > objectives Amazon has achieved by using this form of > URL. > > 1. There is no query string (i.e. "?") indicator. > This means that all search engines will now be able to > catalog my site. In e-commerce, this is absolutely > essential. > > 2. I can send this URL to someone else, or bookmark > it, and it will still work. Again, this is essential > for e-commerce. > > Now, on the downside, I admit that the URL is not > pretty in the sense that it is hierarchical, but it > would at least achieve two of the three goals. > > Also, please know that I have not developed any > Tapestry applications. I have just completed my first > read-through of the developers guide, and will start > later this month. > > Thanks for your consideration, > Scot > > > --- "Andrew C. Oliver" <[EMAIL PROTECTED]> wrote: > > I understand. I just suggest people do care about > > such things. Myself > > included. That is all. > > > > -Andy > > > > Howard M. Lewis Ship wrote: > > > > >So far, it's been either pretty URLs or templates > > that work in WYSIWYG > > >editors; I haven't found a way (even using the > > <base> tag) to have it both > > >ways. Every time I change to long URLs, encoding > > all the information in the > > >path info instead of in query parameters, something > > important breaks for > > >somebody. In addition, the way service parameters > > are encoded now (as > > >objects encoded as strings, rather than just > > strings) is somewhat reliant on > > >using query parameters. > > > > > > > > >----- Original Message ----- > > >From: "Andrew C. Oliver" <[EMAIL PROTECTED]> > > >To: <[EMAIL PROTECTED]> > > >Cc: "Tapestry Contrib" > > <[EMAIL PROTECTED]> > > >Sent: Wednesday, December 18, 2002 10:34 AM > > >Subject: Re: [Tapestry-contrib] Fwd: Re: > > [Tapestry-developer] Tapestry and > > >RSS > > > > > > > > > > > > > > >>While I don't think my opinion should count for > > much on this. I am in > > >>the URL control crowd. > > >>Take a look at what Cocoon does with its sitemap > > (xml.apache.org/cocoon). > > >> > > >>URLs are pretty important in some companies and > > Can be a powerful tool > > >>for usability. > > >> > > >>-Andy > > >> > > >>[EMAIL PROTECTED] wrote: > > >> > > >> > > >> > > >>>i'm reposting this, as it never made it to the > > list :) > > >>> > > >>> > > >>>On Fri, 13 Dec 2002 16:46:12 -0500, > > [EMAIL PROTECTED] said: > > >>> > > >>> > > >>> > > >>> > > >>>>hi, > > >>>> > > >>>>i don't know if i count as a "user" but i do > > like short urls, that tell > > >>>>about the structure of a site's information. i > > like it when i can easily > > >>>>navigate around if i get a 404 (ok, linkrot is > > bad too, but it's a fact > > >>>>of life). or jump straight to something i know > > is there, but have not > > >>>>bookmarked it (eg. i can jump to the javadoc of > > java.lang.String without > > >>>>having it bookmarked, or even bringing up the > > page)... > > >>>> > > >>>>as a site-builder, i like nice urls that i can > > send out in an email > > >>>>without it breaking (less than 80 chars) on > > certain mail readers... or > > >>>>print on a piece of paper and a user can type it > > in... simple urls make > > >>>>log analysis easier too. > > >>>> > > >>>>call me weird, but other's share my opinion - > > here's a couple of links > > >>>>google gave me for "url usability": > > >>>> > > >>>>http://www.useit.com/alertbox/990321.html > > >>>> > > >>>> > > > >>>http://www-106.ibm.com/developerworks/web/library/us-cranky8.html?dwzone=w > > >>> > > >>> > > >eb > > > > > > > > > >>>>http://www.bohmann.dk/articles/making_urls_predictable.html > > >>>> > > >>>>i think ugly urls are against the spirit of the > > original concept - use > > >>>>them if you have no other option... > > >>>>http://www.w3.org/Provider/Style/URI.html > > >>>> > > >>>>or take your mailing address for example - yeah, > > it could be > > >>>>?1235&1234@fooboo-123@arlington@MA@USA@ but "1 > > Microsoft Way, Redmond, > > >>>> > > >>>> > > >WA > > > > > > > > >>>>98052, USA" still looks better to me :) > > >>>> > > >>>> viktor > > >>>> > > >>>> > > >>>>On Fri, 13 Dec 2002 19:07:59 +0000, > > [EMAIL PROTECTED] said: > > >>>> > > >>>> > > >>>> > > >>>> > > >>>>>I double-dog dare you to find me a user (I mean > > an end user, not a > > >>>>> > > >>>>> > > >client > > > > > > > > >>>>>who > > >>>>>think s/he knows "what user's want") ... find > > me a user that actually > > >>>>>cares > > >>>>>about the URLs. > > >>>>> > > >>>>>They might care if they can't bookmark a URL > > and come back later. They > > >>>>>might > > >>>>>care if the URL is broken. But I double-dog > > dare you to find me a user > > >>>>>that > > >>>>>cares about the difference between > > "/products/food/fruit/apple" and > > >>>>>"/app? > > > >>>>>service=catalog&sp=food&sp=fruit&sp=apple". > > We're not > > >>>>>talking > > >>>>>telegrams here; nobody's paying by the letter > > (well, maybe on WAP). > > >>>>> > > >>>>>The only difference is that users of the > > Tapestry app will be less > > >>>>>inclined to > > >>>>>second guess the URL construction by manually > > hacking the URL, and > > >>>>>therefore > > >>>>>less likely to be frustrated when it doesn't > > work. > > >>>>> > > >>>>>Also, the fact that users are trying to second > > guess and circumvent > > >>>>> > > >>>>> > > >your > > > > > > > > >>>>>application means that your app has a > > usuability problem ... and it > > >>>>> > > >>>>> > > >isn't > > > > > > > > >>>>>the > > >>>>>format of your URLs. > > >>>>> > > >>>>>You Are Not Your Users. > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>-- > > >>>> > > >>>> [EMAIL PROTECTED] > > >>>> > > >>>>-- > > >>>>http://fastmail.fm - The professional email > > service > > >>>> > > >>>> > > >>>> > > >>>> > > >> > > >> > > >> > > > >>------------------------------------------------------- > > >>This SF.NET email is sponsored by: Order your > > Holiday Geek Presents Now! > > > === message truncated === > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com > > > ------------------------------------------------------- > This SF.NET email is sponsored by: Geek Gift Procrastinating? > Get the perfect geek gift now! Before the Holidays pass you by. > T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ > _______________________________________________ > Tapestry-contrib mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/tapestry-contrib ------------------------------------------------------- This SF.NET email is sponsored by: Geek Gift Procrastinating? Get the perfect geek gift now! Before the Holidays pass you by. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ _______________________________________________ Tapestry-developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/tapestry-developer
