Datatribe Softwerks, Ltd.

<< LotusScript: Lazy Coder Tricks | Home | Experiment: Theoretical Math>>

LotusScript: NotesDAO

Thu 27 Apr 2006

I've been twiddling with this and adding to it as seemed good and at this point I think there's enough to it to make it worth distributing. This is sort of an all in one data access layer for those of you who like the tiered approach to writing agents and scripted events. You can read more about tiered architecture here and here.

As the comment header says, it's just a wrapper for a bunch of notes data access methods, like db.search, view.getDocumentByKey and so on. There's also a script version of @dblookup as well as one that simply returns a view column. It's still a long way from the "end all" of DAOs, but it's a nice start and makes a lot of common data access tasks a bit easier. For example, instead of having to get a handle to a database, then a view and then a document, you can just ask for the document and pass the view name as a parameter. The database is passed when you instantiate the DAO class. There are a few other shortcuts as well. Hopefully other people will have their own additions to share! Feel free to post them here and I'll update the library as we go along.

Version History: NotesDAO 1.3.1


Reader Contributions:

Kevin Pettitt (04/03/2007 11:11 PM) website / e-mail

Hey Jerry, very nice work. It's now on my list of possible standard architecture elements.

I had an idea about the dblookup method. Considering the performance benefits of staying at the view level and avoiding document handles, a variation of that method that uses column number instead of fieldname would be great. You might be able to integrate it all into one method, but its probably best to create a DBLookupCol method or something. You would then use a NotesViewEntryCollection instead of NotesDocumentCollection, etc. etc.

Andre Guirard posted a great blog entry recently on this subject that can be found here: {Link}

Cheers,
Kevin




April, 2006
SMTWTFS
      01
02 03 04 05 06 07 08
09 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Articles by Month
Articles by Category
Features Downloads
Recommended