Search DominoPower's 11,320 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
PROGRAMMING POWER
Cache strategies with @Dblookup, and more
By Mick Moignard

One of the most common examples of less-than-perfect programming I've seen in Notes is the use of @DBLookup or @DBColumn with no thought given to the caching of data -- every call specified with NoCache, because the developer wanted to be sure that data was freshly looked up.

Both of these, @DBColumn in particular, are often used to get keyword data, as well as data from other sources. In development and testing, you may well be changing keyword documents frequently, and feeling some pain by having to exit the application -- including Designer -- each time.

Really though, there's no excuse for using NoCache against rarely-changing keyword fields in production. That's just unnecessary trips back to the server, while the user looks at an hourglass. This practice is especially bad if the form has a lot of refreshes on it, as a refresh will also cause each @DBColumn or @DBLookup with NoCache to go back to the server. Indeed, you can usually see that happening by watching the lightning-bold network activity symbol in the bottom-left corner.

Possibly the ultimate misuse of @DBColumn
I saw what must be close to the ultimate misuse of @DBColumn a few years back. There was a form that had around 150 or so fields on it, where pretty much every one was a dialog/keyword field, with the value list looked up with @DBColumn.

Between them there were about 6 different look-ups in all. And yes, every single one had NoCache specified. You can imagine: composing a new document took several minutes, as each of these look-ups went back to the server for the data.

Once we realised that a somewhat novice developer had built the form, and what the issue was, it didn't take long for that to be fixed -- and of course the compose operation then happened almost instantly.

Here's a tip
Do remember that the first @DBlookup done in any Notes database session -- that's the period between opening a Notes database and closing it again -- will always go and fetch the required data from the server and cache it.

However, that's not to say that every @DBColumn (or indeed @DBLookup) should be specified without NoCache. There may well be application design situations where keyword lists should reflect the latest data. One example might be when a view column is used to drive a keyword list, as is done in the standard Discussion template when selecting Categories. Here, the underlying look-up is to volatile data, so refreshing that list when you do the look-up is the right thing to do.


1  ·  2  ·  Next »
Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Home > Tips & Techniques (102 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   A faster way to repair corrupted server files
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Five trends for 2010
DominoPower TV Episode 1: Inside a strategy session with Teamstudio
More about Domino log files
Say goodbye to the Uh-Ohs. Long live the Tens.
Why your log.nsf might not be purging properly
Latest Lotus Headlines
SnTT: XPages Blank Calendar Control (Part 2), adding data
Have your Lotus Notes calendar display multiple time zones
Sample Database for Microsoft Office and Lotus Symphony Integration
Symphony 3.0 beta signals another attack on Office
Enabling DAOS on a database - new recommendation
Need your opinion on some new policy settings for Mail
Sometimes IBM Lotus Domino HTTP RPC Agents aren't the answer...
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad: Apple's latest heartbreaker
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Running auto-respond rules when Outlook is closed
-- Advertisement --

Power Tools 6.0 is a set of 90 administrative utilities for Lotus Notes & Domino
Power Tools simplifies management of the Notes/Domino environment by automating routine tasks. Power Tools can manage or monitor mail files, groups, ACLs, agents, LOG.NSF, templates and more.

Download a trial version from helpsoft.com.
-- Advertisement --

Integrate your Notes Applications with Microsoft Office and Symphony
Integra for Notes Integrates Microsoft Office and/or IBM Lotus Symphony
Requires NO change to the design of the appliation or Installations of DLL's and EXE's
  • Integra is a ready to use solution, enhance static reports with Excel data analysis, pivot tables, macros
  • User friendly aproach, using a point and click access to features
  • Reports from any Lotus Notes databases
  • Runs reports through a Notes client, web browser and scheduled basis
  • Allows use of LotusScript for advanced data manipulation
  • Enables self service reporting capabilities to end-users


Learn more at www.integra4notes.com.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login