IBM®
Skip to main content
    Country/region select      Terms of use
 
 
   
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

Elevator cartoonKevin Pettitt writes:

...all that looking up to the form configuration document could be expensive, but I have made liberal use of @GetDocField so that the only DBlookup that is used simply returns the UNID of the form configuration, for use by the @GetDocField stuff. I'm certainly open to alternative viewpoints, but the intent here was the compromise between potential caching problems associated with profile documents and extremely expensive DBlookups.

I've run across this attitude before, of wanting to avoid profile documents because of perceived caching issues, and it puzzles me. What caching issues? Profile documents are cached, okay? If someone changes the contents of one, other users won't see the change until they get out of the application and back in. For a Domino web application, it may take a while for all the server processes to catch on that the profile has changed.

Like the elevator in the cartoon, this doesn't make them useless -- it just means you have to choose when to apply them. The application Kevin is talking about requires storing a list of fields that would be automatically filled in for users based on their previous input. (The field values themselves would be stored in a personal profile document, for which caching is not an issue since only one user uses it. The question is where we store the list of field names, which must be available to all users).

In this case, the data doesn't change often, and if someone has a slightly out of date copy, it's no big deal. A more perfect application for profile documents is difficult to imagine, and they're so easy to use, and better-performing than the alternatives.

I think people try to use profile documents inappropriately, with data that's changed often and by many users -- to store the latest sequential number assigned to a document, say -- and it doesn't work, and they get gun-shy about it. I think it's always better to think about why something didn't work, and figure out how it does work, so that you can avoid only the non-working scenarios, rather than, as they say, throwing the baby out with the bathwater.*



* No actual babies were harmed in the composition of this blog entry.

Andre Guirard | 10 August 2007 10:12:01 AM ET | Plymouth, MN, USA | Comments (11)

Search this blog 

Disclaimer 

    About IBM Privacy Contact