Best language for Enhanced UI in Notes Client?

I need some User Interface functionality in a Notes Client application that is not possible strictly within Notes. So I’m considering to embed some kind of applet into a Notes Form.

I’m looking for recommendations for the best way to do this:

Java (swing? or SWT?)

Visual Basic?

what other options?

Thanks much!

Doug

Subject: What exactly are you trying to accomplish?

Subject: RE: What exactly are you trying to accomplish?

Thanks for your reply. It is a health care protocols system to help nurses make assessments through a controlled set of protocols, and to document this process for legal reasons. It is embedded in a health hot-line call center Lotus Notes application. We are currently using an expert system for this and need to port off of it because it doesn’t meet our needs, and the protocols maintenance in that system is untenable and buggy.

So basically, the nurses need to be able to tab through quickly, have a bunch of hot keys defined, and have questions/assessments pop up in order of urgency and relevancy. The notes client UI’s functionality is too limited to handle it. Results need to be gathered and transfered back to an existing newly created Notes document. Also, data from the document needs to be passed to the applet.

The protocols rules development and maintenance system will be in a notes app.

Thanks,

Doug

Subject: RE: What exactly are you trying to accomplish?

Thanks for your reply. It is a health care protocols system to help nurses make assessments through a controlled set of protocols, and to document this process for legal reasons. It is embedded in a health hot-line call center Lotus Notes application. We are currently using an expert system for this and need to port off of it because it doesn’t meet our needs, and the protocols maintenance in that system is untenable and buggy.

So basically, the nurses need to be able to tab through quickly, have a bunch of hot keys defined, and have questions/assessments pop up in order of urgency and relevancy. The notes client UI’s functionality is too limited to handle it. Results need to be gathered and transfered back to an existing newly created Notes document. Also, data from the document needs to be passed to the applet.

The protocols rules development and maintenance system will be in a notes app.

Thanks,

Doug

Subject: RE: What exactly are you trying to accomplish?

Why not look at an embedded flash application or a DHTML Web Interface?

Subject: RE: What exactly are you trying to accomplish?

I’m not familiar with flash development. I didn’t know flash could do that kind of stuff.

I suppose a browser window would be possible, but how difficult would it be to pass data from an open Notes UI Document to the web interface and back? The protocol applet window probably needs to load when the application is first opened, and stay open in it’s own window throughout the day. It needs to interact with an open Notes UI Document’s data.

Doug

Subject: RE: What exactly are you trying to accomplish?

Uh, no, it doesn’t. Domino (the web half of the equation), in this case, could and would be the entire interface. Accessing and moving data is not particularly difficult, especially given the content-type options in Domino 6.

Alternatively, you could build a dedicated front end application that accesses the domino database via COM. Throwing one together in Visual Basic (especially the .NET version) is a relatively painless process, and you can set up a lot of data-entry-style controls. This has the additional benefit of being more secure, since it (like the Notes client) requires not only the knowledge of a password but the possesion of an ID to access the application. Of course, that’s a Windows-only solution.

Subject: RE: What exactly are you trying to accomplish?

You may want to look into setting system-wide hooks (in VB) to capture the keystrokes and forward them to the notes ui via OLE. This probably isn’t the most elegant way of doing this but it definitely can be done.

Subject: RE: What exactly are you trying to accomplish?

What do the hotkeys do? Or, if the application were done on Notes, what would the hotkeys do (open a form, switch to a different tab on a table etc)?

Subject: RE: What exactly are you trying to accomplish?

Mostly it has to do with quickly navigating and answering the questions without having to rely on the mouse. Some questions require a popup entry field, while others are simple yes/no. Some are multiple choice. So when a specific Y/N question is selected, pressing “y” or “n” should answer it and navigate you to the next question (which is determined by logic, not a simple list). Some questions are automatically answered in advance by data passed. Tab or Enter key probably needs to be programatically defined also.

Thanks

Subject: RE: What exactly are you trying to accomplish?

I agree with Charles in the sense that I think you’re underestimating what you can do with the Notes client.

First, I think you want to stay away from dialogboxes. You’re right that they would be too limiting; don’t use them. Display your forms as full windows. My asumption here is that each question is described as a discrete form.

Next, I’m not aware of a way to capture individual keystrokes, but you can put a hidden combobox on your form, give it the default focus, and in its OnChange event you could put Lotusscript to respond to each keystroke. Suppose that the user opens a ‘question’ (actually a form) with a yes/no radio button on it. When the user opens your form and types ‘y’, your code runs:

with uidoc

call .fieldsettext(“yesnoradio”,.fieldgettext(“hiddencomboxbox”))

call .fieldsettext(“hiddencombobox”,“”)

end with

This technique will also work in R5, but you have to use JavaScript in the onChange to call click() on a hidden button. The button holds the Lotusscript, or formula or whatever. In R6 you must also check off “Run Exiting/onChange events when value changes” to trigger the onChange.

Assuming your radio button field has a value list of

yes|y

no|n

then when the user opens the form and types ‘y’, the radio button switches to “yes”. If the user types ‘q’ or ‘5’, the radio button goes to “”.

That’s a little crude, but it costs you nothing to find out if it works well enough for production. The problem is, if the focus moves away from the hidden combobox, the magic stops. Could you put all the multiple choice fields etc in a controlled-access section and deny the current user access? Or use the DOM events to blur back to the hidden combobox any time the user places the focus someplace else, or use the field’s onBlur event to put the focus right back on the field. There are probably several ways to deal with this problem.

Suppose that each question is decribed as a discrete form. So to answer one question the user is composing a document, and then that answer gets saved someplace (to a profile document perhaps, or to a hidden document) and then another document is composed in its place. The problem is, how do you know when it is time to close the current document (and save the user’s answer of course) and compose the next one. My first thought here is to refresh the document as part of that Lotusscript snippet above, and then in the PostRecalc event, determine whether the user has answered the question, and if so close the current document, figure out and form goes next and compose it.

An alternative might be to make every field on the form refresh-document-on-change, so as to trigger the PostRecalc whenever the user does anything. That might be a performance killer.

In all, a browser would probably be a better client choice. But the Notes client is vastly more capable than most people suppose, and it costs nothing to find out if it can do this job.

Another idea is, is there a word processor out there - MS Word for example - that can capture user’s keystrokes and do the other things. If so, you could use it as the front end - possibly embedding a document in each form - and use field exchange or VBA to get the user’s responses back into Notes.

Subject: RE: What exactly are you trying to accomplish?

Thanks for all your ideas. Especially thanks Thomas for the detailed description how I might implement some hotkey ideas.

I will play around with that some to see how far I can get. My experience has been that anything that seems mildly complex to implement in a Notes UI, can soon become untenable. And this already seems problematic. If I can get it done purely in Notes it will save time, but I don’t want to do it at the risk of making our users jobs harder.

Thanks again,

Douglas Findley

Subject: RE: What exactly are you trying to accomplish?

Thomas, that’s a great set of suggestions and fairly easy to implement. I had problems setting focus to hidden controls in a tabbed table back in 5.0.5 or so, and I gave up on that idea and never tested it any further. I’m sorry if it sounded like I was pushing Dialogboxes, I was merely pointing out that there were potentially other ways of looking at this problem. You illustrated that beautifully.

– Charles

Subject: RE: What exactly are you trying to accomplish?

I worked with a company in the mid-90’s to develop a similar application. It wasn’t Notes-based, we used Borland Delphi, but I know a lot of what you’re going through. How fondly I recall navigating the recursive joins in the Plan of Care table.

I would disagree and say that nearly everything you need can be done directly in Notes. Using the NotesUIWorkspace.DialogBox function you can present documents, save their contents, and then refer back to them in code.

Before you go too far down the embedded applet path be sure you look into the other features in Notes and make sure it won’t meet your needs.

If you want to ask me any questions about the development I did on a similar system feel free, my e-mail is in my profile.

– Charles

Subject: RE: What exactly are you trying to accomplish?

I would disagree and say that nearly everything you need can be done directly in Notes. Using the NotesUIWorkspace.DialogBox function you can present documents, save their contents, and then refer back to them in code.

I kind of agree with you, but what about reliable hot-key functionality / filed & button focus in dialog boxes? We’ve not come up with a decent Notes-only solution in this regard, and it sounds like the original poster needs something with minimal reliance on the mouse.

Subject: RE: What exactly are you trying to accomplish?

I know you can simulate ‘SendKey’ functionality via the Windows API - isn’t it also possible to trap function keys and assign them special functionality?

Tony

Subject: RE: What exactly are you trying to accomplish?

I’ve not tried it and Ben is much more of a guru than I am so I will defer to his much greater knowledge, but perhaps something in the onKeyDown / onKeyUp / onKeyPress events would do the trick. I can’t see any way to determine what keys were pressed from Javascript, but I’m definitely not a Javascript junkie. I know I did similar things in VB way back in 1995, so I would hope Notes could mimic the functionality by now.

Too bad you can’t put an & or _ before a tabbed table’s caption and make it show up as an accelerator. That would solve a lot of my problems.

– Charles