IBM Lotus Domino: Classic Web Application Development Techniques – Book Review

The folks at Packt Publishing are continuing to expand their shelf of IBM Lotus books.  Their latest addition – Classic Web Application Development Techniques by Richard G. Ellis.

Before I tell you how absolutely awesome this book is, I have to get something off my chest.  The word “Classic” in the title is the absolute key word here.  Mr. Ellis starts off the book by saying that everything here was written for and tested with Domino Designer 8.0.  Upon reading that sentence I just had to go back to the very first page to check the publication date: someone is playing a trick on me.  Alas, no tricks.  The book was indeed published in March of 2011.

The book also stays away, far away, from anything related to XPages and says so right off bat.  But it is about classic development after all.

Once you get over those two facts, the book is actually very good.

I was afraid that it would stick to the trivial topics of web enabling Domino applications and using framesets and tables to layout an application.   Of course, you can’t talk about web development without explaining the basics of including HTML in a Notes form.   And the book certainly does mention framesets and tables.  However, it quickly moves to more advanced techniques of using DIV tags and CSS to effectively build a modern-looking web application.  And for Notes developers who are not faint of heart, there are even sections devoted to advanced JavaScript and AJAX calls to boost performance.

If you are an advanced Domino developer building web applications every day, this book may not be for you.  But if you are a Notes developer who is making a transition to the web and want to know how to web enable your awesome Notes apps without looking like they were built by 5th-grader in 1999, get a copy of the book.  You’ll be hard pressed to find a better single source collection of Domino web development tricks.

Ability to work disconnected – does it matter so much?

One of the strengths of Lotus Notes that always gets brought up in any technology discussion is the Notes’ off-line abilities.  To date, nothing else truly matches the replication engine that’s been a core part of Notes for the past 20 years and the ability of Notes to provide full fidelity of applications in disconnected mode.  Many Notes proponents, when discussing pros and cons of Notes vs. other technologies, will beat their chests, “But, replication!  A couple clicks and we can work off-line!”

But how much does that truly matter today?

Other than being on an airplane and being too cheap to pay 5 bucks for Internet access, I can’t think of another situation where I find myself completely and totally disconnected.  Ubiquitous wireless networks, Verizon 4G air card, tethering through my Blackberry – I can always get online.  The Skynet is here.

If I don’t have the laptop with me, then my Kindle or Blackberry (or iPhone and iPad for many others) can get me online.  And even if I do have the laptop, rather than waiting for the fat client to load, I pop open a browser and go to my applications.

Web and mobile — that’s where the true power and the true differentiation lies.  How easy can take my application to the web and serve it up on my travelers’ iPads?

I’m waiting for the day when Notes proponents will beat their chests, “But, the iPad!  A couple clicks and my application can work on an iPad.”  Think that day will come?

Or are the off-line abilities still a big requirement in your organization?


How to send doclinks outside of Notes

A client of mine was in the process of migrating from Notes to Exchange (don’t ask, they really had no choice).  The migration was supposed to be pretty quick, so we didn’t bother with coexistence: just use SMTP to forward emails between systems.

They have a couple of applications, mainly a CRM system, in Lotus Notes, which send out email notifications with doclinks to documents in question.  When the email would show up in Outlook, instead of a doclink they saw plain text listing the database, the view and the document — no doclink.

I was ready to modify the app to start sending notes:// URLs instead of doclinks, but first decided to dig around in Router configuration settings.

Under the MIME – Conversion Options – Outbound tab I found a field labeled “Message content”.  It was set to “from Notes to Plain Text”.  I changed it to say “from Notes to Plain Text and HTML” (one of the available options) and, as if by miracle, Outlook users started seeing active clickable doclinks coming in from Notes.

In all our tests, the only mail platform that didn’t want to recognize clickable doclinks was Yahoo.  Otherwise — Exchange, Gmail, outside Exchange servers — everything was showing a hot doclink, which would take the user into Notes and to the right document.

A bit of Router magic saved me from changing code in an ugly app.


Advantages & best practices of local mail replicas

Many congratulations to Luis Guirigay for having his article on Advantages and Best Practices of Local Mail Replicas published in the Domino Wiki.  After many review cycles the article was finally added to the wiki.

If there’s anything you wanted to know about local mail replicas but were afraid to ask, Luis is the ultimate authority on the subject.  It’s great to see another article published by the PSC team.

Moving on up to the Exchange side

I took the plunge.  I finally did it.  I moved.

As some folks read and reacted with disbelief on Twitter, I switched my email platform from Notes to Exchange.

We, at PSC, have been running both systems in parallel for quite some while:  Exchange for the Microsoft team, Notes for the IBM/Lotus team.  And as a Mac user, I just wanted to use Mac Mail and iCal.

Sadly, Lotus continues to take the high road when it comes to allowing people to use clients other than Notes with its Domino servers.  And Exchange 2010 integrates rather nicely with Apple and its native Mac apps.  I’ve been tempted to make the switch for quite some while now.  End of the year, my calendar being pretty empty, seemed like the right time to do it.

I am rather impressed how simple and uneventful the move was.  I had to setup some general mail settings (signature, refresh frequency), configure appearance and configuration of my BlackBerry, that was about it.

I used IMAP to download email from Domino into Mac Mail.  That way I still have easy access to all my messages from Notes.  Mac Mail allows me to easily move things around between accounts as does iCal and Address, making populating my newly minted Exchange account a snap.

The biggest issue I had were my contacts.  For some odd reason, Mac Address would not import all contacts exported from Notes in a VCF file.  Out of 300-some contacts, it would only import 13 – 15.  I had to resort to the magic of Outlook 2011, which imported everything perfectly and synchronized with Mac Address.

If I think about it, I’ve never ever used anything other than Notes for email in a corporate environment.  We’ll see how this experiment (pardon, “move”) works out for me.  I yet might switch to Outlook 2011.

One thing I miss already is the ability to be prompted whether I want to save a copy of the message in my Sent folder.  Not happy about my Sent folder filling up with silly 1-line responses.  Anybody knows if Mac Mail can be configured to prompt?


XPages? Why?

Somebody asked today, “If you are using a Discussion database in your environment, have you converted it to the new XPages template?”. My answer, “Why?”.

In all of the excitement around XPages, amongst numerous blog posts one message seems to be missing. Why XPages? Why should I care? The I in this question is not the geeky technologist I who gets excited by the new technology and the <xp:this.resources> tags. The technology is very cool and it lets me do things I was never used to be able to do in Notes and in ways I could never use.The I in this case is a business person and an executive. Why should I care about the XPages? Why should I invest in my team learning and using XPages as opposed to any other technologies?

Adoption of XPages (just like of any other technology) in the business world will and should be driven by benefits and cost savings and not by cool tags.

Whether you’re staying with Notes or migrating to another platform, if you have an investment in Notes applications, XPages is for you and your team.

If you’re migrating away from Notes or moving to the cloud, chances are that you will no longer have the rich Notes client on many desktops. In an organization’s portfolio of Lotus Notes applications about 25% of applications can be categorized as Business Applications. Those make heavy use of custom workflow and security. They are very complex and could be very costly to rebuild using any other technology. These apps are the perfect candidates to be moved to the web using the XPages technology.

You will be able to move your apps to the web, remove dependency on the Notes client and provide users with a modern Web 2.0 UI.

If you are staying with Notes, then you’re upgrading the rich client and your users want modern web based applications but your development team is still using methods from 10 years ago, which all leads to same robust tired looking applications. With XPages you can kill several birds with one technology:

  • make your users happy with modern looking applications
  • make your developers happy by letting them write modern code
  • extend your apps to the web and mobile device with the same code base

In both cases, you will have a happy user community impressed by UI improvements your team was able to achieve. And generally, Happy users = Happy IT department. And nobody has to know how much money you saved by converting the apps to XPages vs. rebuilding them from scratch in some other technology.

Domino 64-bit — is it worth it?

At least when it comes to 8.5.1, is it worth all the trouble?  Everyone is clearly excited about performance improvements that the 64-bit version offers.  The native support of the 64-bit architecture is a big plus on its own, you must have that in order to be counted a modern piece of software.  Many kudos to the Lotus server team for making it happen.

But what about the other products and the other pieces of the server?

Not everything — native IBM and 3rd party — works with 64-bit.  For example, SameTime, still a 32-bit product, does not recognize that Domino is even installed, if trying to run on top of the 64-bit version.

The lack of ODBC support is a huge problem.  Luckily, it is soon to be solved by the 8.5.2 release.  As the Lotus team is fighting to revitalize Lotus Domino as a valid application development platform, shipping a product without the ODBC support was a mistake.  There should’ve been a big huge disclaimer at the beginning of the installation routine: if you use ODBC, don’t install this version.

I hope that the 8.5.2 release will address all these issues.

Domino server is crashing – SMSDOM panic

This happened just today.  Installed a brand new Domino 8.5.1 server 64 bit.  Installed the latest Symantec anti virus for Domino on top of it.  Ran a manual scan and crashed the whole server when completing the scan of a particular mail file.

The very reproducible crash would generate an SMSDOM Panic error with a rather generic error message of “Entry not found in index”.

When Google yielded no appropriate results, we called Symantec and they immediately pointed us to this technote.

Apparently, this is a well known problem with a simple fix.  Follow the steps in the technote to replace the nntask.exe and life, once again, is good.

How to use FCKEditor

To continue with my mini JavaScript-text-editor kick, I moved on to FCKEditor.

FCKEditor is another very popular JavaScript text editor.  (Since I first started playing with it, FCKEditor got reborn in its 3.0 version, now known as CKEditor.  Not sure why the ‘F’ was dropped. Perhaps, as the result of too many off-color jokes.)

Much like TinyMCE, CKEditor boasts to be a lightweight editor that works in any browser.  Its objective is to deliver desktop-like text editing functionality in a browser.  It is fully customizable and does a great job processing content pasted from Word.  The last part is a big selling point, allowing people to create content in Word first, using all the authoring and revision tools, and then paste the final version into the browser.

To add CKEditor to your Domino application is rather very simple.

  1. First of all, go here and download the version of your choosing.
  2. Extract the downloaded zip file and copy its contents to the html directory of your Domino server.  It might be something like d:\lotus\domino\data\domino\html.  The default directory name will be ckeditor.  You can rename it, if you like, just remember what it is as you will need to reference it in the initialization code of your form.
  3. Next, build your form.  Create at least 1 RichText field.  Use the Property HTML tab to give it an ID.
  4. Enclose the field inside of a DIV tag.  Using passthru HTML open the DIV tag before on the line before the field and close it on the line after.
  5. Now, you’re ready to add CKEditor to your form.  In the HTML Head section of the form, add this 1 line of code:
    “<script type=\”text/javascript\” src=\”/fckeditor/fckeditor.js\”></script>”
    Make sure that the path to you editor matches your directory structure, in case you renamed it for whatever reason.
  6. Add the function to load the editor, to the OnLoad event of your form.
    if ( == -1 )
    var oFCKeditor = new FCKeditor( ‘MyTextarea’ ) ;
    oFCKeditor.BasePath = “/FCKeditor/” ;
    oFCKeditor.ReplaceTextarea() ;

    Be sure to use the ID of the RichText field you want the editor to attach to on the declaration line.  In my case, my field was called MyTextarea.

  7. Add a Save button somewhere and you’re all set.

Happy text editing.


How to use TinyMCE

One of the more frustrating thing about a web application is that you can never truly duplicate rich text formatting capabilities of a desktop client.  And when you’re web enabling a Lotus Notes application, the difference becomes even more obvious.  Luckily, there are various very light JavaScript text editors, which offer more functionality than the standard out-of-the-box Domino text editor.  One of those editors is a very popular TinyMCE.

TinyMCE is used by many different web content managers, including Django, Drupal, Joomla and this very site — WordPress.  And you can use it inside of your Domino applications.  (I know that some folks been doing this for years, but since I’ve never used a 3-rd party editor in my applications before, so this is new to me.)

The nice thing about TinyMCE is that it is a lightweight WISYWIG editor, which is platform independent.  It is easy to integrate into any application with only few lines of  code.  And it runs under pretty much any browser.

  1. So, first of all, go here and download the latest version of TinyMCE.  You can even download various language packs, if you need a different language version of the editor.
  2. Extract the downloaded zip file and copy its contents to the html directory of your Domino server.  It might be something like d:\lotus\domino\data\domino\html.  The default directory name will be tinymce.  You can rename it, if you like, just remember what it is as you will need to reference it in the initialization code of your form.
  3. Next, build your form.  The easiest way to deploy a TinyMCE editor is to have hook into any text area on your form.  So create at least 1 RichText field.  If you want to control its appearance, you can use the style field on the HTML property tab.
    Body Field
  4. Now, you’re ready to add TinyMCE to your form.  In the HTML Head section of the form, add this 1 line of code:
    “<script type=\”text/javascript\” src=\”/tinymce/jscripts/tiny_mce/tiny_mce.js\”></script>”
    Make sure that the path to you editor matches your directory structure, in case you renamed it for whatever reason.
  5. Add the function to initialize the editor to the JS Header section of the form.  The function below loads the TinyMCE editor with all available options and buttons.  The beauty of this editor is that you can truly control what options and abilities you will give to your users.  Things like a spell checker, for example, are a must.  But you may not want to allow your users to create tables.
  6. tinyMCE.init({

    mode : “textareas”,

    theme : “advanced”,

    plugins : “safari, pagebreak, style, layer, table, save, advhr, advimage, advlink, emotions, iespell, inlinepopups, insertdatetime, preview, media, searchreplace, print, contextmenu, paste, directionality, fullscreen, noneditable, visualchars, nonbreaking, template, wordcount”,

    // Theme options

    theme_advanced_buttons1 : “save, newdocument, |, bold, italic, underline, strikethrough, |, justifyleft, justifycenter, justifyright, justifyfull, styleselect,formatselect,fontselect,fontsizeselect”,

    theme_advanced_buttons2 : “cut, copy, paste, pastetext, pasteword, |, search, replace, |, bullist, numlist, |, outdent, indent, blockquote, |, undo, redo, |, link, unlink, anchor, image, cleanup, help, code, |, insertdate, inserttime, preview, |, forecolor, backcolor”,

    theme_advanced_buttons3 : “tablecontrols, |, hr, removeformat, visualaid, |, sub,sup, |, charmap, emotions, iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen”,

    theme_advanced_buttons4 : “insertlayer, moveforward, movebackward, absolute, |, styleprops, |, cite, abbr, acronym, del, ins,attribs,|,visualchars,nonbreaking,template,pagebreak”,

    theme_advanced_toolbar_location : “top”,

    theme_advanced_toolbar_align : “left”,

    theme_advanced_statusbar_location : “bottom”,

    theme_advanced_resizing : true

    // content_css : “styles/editor.css”


  7. Lastly, include the TinyMCE save function in your Submit code.
    tinyMCE.triggerSave(false, false);
  8. You’re pretty much done.

Now, keep in mind, that the text coming out of TinyMCE will be all HTML formatted.  This is not something that will look good opened in the Notes client, so, primarily, this works well for web only applications.  For applications used both in the browser and in the client, you may want to do some MIME to RichText conversion.