Confused by URLs?
Ned Batchelder was part of the team that wrote the original Domino server. He also has a weblog. In it, he recently commented on the state of Domino URLs in response to Brent's Law of CMS URLs. He almost sounds guilty about it. Now, for once, I am not going to slate Domino and instead I will side with Ned et al. Domino's URLs have to be complicated by their very nature. How else could a dynamic site keep them anything but?
For sites that are not so dynamic in nature you can of course use certain tricks to make the URLs less put-offish. That's what they did at the Reader's Digest. It's a Domino site but they've kept the URLs simple (.html instead of .nsf) so as not to confuse the "silver surfers". For example, this page:
http://www.readersdigest.co.uk/misc/pfaq.htm
Is actually just the following page (where, using Apache as the web server, they have masked the URL):
http://www.readersdigest.co.uk/rd/rduk_misc.nsf/$BouncerNormal/pfaq.htm
Taking this masking one step further, I read on Simon Willison's blog today a related post about keeping URLs logical when using PHP with Apache. When I get round to converting this site to PHP it means that I can easily create friendly and logical URLs. Such that:
http://www.codestore.net/A55692/store.nsf/unid/EPSD-4XYGZL?OpenDocument
Becomes:
http://www.codestore.net/articles/EPSD-4XYGZL
And:http://www.codestore.net/A55692/store.nsf/unid/BLOG-20021008?OpenDocument
Becomes:
http://www.codestore.net/blogs/2002/10/08
And:http://www.codestore.net/A55692/store.nsf/area?OpenView&Count=10&RestrictToCategory=JavaScript
Becomes:
http://www.codestore.net/articles/JavaScript
Shall leave it up to you lot to decide which are the more logical...
RE: Readers Digest/simplifying URL's.
Interesting. The problem that I think this kind of thing creates is the 'this is more work' factor. Not only for the developer, but for QA as well: [http://www.readersdigest.co.uk/misc/<Computed%20Value>]. Oops. User friendly URL's are are a waste of time unless they happen naturally (ie php & apache), in my opinion. Granted, Domino outputs some mad URL's from time to time, and these can be intimidating to some users. I say good! Let users think what we're doing is complicated.
I think that we, as techies, can sometimes get a bit hung up about URLs etc. Studies have shown that most "normal" users do not actually look at URLs. The only people who do are our peers who I think are generally pretty happy with URLs the way they are.
Maybe it's just habit but the old http://server/directory/database/view/key format is pretty logical to me.
From what I understand about ND6, The server has lots more ability to "translate" URLs, so that, as in Jake's example,
http://www.codestore.net/articles/EPSD-4XYGZL
can automatically be redirected to
http://www.codestore.net/A55692/store.nsf/unid/EPSD-4XYGZL?OpenDocument
Redirect or map? Two different things...
Well not fair at least there are workarounds in domino. Taking your example
http://www.codestore.net/A55692/store.nsf/unid/BLOG-20021008?OpenDocument
- Create a view with a nice name
- Add a field with containing a unique html subject (I mostly compute it out of the current time/date)
- Make it the key of the view
http://www.codestore.net/A55692/store.nsf/recent/10102002.html
It is possible to change the folder and db name too which would result in
http://www.codestore.net/news/recent/10102002.html
If you are using a tweaking module for Apache you should compare it with a tweaked domino url.
In General I agree with you, especially as Domino Url Links are broken during SMTP conversion being send via E-Mail.
Regards
Heini
Not sure about that list "It is possible to change the folder and db name too". How do you do that exactly?
I agree with Matt's comments above that we get too hang up about url constructs when we're probaly the only ones who actually look at them. And if you listen to Ned Batchelder's comments about how they originally tried to take an API approach to building Domino urls it all makes sense and it can be very useful for developers to tweak urls to our liking.
By the way, I didn't realize you could run Domino with an Apache hhtp server !(thought only IIS was supported...)God, the amount of things one doesn't know about !
Indeed we probably are the only ones who look at URLs but we are also the only ones that look at this website so it's no less relevant.
Domino and Apache (and PHP)
Point taken jake ;-)
And many thanks for the Apache link !
PS: and keep you Amazon wish list where it is, I promise Santa won't forget you at Christmas (to thank you for all the good work you're doing to keep the rest of us uptodate !)
Dear Jake,
please tell me that you are joking. This is just a Url Redirection
Incoming Url String: /news/*
Redirect to: /A55692/store.nsf
Instead of using news it might be better to choose a more unique string. I do not know what happens if you also have a view names news.
Maybe I completely misunderstood you ? If yes, I apologise.
I think we've misunderstood each other Heini. From the way you said you could "rename the db" I thought you meant something else.
But Domino's URL redirections aren't much good anyway. They are only really useful as a user-friendly "entry URL". Not nearly as powerful as Apache's!
Progress? Here are some examples:
1. http://www.jakehowlett.com/codestore/article/EPSD-5D6R6R
2. http://www.jakehowlett.com/codestore/articles/forms/
Jake,
Do you know what sort of HTTP performance readersdigest(or any other site) has been getting once they moved from Domino(R5) HTTP to apache. During the beta testing of R6,IBM had commented that apache would be a supported HTTP server (other than IIS) in this release. Thanks.
My 2c.
I think the logical consistent URL format of Domino is a good one. My only objection is the UNID nonsense which makes the URL MASSIVE and it often gets destroyed when sent over the mail system. From a support perspective it's good too. When a user tells you about a URL that doesn't work you know pretty quickly where the problem is.
On the performance question raised by Kamal, this is a holy war unto itself. The important point is EVERY WEB SERVER IS DIFFERENT. Some serve fast static pages but suck at dynamic content, some serve images quickly but cannot perform database transactions effectively, and so on. When you do a performance comparison it should be against identical applications. You find also that the differences are very small. If a user has to wait even 1 second extra for a page load, over a dialup connection this is irrelevant. Hmmm I think this may be the topic of a future blarticle....
http://www.puakma.net
Short URLs are most valuable when when you need to send a link to a customer via e-mail. Like Brendon says, Yahoo mail and HotMail will wrap the URL if it is longer than 70 characters. And, there are a great many customers who will not copy and paste a hanging URL. In fact, why should they?
Sheesh! This is kind of long:
http://www.clickinvites.com/c.nsf/html/wedding_young%20love_1_1.html
I use services like DomainDirect (bad service btw) and Bulkregister to register and manage my domain names. They offer services called "URL keeper" or "Cloaking". The url "www.mydomain.com" opens to a frameset in which you can open your homepage, e.g. "http://server/database.nsf". If I have a view called "news", I open it like "www.mydomain.com/news". Domino automatically redirects to "news?openview"
Second cheat (for Jake ;-)) I use is to internally reference documents without using the view name and just the DocumentUniqueID, e.g. "www.mydomain.com/0/D3EDF03B82C009D9C1256C4F002EA94C" which keeps it short and simple. When I will be as advanced as you Jake, I will do as you do of course.
Thanks to Jake for name checking Reader's Digest UK. Just thought I'd give a little more detail about what we do and why. Apache sits in front of Domino on a separate server. URL redirection is only one of the reasons why we do this but Apache does it very well. The config file contains a few lines of regular expressions that get mapped to Domino databases. It's not only page URLs that get mapped this way - resources like images are also mapped. We don't just do this to benefit the customers, though that's a big reason. As Jake mentioned, search engines like simple URLs. Another reason is that we have a nice content management system built in Domino and friendly URLs make things simpler for our editorial staff. Domino is excellent for content managment, as you might guess. I can't mention all this stuff without doing my own name checkfor NIP without whom none of this would be possible.
Cheers - Chris
oh, no, major IXNAY on the domino generated URLS. Ugly, always break in emails, and are totally frustrating to look at in log reports.
Every web db I do uses a named view, and each doc is referred to either by a call number
{Link}
or a keyword
{Link}