wissel.net

Usability - Productivity - Business - The web - Singapore & Twins

By Date: June 2010

Running a report on all Sametime Buddy Lists


Someone hight enough in your food chain wants to know how many users are in the Sametime buddy lists of your users. To my best knowledge that number isn't stored anywhere. So what to do? The buddy list is a piece of XML that gets stored in then vpuserinfo.nsf on your Sametime server. There is a view "Storage" with one document per user. The buddy list is stored in an item with the name 8193. Latest here you start smelling rat. A standard Notes form doesn't allow an item to have a "numeric looking" name. Inspecting the item you will find the data type stated as "Arbitrary Data". This is a great testimony to Domino's flexibility but unfortunately neither the LotusScript nor Java API allows us to process this item type. So the back door is closed, let's try the front door. The Sametime API allows to retrieve the buddy list. To save myself the hassle to program all this I just use a free tool from Epilio to extract the buddy list as XML (Sametime without Epilio is like Sushi without Wasabi - something is missing). To get all my buddy lists I wrote a small agent that creates 2 files: one cmd file that will call the Epilio tool for every user and one XML file that allows to associate the file name to the user name. (The code is a hack, don't expect error handling).
Once you run the CMD file you end up with a directory full of BudyList[a-number].xml files. To combine them and produce a report you use java -jar BuddyListReport.jar. You need a command combine|report, the directory (with an ending / ) and the name of the report file. Best is to have all in the same directory together. "combine" will combine the files and run the report "report" will only run the report (e.g. after you created a new stylesheet with a different layout or to report on different things). So a sample command could look like
java -jar BuddyListReport.jar combine C:\export\ report.xslt. The Java code has no dependency on any Domino or Sametime classes. All you need to get started can be downloaded including the source code.
As usual YMMV.
Update: I stand corrected (thx Carl): You can get access to custom data using byteArray = notesDocument.GetItemValueCustomDataBytes( itemName$ , dataTypeNam$). It's in the help. Introduced in R8.5 Never looked at it before.

Posted by on 30 June 2010 | Comments (2) | categories: Sametime

The AppStore wars


AppStores are the hot kids on the block. Everybody has one selling personal applications. Would that fly with Lotus Notes that is rather perceived as an enterprise application (is it?). Let's hear what the robots have to say:

Definitely someone needs to wash their mouth for using foul language.

UPDATE: NO NO NO. I did not create this spot.

Posted by on 29 June 2010 | Comments (9) | categories: IBM Notes Lotus Notes

Taming the jumpy categorized Views in XPages


I am not a fan of categorized views in web applications and have suggested alternative uses before. However beautiy is in the eye of the beholder, so categorized views are used. When a category is rendered it sits on its own tablerow (tr) in a tabletag (td) that has a colspan attribute. This effectively disables the column width settings for your view until you expand the category to show a full row of data resulting in some "screen jumping". While that won't sink the Titanic it is a little odd. Short of rolling your own rendering using a repeat control, there is a fix consisting of 2 JavaScript functions (one for the server, one for the client and a little addition in the source code panel. This works in all categorized views. However when you have a column with a column total rendering might be different since XPages doesn't render the colspan attribute then. Lets get started. Open your source pane and locate the view panel and the xp:this.facets. Here you insert a scriptBlock like this:
  1. {xp:this.facets}
  2.     {xp:pager partialRefresh="true" layout="Previous Group Next"
  3.     xp:key="headerPager" id="pager1"}
  4.     {/xp:pager}
  5.       {xp:scriptBlock xp:key="south" id="scriptBlock1"}
  6.     {xp:this.value} {![CDATA[#{javascript:return getClientJSforTableLayout("viewPanel1");} ] ] } {/xp:this.value}
  7.       {/xp:scriptBlock}
  8. {/xp:this.facets}
(Replace { } with < and > except inside the CDATA section). Then you add 2 JavaScript libraries to your XPage: CatViewPatches.js and TableSupportFunctions.jss. They will fix the column width. One caveat: you have to specify the width for all columns otherwise the unspecified columns get 100/{number-of-columns}% width assigned.

Read more

Posted by on 29 June 2010 | Comments (6) | categories: XPages

Learning Java


Java is the workhorse of corporate applications. No longer considered sexy but battle hardened and mature. For a Notes developer there are a number of reasons why some Java knowledge is essential: LotusScript doesn't allow network access (and "cheating with COM objects" doesn't count), doesn't provide threads or, most important, access to a rich eco system of ready baked libraries. You want to create some fancy components for your Notes client or a sharable extension library for XPages, Java it is. But how to get started? There are a number of resources that give you easy access: Once you get to terms with the fact that Java is case sensitive your first program shouldn't be far off. Still don't know how to start? Copy the lines below:
  1. package myfirst ;
  2.  
  3. public class HelloWorld {
  4.  
  5.     public static void main ( String [ ] args ) {
  6.        
  7.         System. out. println ( "Hello World" ) ;
  8.  
  9.     }
  10.  
  11. }
  12.  

Posted by on 28 June 2010 | Comments (5) | categories: Show-N-Tell Thursday

DIA an OpenSource alternative to Visio


IT people like to draw diagrams. The usual weapon of choice is Microsoft Visio. When on Mac or Linux, that's not an option. A cross platform (and OpenSource alternative is DIA. It runs on Windows, Linux and (thanks to the Darwin Ports Project) on Mac OS/X. It is by far not as powerful as Visio and doesn't produce shiny business graphics like SmartDraw (which I use for a lot of the blog illustrations here), but it clearly qualifies as "good enough to get the task done". One sour point in the past was the lack of nice looking objects for network diagrams. Now Hagen notifies us of the Gnome DIA Icons project.

They look good to me.

Posted by on 28 June 2010 | Comments (2) | categories: Software

Partial Page Rendering in XPages


More goodness coming along in XPages 8.5.2 (Disclaimer: it is still Beta ...) An XPage is a collection, or to be precise, a tree of controls with an xp:view tag as root control. The xp:view tag translates into a instance of the UIViewRootEx2 class. In theory you could subclass this but then you stray far away from the path of IBM support. In some case (think Ajax updates) it would be nice if you could request the render result of just one control (and all its children of course). In 852 this is possible using the ?$$axtarget= directive. It takes the client id as parameter and requires a keyword (you can use to identify the action) between page name and directive. So your URL could look like this:
http(s)://[yourserver]/[application.nsf]/[Yourpage.xsp]/[SomeactionName]?$$axtarget=[ClientIDofTheControl]
The control doesn't need to check for the value of [SomeactionName], it is up to you if you want to use that. A sample function giving you the url for a given command and control could look like this (you want to add error handling for production use):
  1. function getSpecialAction (actionName , componentName ) {
  2.     var toRenderPartial = getComponent (componentName ) ;
  3.     return 'myPage.xsp/' +actionName + '?$$axtarget=' +toRenderPartial. getClientId (facesContext ) ;
  4. }
As usual YMMV

Posted by on 25 June 2010 | Comments (6) | categories: XPages

There's a storm coming, Harry


Thanks to an article in the OMG Ubuntu blog I'm using the Real-time Sunlight Wallpaper. It updates my screen background every 30 minutes with a current satellite picture. Casually glancing at the background I saw this (around 1500GMT):
Is that a hurricane
Hagrid would say " There's a storm coming, Harry" and if I'm not very wrong in my geography that one is heading toward Hawaii.

Posted by on 25 June 2010 | Comments (1) | categories: After hours Linux

Attachment URLs in XPages


In classic Domino applications directly addressing attachments is well known and simple. Your URL has the format:
http(s)://[yourserver]/[application.nsf]/[viewname|0]/[UNID| ViewKey]/$File/[AttachmentName]?Open
While this will continue to work on the Domino server for the forseeable future you want to learn about the XPages syntax. The very obvious reason: the classic Domino URL doesn't work in the Notes client (XPiNC) and you want to make your applications work cross-platform don't you? Also we don't know what additional options handling attachments via XPages might bring in the future. the syntax is a litte more complex.:
http(s)://[yourserver]/[application.nsf] /xsp/.ibmmodres/domino/OpenAttachment/ [application.nsf]/[UNID|/$File/[AttachmentName]?Open
A few remarks:
  • The URL contains the application location twice. From my tests it looks like the /__[ReplicaID].nsf/ doesn't work for here. I haven't tested what happens when you specify 2 different applications in the front and the back
  • Since there is no view involved in the URL addressing attachments using an attachment key won't work. You have to use the UNID. This requires extra care when you build applications where the attachment URL is supposed to be shared (like send in a chat or an eMail). Deleting a document and recreating with an updated attachment will alter the URL. So ou want to cater for that case with a specific XPage rather than a raw URL.
  • When you attachment is stored inside a RT field (e.g. using the upload control where you target a field) you can replace "/$File/" with the field name e.g. "/Body/"
To make my life easier I use 2 functions so I get an attachment URL with a single call:

Read more

Posted by on 24 June 2010 | Comments (1a) | categories: XPages

Virtues of Document Databases


Lotus Notes is a document oriented database: A document oriented database stores information as documents of related data. All of the data within a document is self contained, and does not rely on data in other documents within the database. This can be quite a shift if you???re used to working with a relational database, where data is broken up in to multiple rows existing in multiple tables, limiting (or eliminating) the duplication of data. Although radically different, the document oriented approach is a very good fit for many applications. For some applications, data integrity is not the primary concern. Such applications can work just fine without the restrictions provided by a relational database, which were designed to preserve data integrity. Instead, giving up these restrictions lets document oriented databases provide functionality that is difficult, if not impossible to provide with a relational database. For example, it is trivial to setup a cluster of document oriented databases, making it easier to deal with certain scalability and fault tolerance issues.
Lotus Notes is not the only one. There is the "son of Notes" - CouchDB (I'm looking only at the database part, not programmability etc.) and others. The description above is shamelessly lifted from a CouchDB article.

Posted by on 23 June 2010 | Comments (1) | categories: Show-N-Tell Thursday

XPages training coming up - in ANZ


Dates and locations updated!:
The release of Domino 8.5.2 draws closer and I'm happy to announce more training events (hosted by your's truly):
  1. Beginners XPages: 10 Aug 2010, Auckland, New Zealand
  2. Advanced XPages: 11 Aug 2010, Auckland, New Zealand
  3. Beginners XPages: 12 Aug 2010, Wellington, New Zealand
  4. Advanced XPages: 13 Aug 2010, Wellington, New Zealand
  5. Beginners XPages: 17 Aug 2010, Sydney, Australia
  6. Advanced XPages: 18 Aug 2010, Sydney, Australia
  7. Beginners XPages: 19 Aug 2010, Melbourne, Australia
  8. XPages for the Brisbane Lotus User Group: 20 Aug 2010, Brisbane, Australia

Posted by on 22 June 2010 | Comments (2) | categories: XPages

Caveat when upgrading to Notes 8.5.2 CD5


Little beta oddity. When installing Notes 8.5.2 CodeDrop5 on a blank machine it works like a charm. Installing it over an existing Linux or Mac installation worked well too. On Windows using a full client (including Admin and Designer) I came across an odd behavior (It is beta after all). Notes would start into the "Loading please wait" splash screen and go into an endless loop. I tried a clean reinstall only retaining desktop8.dsk, names.nsf and notes.ini (having moved other NSF out of the way for the time being). The loop wouldn't go away. Turns out the culprit was something in the notes.ini. When stripping it down to a minimum (plus some convenience entries) Notes started really fast - faster than any previous 8.x version. I don't know if the problem also occurs with the standalone standard client. This is the notes.ini that I used:
[Notes]
KitType=<<your existing value>>
Directory=<<your existing value>>
InstallType=<<your existing value>>
NotesProgram=<<your existing value>>
Location=<<your existing value>>
KeyFileName=<<your existing value>>
KeyFileName_Owner=<<your existing value>>
MailServer=<<your existing value>>

As usual YMMV

Posted by on 21 June 2010 | Comments (2) | categories: Show-N-Tell Thursday

Singapore's Citizen Inbox


On June 15, 2010 the Straits Times published an article cheekily titled 'G' mail for all govt e-mail. From the article:

" SINGAPORE residents will each get a personal online mailbox in two years' time to receive their mail from the Government and public agencies.

Mail such as tax statements, reminders to renew TV licences and bills for service and conservancy charges will be sent to this Internet mailbox.
"

I think that is a terrific idea for citizen services and a good example for clever marketing (I'll explain why). In the comments people lambast about stealing of identity, not-another-mailbox and hacking and viruses. I think they all get it wrong. Reading the article a little further we learn: " People can log into the mailbox using their SingPass ID as well as register online to get e-mail and SMS alerts for new mail.". So what exactly is happening here? My take:
  • Somebody did some serious thinking how to bring Citizen service to the next level. I like the idea and I hope the implementation is as bold as the idea itself. The OneInbox is the place where all Government - Citizen interaction takes place. Government interaction requires forms, so a classical eMail won't do. Government interaction is confidential so SMTP, POP etc. won't do. Regular users are overwhelmed when it comes to eMail security as encryption and signatures. The typical approach would be to build a G2C portal and let users interact with it. But "Portal and interactions" sounds complicated and scary to non technical people. So the brains behind the initiative call that Portal an Inbox. Everybody understands Inbox.
  • It won't be an eMail system - the sentence "register to get eMail and SMS alerts" gives it away. Why on earth would I want an eMail alert for an incoming eMail. So forget about sending a message to Auntie Joanne (that's what the other gMail is for). And that is OK.
  • It uses a well established Single SignOn (SingPass). I expect that in a future iteration SingPass will either use Singapore's Smart-ID chip or some biometrics (which is already stored in our ID card records), so it will be better than the arbitrary name/password of other online systems. Also it efficiently allows to click from you Inbox to the specialized applications of the respective ministries.
  • The plan seems to allow that government applications deposit just a notification to the inbox or ever surface their entire UI there depending on the readiness of the respective application. This nicely allows for incremental improvement and deeper and deeper integration. In IBM we call such an approach SOA.
  • The absence of normal eMail functions is a big security plus. No Viagra or body part size changing message can be used as an attack vector into that inbox. It is strictly public business
Of course questions need to be answered: Is SingPass secure enough, is privacy guaranteed (we don't have privacy laws here, so that actually might not be a topic) and is the user experience well balanced? For my part: I'm happy to gain a single stop for my government dealings.

Read more

Posted by on 18 June 2010 | Comments (0) | categories: Business Singapore

Wer den Schaden hat spottet jeder Beschreibung


The biggest man made environmental catastrophy in the US brings out irony even in US based companies (I suspect they have foreign talent in their ranks)
We're bringing oil to American shores.
We're bringing oil to American shores.

While we are on it, how do you like this tag line: " Have a blast" (would apply to them too)

Posted by on 04 June 2010 | Comments (0) | categories: After hours