Your Development & Design Resource
Understanding the Domino CRUD API - the Basics
04/13/2009 10:12 AM by Chris Toohey
IBM Lotus Notes/Domino has a pretty easy to use and powerful CRUD - or (Create, Read, Update, Delete) NotesDatabase Data Engine - complete with a defined Web-accessible API.
The best part is... the majority of Domino Web Application Developers are already using it!
Note: I'll be using the term processing agent below. This is not to be confused with a Domino Agent Design Element, but is rather the XHTML Form Element's action attribute. See http://www.htmlquick.com/tu torials/forms.html for an example.
I'll make no assumptions here that you're familiar with the Domino URL Commands that handle all CRUD activities and just jump into them, as understanding them at a very basic level is required for a few more deep dive things that I want to get into. Thus, I'll list the Domino URL Command and how it's used below:
This Domino URL Command allows you to open or read a NotesDocument. This URL Command can be ommited, as the default render option for a Form Design Element when viewing a NotesDocument via the Web Browser Client is to open said NotesDocument in Read Mode.
It should be noted that the Form Design Element used to render the NotesDocument will render in the following order:
- Form Design Element defined in the Form Formula section of the viewname View Design Element.
- Form Design Element defined in the Form NotesItem of the rendered NotesDocument.
- The Default Form Design Element for the target NotesDabase.
This Domino URL Command allows you to create a new NotesDocument in the target NotesDatabase via the Form Design Element defined in the URL. HTML Input and like elements (fields) with exact name-match to NotesItems in the defined Form Design Element will exchange data.
- Verifies your access to render the defined NotesDocument in Edit Mode.
- Renders the defined NotesDocument in Edit Mode via the same applied Form
Design Element Logic as the
?OpenDocumentDomino URL Command. (see above)
This Domino URL Command does nothing functional per se, as it is used more to verify editor-access to the defined NotesDocument and tells the Domino to render - as mentioned - the NotesDocument via the Edit Mode version of the aforementioned logic-driven Form Design Element.
This Domino URL Command allows you to update the defined NotesDocument in the target NotesDatabase. HTML Input and like elements (fields) with exact name-match to NotesItems in the Form Design Element rendered via the aforementioned Form Design Element rendering logic. (see above)
This Domino URL Command allows you to submit a deletion request for the defined NotesDocument in the target NotesDatabase. Simply put, if you have the proper level of access to the NotesDatabase (and to the NotesDocument), once you issue this request Domino will take care of the rest.
So that's pretty much it for a basic overview of the Domion URL Commands that run the Domino CRUD engine. Simple - hopefully - because you're all familiar with them due to their extensive usage in Domino RAD.
For example, if you look at the HTTP Form Element's processing agent for most Domino RAD-generated Forms, you'll see these Domino URL Commands in-use.
I think understanding the Domino CRUD API will enable you to both write better, richer, Domino-based Web Browser Client User Experiences as well as give you an eye to what can be done via simple integration with other/non-Domino technologies.
Hopefully this is useful to those of you looking to get into Domino Web Application Development, and the next few posts on this topic will act as a refresher for those old hands that have been doing this for years... but I went back to the basics because, well, that's for the next post!