|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 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. |
|
|
|
|
|
|
|
|
|
|