wissel.net

Usability - Productivity - Business - The web - Singapore & Twins

The Eventful Notes Client


There have been many attempts to explain what Lotus Notes is. I'd like to add my own - from the perspective of software development:

Lotus Notes is an event engine that provides the developer with the capability to assemble an application from predefined events and react to them.

The languages available to react to events are: @Formula, LotusScript, JavaScript, Java, C/C++. The selection of available languages depends on the event you want to react on.
. Some examples of events are: Database opened, Default value of a field, Saving a document etc. There are MANY events and the knowledge how to use what event and when makes the Notes developer <g>
I assembled a small database with one outline, one page, one frameset, two views, one form, one subform and a few fields. I "mined" almost every event I could find with prompts to determine the sequence of the events firing (I didn't mine Hide-when formulas, the onKey..., onMouse... and onChange events).

After putting all the events into code I performed the following actions, starting with the empty database:
  1. Open the database (into the frameset)
  2. Switch from the View "$All" to the View "SecondView"
  3. Create one document "EventSample"
  4. Fill all fields with values
  5. Press F9 to recompute
  6. Change one more value
  7. Press Ctrl+S to save
  8. Close the document
  9. Repeat Step 3-8
  10. Select the View "$All"
  11. Delete the current document (Del key)
  12. Select the next document
  13. Select the deleted document
  14. Undelete the document
  15. Close the database
I didn't play with agents, drag & drop or web documents (that would be more to add). There are a lot of events firing, see for yourself:

Update: Also checkout Part 2 of the story.



Some interesting factoids:
  • The events fire a little off: QueryOpen of a view fires before the PostOpen of the database
  • Input translation events fire with the formulas of computed fields. Input validation after that in their own sequence
  • Subform events, even the JSHeader, fire after the form name has been identified
  • Web only events don't fire in the client
  • The QueryDocumentDelete also fires if you don't have the right to delete
  • Terminate is really the last thing to fire, however the interesting objects are out of scope then
The database is available in the downloads section.

Posted by on 06 July 2007 | Comments (2) | categories: Show-N-Tell Thursday

Comments

  1. posted by Kevin Pettitt on Sunday 08 July 2007 AD:
    Great idea Stephan! This will be an essential reference for those times you're trying to puzzle out sequences of events, especially on complex forms with many fields, embedded views/forms, etc. I could also foresee using this approach to decipher events firing in multiple frames of a frameset as it opens. I'd be curious to know if there are any rules that govern that, such as events fire from inside-out or vice versa in terms of how frames are nested.
  2. posted by Slawek on Monday 09 July 2007 AD:
    Great idea! I would be great if this information found it's way into the documentation.

    Also if you were to write these messages to the status bar you could have them logged to the log.nsf. Thanks to Julian Rubichaux's comment (number 6) on Andre Guirard's blog
    http://www-10.lotus.com/ldd/bpmpblog.nsf/dx/debugging-tip-status-bar?opendocument&comments