dominoGuru.com

Your Development & Design Resource

Understanding the Domino CRUD API - the Basics

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:

  • Type: Read

    ?OpenDocument
    Usage: http://server/database/viewname/notesdocument?OpenDocument

    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:

    1. Form Design Element defined in the Form Formula section of the viewname View Design Element.
    2. Form Design Element defined in the Form NotesItem of the rendered NotesDocument.
    3. The Default Form Design Element for the target NotesDabase.

  • Type: Create

    ?CreateDocument
    Usage: http://server/database/formname?CreateDocument

    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.

  • Type: Read

    ?EditDocument
    Usage: http://server/database/viewname/notesdocument?EditDocument

    This Domino URL Command does two things:

    1. Verifies your access to render the defined NotesDocument in Edit Mode.
    2. Renders the defined NotesDocument in Edit Mode via the same applied Form Design Element Logic as the ?OpenDocument Domino 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.

  • Type: Update

    ?SaveDocument
    Usage: http://server/database/viewname/notesdocument?SaveDocument

    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)

  • Type: Delete

    ?DeleteDocument
    Usage: http://server/database/viewname/notesdocument?DeleteDocument

    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!


About the author: Chris Toohey

Thought Leadership, Web & Mobile Application Development, Solutions Integration, Technical Writing & Mentoring

A published developer and webmaster of dominoGuru.com, Chris Toohey specializes in platform application development, solutions integration, and evangelism of platform capabilities and best practices.



More from dominoGuru.com


dominoGuru.com is powered by IBM Notes Domino XPages & hosted by Prominic.NET

Contact Us

Use our Contact / Feedback form or one of these email addresses:

Creative Commons License

Except where otherwise noted, dominoGuru.com by Chris Toohey is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.