June 28, 2004

  • Lotus Notes/Domino 6

    Writing Lotus Notes/Domino 6 applications is kinda frustrating. The whole development platform is supposed to simplify the development of corporate management applications, but I don't think so. After playing/working with it for a month now, all I find are stupidities, bad design, and bugs that hinder productivity.

    Counteractive Designs

    Lotus Notes/Domino applications are heavily database related. However, Lotus Notes/Domino uses a document-driven database instead of a relational model. There is no concept of tables, projections, etc as in the relational model. Forms and documents are the main components of a database in Lotus Notes/Domino. Documents are like records of data in Lotus Notes/Domino and forms are for reading and editing the documents.

    At first, this design may seem to make the Lotus Notes/Domino database more flexible than relational ones as records of data are no longer tightly tied in tables. It is now possible to view records with fields (variables) of the same name but different datatype, all under the same page (called a "view" in Lotus Notes/Domino; do not confuse this "view" with the one in the relational model). However, this flexibility is made close to useless due to the constraints in performing searches in Lotus Notes/Domino:

    1. Datatypes in Lotus Notes/Domino lack flexibility. For example, pull-down menus (like the <select> element in HTML) are always considered to be text, even when all the choices are numeric strings. So when you try to perform a relative comparison (the kind like <=, >=, etc), the Notes server tells you that a relative operation is not allowed on a field of text type.
    2. There is no way to dynamically typecast fields when doing searches.

    The above two constraints make searches kill the flexibility that Notes/Domino's database model is supposed to offer the user. In order to overcome these constraints, one has to create two fields - one of type number, another of type combobox - then use JavaScript in the combobox's onclick() event to change the value of the number field. This is more like a hack and makes the layout look more messy - as though the inevitable mixing of HTML code does not make the workspace messy enough - for the developer (although the number field can be hidden from the sight of the end user using HTML). This is only the tip of an iceberg. I will post more about Lotus Notes stupidities in future posts.

    BTW, until Timmy and Chris start transfering our domain name to the hosting account, I'm gonna keep blogging here and mirror at www.frustratedcoders.net/k. I don't remember the account number to the domain name.

    - SwordAngel