dominoGuru.com

Latest Updates

Loading... Please Wait!

Products & Applications

Showtime
My Blackberry Enterprise Server Push Utility for the Lotus Notes Client, allows you to create Jobs for individual Channel, Message, and Browser Content Pushes, as well as allows you to delete Pushed Channel Icons from defined recipient devices.

Time Tracker
The idea is simple. At the start of your day - upon completion of your first task - create an entry highlighting what you did and whether you feel it was an efficient or inefficient use of your time. Based on several requests, you can also select the priority, apply categories, or even align your time against a project.

For Lotus Notes Client v8.0 and above, you can use the Time Tracker Widget to make this process even easier!

Zephyr
My Configuration-based Rich Text Mail Merge and Emailing Utility, Zephyr allows you to create rich, data-driven emails to support automated workflow - all via Microsoft Word Mail Merge-like architecture. Dear <firstname> allows you to personalize each email message not only to the individual recipient, but also to the individual application workflow event!

xCopy
xCopy is a simple configurable xCopy client for the Lotus Notes client. By creating and defining xCopy Profiles, you can batch process your file backup or remote upload jobs. With the addition of the xCopy sidebar widget, you can easily kick-off these jobs, and modify both the xCopy Profiles and xCopy itself.

Community & Resources

Lotus Technical Information & Education Community

The Lotus Technical Information & Education community is comprised of IBM, business partner, and customer subject matter experts who use product wikis, published articles, white papers, community blogs and the latest in social media to build and share high quality technical content.

OpenNTF.org - Open Source Community for Lotus Notes Domino

OpenNTF is devoted to enabling groups of individuals all over the world to collaborate on IBM Lotus Notes/Domino applications and release them as open source.

developerWorks Lotus : Wikis

Share your deployment experiences and best practices in our wikis and help IBM to create scenarios for successful deployments. Contribute to the community by collaborating on shared content and leverage the shared knowledge from that community.

Lotus Notes Domino UI and Backend Development with an eye to the future!

02/09/2010 12:46:00 PM by Chris Toohey

So I was thinking... I was helping out a fellow Lotus Notes Domino developer (and dominoGuru.com reader) last night who wanted to create what I typically refer to as milestone updates of Parent/Child NotesDocuments. Simply put, when the Parent NotesDocument's Status was changed to from -- for example -- Status1 to Status2, all Children NotesDocuments would be updated. Of course, this is pretty simple once you get the concept down, but I'm brining this up as I believe the majority of us would use the following approach to address this need:

Sub Postsave(Source As Notesuidocument) Dim newstatus As String Select Case Join(source.Document.GetItemValue("status"), "") Case "Status1": newstatus = "subStatus1" Case "Status2": newstatus = "subStatus2" Case Else : newstatus = "subStatusDefault" End Select Call source.Document.Responses.StampAll("status", newstatus) End Sub

This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.

Sure, this gets the job done... but what happens when your customer wants to take this Lotus Notes Client Application to the web? What happens when they want to access the NotesDatabase via a Blackberry or another mobile device?

I've talked countless times about the absolute need for Lotus Notes and Domino Application Developers to adapt their development practices and future proof their code... and the first step is often understanding the difference between UI development and Backend NotesDocument development.

Application Logic is typically integrated with the NotesUIDocument either through UI intereaction or via Form Events like QuerySave or -- as shown above -- PostSave.

Lotus Notes Domino Application Development - App Logic in the UI

Again, while this is good enough for Lotus Notes Client Application Development, you can immediately see the need to re-write all Application Logic for Web Browser Client or Mobile Device Client access. And while you might think that's not a problem -- most web/mobile-enablement projects allot for such an activity -- this approach becomes a complete maintenance nightmare when 6 months later the project champion tells you the application logic needs to change.

So we need to work smarter up-front, during the application architecture phase of the build. Specifically, we need our applications to be as future-proof as possible and adaptive to the ever-changing business environment where our applications (and most importantly our users) live.

To do that, we simply move the App Logic away from the NotesUIDocument or Form and into the backend of the NotesDatabase.

Lotus Notes Domino Application Development - App Logic in the Backend

To apply this approach to our above example, let's revisit our PostSave Event.

Sub Postsave(Source As Notesuidocument) Call logic(source.Document) End Sub

This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.

That handles our NotesUIDocument/Form for the Lotus Notes Client, but what about the Web Browser or Mobile Device Clients?

I use a $$Return Computed For Display Text Field with the following Formula:

"[" + basehref + "logic?OpenAgent&DOCID=" + @Text(@DocumentUniqueID) + "]"

(basehref in the above example is another Computed For Display Text Field that evaluates the Web URL to the give NotesDatabase...)

As for the logic Agent Design Element:

Sub Initialize
Dim s As New NotesSession Dim db As NotesDatabase Dim a As NotesAgent Dim cdoc As NotesDocument Dim pdoc As NotesDocument Dim pdocid As String Dim qs As Variant Set db = s.CurrentDatabase Set a = s.CurrentAgent Set cdoc = s.DocumentContext
pdocid = cdoc.Query_String_Decoded(0)
If pdocid <> "" Then qs = Split(pdocid, "&DOCID=") pdocid = qs(1) Else MsgBox a.Name + |: Unable to process UniversalDocID from Report Form Elements $$Return| MsgBox a.Name + |: $$Return redirected to | + pdocid Print |[$DefaultView]| Exit Sub End If
Set pdoc = db.GetDocumentByUNID(pdocid) If pdoc Is Nothing Then MsgBox a.Name + |: Can't find a document where | + pdocid + | = UniversalDocID| Print |[$DefaultView]| Exit Sub End If
Call logic(pdoc)
End Sub

This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.

Your logic Function can now handle all workflow and business logic for your given NotesDocument, from updating Status fields to maintaining NotesDocument History tracking fields to creating milestone event-driven pushes to workflow notification utilities.

Simply store all of this application logic in your logic Function in a Script Library, and you can switch out User Interfaces for your applications at will!

... of course, you could always write a business logic controller engine that uses Project Champion-maintained NotesDocuments for it's configuration -- but that's getting into MVC, and we wouldn't want to do that now... would we?

 
Aecio F. NetoName:Aecio F. NetoWebsite:http://harvest.com.brComment

Agree with this approach and this is already the way I do things in Notes.

It is important to mention that triggering changes from one document into another requires a good control of who-does-what-when to avoid conflicts when saving changes via agents.

Other than that, well done, Guru.

Patrick KwintenName:Patrick KwintenWebsite:http://quintessens.wordpress.comComment

i like the code, sounds logic to me

Bernd HortName:Bernd HortWebsite:http://www.assono.de/blogComment

If you want to go the MVC way, here is our Lotusphere 2008 presentation with a possible way.

http://www.assono.de/blog/d6plinks/Lotusphere2008-OOP-in-LotusScript

RobShaverName:RobShaverWebsite:http://ShaverAssociates.netComment

I guess that's how I've always coded things. In fact you can have a single agent handle multiple forms and keep all your business logic in one agent.

I don't understand why you use the $$return field to call the agent instead of the WebQuerySave event. This makes the agent call visable in the code. The WebQuerySave keeps it private. Also using the $$return method lets the document values be saved before the agent gets a chance to validate them. (Can't trust client side validation because it's subject to hacking.)

But a good note to think about.


(not published)




Evaluate this Formula: @LowerCase(@Text("FOO"))