logo

Query Syntax of Domino URLs

Following on from yesterday's post I'm wondering whether Domino should drop the need for the tightly defined first parameter of all URLs' query segment. The Domino URL Cheat Sheet states:

Domino URL commands have the following syntax:
http://Host/Database/DominoObject?Action&Arguments

For no good reason the Action parameter has to be the first part of the URL's query What's wrong with them being optional and non-order-dependent?

In an ideal world the following would all work and have the same outcome:

  • db.nsf/0/DocID?foo=foo&editdocument
  • db.nsf/0/DocID?foo=foo&action=editdocument
  • db.nsf/0/DocID?action=edit&foo=foo&type=document

When opening a view why does "OpenView" have to start the query? If you leave the query off the view still opens and you can't edit or delete a view - only open it. These URLs should work:

  • db.nsf/MyView?foo=foo
  • db.nsf/MyView?type=view&me=second&count=10

So, the reserved parameter names would be things like type and action. Allowed values would be document, view, agent, open, edit, delete, login, logout, redirect etc. Their use would be optional. When missing Domino would do what it does now and assume.

There's seems to be no reason for it and it's just a pain when Domino makes itself stick out from its counterparts like this. Obviously there's the matter of backwards compatibility, but that could still be factored in when making the change. Not that it ever will. This is the way it is and always will be. Don't even know why I waste my time writing down my thoughts like this.

Comments

    • avatar
    • Chr. K
    • Wed 21 Mar 2007 08:14 AM

    You probably could achieve the requested functionality by putting Apache in front of Domino and use mod_rewrite (RewriteRule). But this may be a bit cumbersome. The tidy solution is in the hands of IBM as long as they don't split out the http task as an open source project. :-(

  1. You can make the action a true querystring parameter but setting it equal to something. So a URL can look like this:

    db.nsf/agent?openagent=1&foo=2

  2. Not sure about this one, but could you put something like this in the head-content of $$ReturnGeneralError?

    @If(@Contains(path_info_decoded;"agent1");

    @SetHttpHeader("Location"; @Replace(path_info_decoded;"agent1?";"agent1?OpenAgent&");

    "");

    @SetHttpHeader("Location";"") should do a server-side redirect, and work with Ajax if I'm not mistaken.

    If you have several agent, use a text-list, or documents that map different agents/dblookup.

    Give me a virtual smack on the head if I'm way off on this one.. :)

  3. This was a major source of frustration for me too when I was working with Domino. They could easily make it a backwards compatible change by having a parameter like "dominoaction=EditDocument" which gets checked for, and if it doesn't exist fall back to the old behaviour.

    I don't think you could get away with "action" or "method" because it would potentially conflict with parameters people have used in their apps. Ideally you'd have server config options to either disable the new functionality, or maybe even change the name of the parameter.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Wed 21 Mar 2007

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content