Would it make sense to not instantiate the objects for the directory object and ($VIMPeople) view object?
Then, wrap "get" properties around the directory and ($VIMPeople) view objects. You could check to see if the object is first instantiated (is nothing) and if it is you could instantiate it just once.
Something like:
Property Get PeopleView as Notesview
if Me.vimpeople is nothing then
set Me.vimpeople = NAB.getview("($VIMPeople)")
end if
set PeopleView = Me.vimpeople
End Property
Property NAB as NotesDatabase
if Me.directory is nothing then
Set Me.directory = New NotesDatabase(Me.database.Server, "names.nsf")
end if
set NAB = Me.Directory
end Property
I think it's some sort of design pattern but I can't remember which. This way you don't waste time and resources for the agents that don't use those objects.
Hey Jake,
Would it make sense to not instantiate the objects for the directory object and ($VIMPeople) view object?
Then, wrap "get" properties around the directory and ($VIMPeople) view objects. You could check to see if the object is first instantiated (is nothing) and if it is you could instantiate it just once.
Something like:
Property Get PeopleView as Notesview
if Me.vimpeople is nothing then
set Me.vimpeople = NAB.getview("($VIMPeople)")
end if
set PeopleView = Me.vimpeople
End Property
Property NAB as NotesDatabase
if Me.directory is nothing then
Set Me.directory = New NotesDatabase(Me.database.Server, "names.nsf")
end if
set NAB = Me.Directory
end Property
I think it's some sort of design pattern but I can't remember which. This way you don't waste time and resources for the agents that don't use those objects.