Mar 20

Entwicklercamp 2014

Das Entwicklercamp 2014 ging gestern zu Ende. Bei den Camps 2012 und 2013 konnte ich nicht dabei sein, umso mehr hat es mich gefreut, dieses Jahr wieder hingehen zu können.

Auch dieses Mal war ich Referent und habe zwei Sessions zum Thema “Native Apps, die mit Notes synchronisieren” gehalten. Teilnehmer der Sessions können das Material hier herunterladen.

Kurzgefasst habe ich in meinen Sessions die Möglichkeit aufgezeigt, mit Appcelerator Titanium native Apps für verschiedene Plattformen (iOS, Android…) relativ einfach zu entwickeln, und dann Daten aus Notes in die App und zurück zu synchronisieren. Letztendlich also das, was das von mir entwickelte Framework DominoToGo fix und fertig liefert.

Während ich in der ersten Sessions Grundlagen gelegt habe, ging es in der zweiten Session dann zu Sache: dort habe ich echten, lauffähigen Code gezeigt sowohl für die Domino Seite (via XPages) als auch für die Titanium Seite. In drei Beispielen habe ich gezeigt, wie man

  • den Inhalt einer Ansicht lesen, in der App speichern, verarbeiten und anzeigen
  • ein Dokument als XML Repräsentation in die App synchronisieren, speichern und verwenden
  • ein Dokument als HTML Repräsentation in die App synchronisieren, speichern und anzeigen

kann. Beide Sessions waren sehr gut besucht und ich habe viele sehr positive Bewertungen bekommen – danke dafür!

Ich bin ziemlich sicher, dass ich nächstes Jahr auch wieder zum Camp komme. Und jedem, der eine Konferenz mit gehaltvollen Vorträgen zu den Themen Notes, Domino, XPages, JavaScript etc. sucht, kann ich das Entwicklercamp sehr empfehlen.


Mar 19

Sharepoint 2013 dies in 2015? IBM Notes, Domino and XPages are here to stay.

Today at Entwicklercamp 2014 Rudi Knegt just told us about a rumor that Microsoft Sharepoint will cease to exist next year. Or to be exact: Service Pack Support ends in 2015 and Mainstream Support ends in 2018. If you are willing to spend more money, you could extend support until 2023. If you look here you can see that standard support for Sharepoint 2013 ends in 2015.

Some research reveals that MS wants customers to move to the Office365 cloud offerings. It seems that there will be one last Sharepoint release in 2015, so Sharepoint does not die entirely in 2015, but some years later.

Compare Microsoft’s behaviour with IBM Notes and Domino: Notes and Domino is in the market since 1985, that’s nearly for 30 years. And since then, it evolves year by year, embracing new technologies and delivering new functionality while keeping features like fast setup, easy administration and reliability.

As of today IBM Notes and Domino are at version 9.0.1, and if you want, you can still open Notes applications from version 1.1 (just tested yesterday at Entwicklercamp!). At the same time, you can create top modern web and mobile applications with XPages. 

And: IBM Notes and Domino is here to stay. It’s a core part of the IBM software stack and IBM developers are working on new versions every day. IBM likes you to go to the cloud, too. But you don’t need to, you can always use on premise versions of the software.

As further read, have a look at this post from SharePoint Switzerland: DÉJÀ VUE – MICROSOFT REPEATING IBM’S MISTAKES.

So, any investment in IBM Notes and Domino applications is safe. Can you say the same for your Sharepoint applications? 

Mar 15

Frank Rieger zum Thema “Cloud”

“Ihre Daten sind woanders und Sie wissen nicht, wo.
Davon halte ich prinzipiell nichts.”

Frank Rieger

Mar 06

New in DominoToGo: convert Notes documents to HTML and download them to a mobile app

Imagine have a Notes application with several kind of documents, using different forms and/or subforms. Now you want a mobile App that simply display these documents and allow some workflow actions like “approve” or “decline”.

All right, no problem with XPages and a mobile Web app. But what if the users need the app to work offline, too? 

You know you can create cool native Apps that work independent of the network using Appcelerator Titanium and DominoToGo, don’t you?

And now the most recent version of DominoToGo provides a simple method to create and download an HTML version of Notes documents in order to display them in the app, even when you’re offline.

Have a look at this code:

var db = new NotesDatabase('http://testserver/dominotogo/contacts.nsf', 'contacts');
db.ynReadDocsHTML("peopleByLocation", callback, false, false, "", {key: "Hamburg"});

This simple code converts all documents having the “Hamburg” category in the view “peopleByLocation” to HTML, download this HTML and store it local in the app so that you can display it in a simple Titanium Web Browser control.

In my (german) app this looks like this:


The beauty is that my app is able to display any kind of Notes document. If some form or subform in Notes changes, I don’t need to change my app at all – it simply downloads the updated HTML version of the Notes document and displays it. And it works always, independent of the network. 




Mar 06

Create mobile Notes apps that impress your boss

One Domino To Go customer just sent these kind words:

” I think what you have done with Domino To Go is amazing. My boss thinks that what I’m doing with my mobile app is fantastic and I could not be doing it without help from Domino To Go. The Alloy framework in Titanium Studio helps the learning curve for me coming from XPages. They are very similar. I think you have built a great tool with Domino To Go and I’m excited to see where you take it. I think a lot of Notes shops could benefit from it.”


Wow. It really feels great to hear that my stuff enabled customers to create cool stuff and impress the boss or their customers.


Feb 13

Thanks IBM for agent.runWithDocumentContext() in XPages – which I use in DominoToGo mobile solutions

One project I’m currently working on is a mobile version of a Notes based workflow application. The mobile app should enable users to approve or decline workflow documents like vacation requests.

Again, offline availability is important, so a web app is out of the question. Therefore I’m using my winning combination of Appcelerator Titanium and DominoToGo.

Now the challenge is that there is a lot of LotusScript code which handles all the workflow logic in the Notes application. No one wants to re-invent the wheel and implement all the logic again inside the mobile App. There has to be an easier solution.

And for sure, there is: DominoToGo provides a Server Side JavaScript library on the Domino side which allows to hook into several DominoToGo events.

One event is named “custom_write(doc)”. This event allows me to do something with the Notes document that has been uploaded from the mobile app to Domino, for example I can change fields or send a mail.

How does that help with re-using existing LotusScript code for workflow logic? Quite simple: I extracted the LotusScript code (which was stored in a Notes form) to a script library. Then I wrote a simple agent like this:

Use "workflow"

Sub Initialize
	On Error GoTo errorHandler

	Dim session As New NotesSession
	Dim doc As NotesDocument
	Dim action As String

	Set doc = session.Documentcontext
	action = doc.getItemValue("$dtgWorkflowAction")(0)

	Call WflAktion(action, doc)

	Exit Sub
	Print "mobileWorkflowAction init "+CStr(Erl)+" "+Error$
	Resume errorExit
End Sub

This agent simply calls workflow logic which is stored in the “workflow” script library and runs an action which is identified by the content of the $dtgWorkflowAction field. This field is set in the mobile app by the click on a button.

Now the only thing I needed to do was to start the agent right after the mobile app uploaded Notes document data to Domino. That’s a piece of cake with DominoToGo’s custom_write event:

function custom_write(doc:NotesDocument) {
	var agent:NotesAgent = database.getAgent("mobileWorkflowAction");
	return true;

Here is the chain of events:

  1. A user in the mobile app clicks on a button “approve” or “decline”.
  2. The button sets the $dtgWorkflowAction field in the workflow document on the mobile device to either “approve” or “decline” and saves the document on the mobile device.
  3. DominoToGo on the mobile device uploads the change in the $dtgWorkflowAction field from the mobile device to Domino.
  4. DominoToGo on Domino processes the changed field and starts the ServerSide JavaScript custom_write function after that.
  5. The Server Side JavaScript custom_write function gets the changed document as parameter and starts the LotusScript agent “mobileWorkflowAction” with the document as parameter.
  6. The LotusScript agent imports the LotusScript library where all the workflow logic is stored and calls a LotusScript function to start the workflow action.

All of that is only possible because IBM gave us the agent.runWithDocumentContext() method in XPages / ServerSide JavaScript. So a big “thank you!” goes to the engineers that implemented this feature!


Feb 07

A complex mobile App: syncing 8 views, taking photos, uploading to Domino etc

I know, you want to see screenshots or a video. Since the app is not finished, I cannot make a video yet. But I can tell you about the project:

A customer of mine does technical service for medical organizations like hospitals. To do that service, technical personnel needs to walk through a building and check equipment like a heartbeat monitor, blood pressure meter and so on.

Each medical organization has a lot of medical devices. To manage all of them, my customer has a sophisticated Notes application which spans multiple NSFs and contains date like:

  • customer basic data
  • organizational data for a customer (departments, staff etc)
  • general device data (vendor, type numbers, description, photos etc)
  • customer specific device data (kind of device, type number, serial number, photos etc.)

So far, the technical personnel needed to take a laptop with Notes with them in order to do the data maintenance when they are at a customer site. Ten years before that would have been cool and great, but today it can be a lot easier and faster using a tablet.

For that, my customer wants a mobile App with which the technical personnel can do all the work with a tablet in their hand, including taking photos of a medical device.

A web based mobile App was not an option, because inside the buildings there is often no cellular network, or it’s bad or using a cellular is even not allowed to prevent troubling the medical devices.

So offline capability was a must-have, and that meant developing a native App. My customer didn’t had any Objective-C or Java experience, but was able to work with JavaScript. Furthermore, the App needs to work on Android and iOS devices.

That leads to use Appcelerator Titanium as framework for developing the App. And if you’re using Titanium and want to work with Notes data, using Domino To Go is the logical conclusion.

Now the App is about 90% finished and it is doing a lot of interesting work:

1.) Getting data from Notes

In the Notes application there is a lot of data. For example, a view containing device data has about 50.000 entries alone. Then there are seven other views containing much data, and all of that needs to be available offline.

You might know from my previous posts that with Domino To Go it’s a piece of cake to synchronize the content of a Notes view to the mobile device. What you might don’t know is that getting data out of multiple views is just as easy. Have a look at this example code:

var db = new NotesDatabase("http://host/path/database.nsf", "devicedata");

function sync_finished(success, msg) {
  if (success) DTG.log("sync successful!"); else DTG.log("sync failed: "+msg);

function sync2() {
  var view = db.getView("view2");

function sync1() {
  var view = db.getView("view1");


This code shows a chain of view synchronizations using Domino To Go and Titanium. Read it from the bottom up if you’re puzzled about the order of the functions.

The update() method simply tells Domino To Go to get all the data of that Notes view from Domino and store it on the mobile device so that it’s available offline.

And you can simply chain multiple view updates by using callback functions. The view.update(sync2) for example calls the function “sync2” when the view update (synchronization) is finished.

That way you can synchronize as many Notes views from Domino to the mobile device as you want. It’s damn easy. Furthermore, you can hook into the synchronization process to provide progress information (like a progress bar) to the user, too.

2.) Using the Notes view data in the App

To display Notes view data inside the App, for example in a table based view, you can simply run through the local data like this:

var view = db.getView("view1");
var vec = view.getAllEntries();
var ve = vec.getFirstEntry();
while (ve) {
  ve = vec.getNextEntry();

Remember, this is JavaScript code in Appcelerator Titanium, not LotusScript!
“displayViewEntry” is an imaginary function that would contain some Titanium code to create a table row for a view entry. Beside that, it’s pretty easy, isn’t it?

3.) Using Notes view data in the App with SQL

In a mobile App, data is always stored in a SQLite database. So when Domino To Go synchronizes Notes view data from Domino, it stores the data in the local SQLite database of the mobile device.

That on the other hand means that if you speak SQL, you can work with Notes view data on the mobile device using SQL like this:

// Notes db on the mobile device
var notesdb = new NotesDatabase("devicedata"); 
// Interface to the SQL DB on the mobile device
var sqldb = new DTGDatabase(notesdb.localdbname); 
var rows = sqldb.execute("SELECT * FROM view_view1 WHERE ...");
while (rows.isValid()) {
 // do something with the SQL result set;

This opens a lot of interesting possibilities like joining the data of multiple Notes views or getting a selection list out of a Notes view very fast.

We used this kind of technique a lot in the App, mostly to provide selection lists like customer numbers, device IDs, device vendors and so on.

4.) Editing and creating Notes documents in the mobile App

In the App there are forms where for example data of a specific device is displayed and can be edited. To upload changes made to a “Notes document” on the mobile device, we used this kind of code:

var notesdb = new NotesDatabase("devicedata");
var doc = notesdb.createDocument();
// unid is a global variable containing the UNID of the Notes document 
// displayed in the form
doc.replaceItemValue("form", "medicaldevice");
// $.deviceid is an input control on the form
doc.replaceItemValue("deviceid", $.deviceid.value); 
// and so on ...;

Since we only synchronized Notes view data from Domino to the mobile device, we could not use a notesdb.getDocumentByUNID(). Domino To Go can get complete Notes documents, too, but since that would be a lot of documents in this case, we decided not to synchronize Notes documents but only view data.

To upload data to an existing Notes document from the mobile device to Domino, Domino To Go provides a simple but powerful method: create a new Notes document followed by doc.setUniversalID().

With that method Domino To Go creates a new, temporary document on the mobile device. But when this document is being uploaded to Domino, all items of that temporary document will be put into an existing document on the Domino side (identified by the UNID set with doc.setUniversalID() ).

Using that method we spared the effort to synchronize Notes documents in addition to Notes view data, which saves a lot of time.

5.) Taking photos and attaching them to Notes documents

Titanium provides an API to use the camera of the mobile device. In the end, there is a file like “photo.jpg” in some folder on the mobile device’s file system.

To attach and upload this photo to a Notes document, we can simply use one line of code:

doc.setAttachment("fieldname", filepath);

where “filepath” contains the path to the photo file on the mobile device. That’s it.

To remove the photos from the mobile device after uploading, we’re simply storing the filepaths to the photos in some global datastructure and delete the files after the upload finished.

6.) Performance

As I said above, we’re synchronizing 8 Notes views from Domino to the mobile device, one after the other. I don’t know exactly how many view entries we have altogether, I estimate about 70.000 view entries.

The whole synchronization process only takes about 20 seconds in the iOS simulator. On an actual mobile device with a cellular network this will be slower, perhaps something between 40 and 60 seconds.

So this App is another proof that synchronizing Notes data from Domino to a mobile device with Domino To Go is easy and pretty fast.


You know what? I’m pretty proud of the work I did with Domino To Go 🙂
It solves a lot of real world problems and makes developing native Notes-Apps for iOS and Android so much easier.




Feb 07

Ich spreche auf dem Entwicklercamp, 17.-19. März

Ich werde dieses Jahr wieder mal auf dem Entwicklercamp sein und dort über das Thema Datenaustausch zwischen Domino und mobilen Apps (iOS, Android etc.) sprechen!

Im Rahmen der Entwicklung von Domino To Go habe ich mich mit diesem Thema sehr intensiv auseinandergesetzt und alles gelöst, was dabei zu lösen ist 🙂 Einige der Konzepte und Ideen, die ich auf diesem Weg gefunden habe, werde ich auf dem Entwicklercamp in zwei Sessions vorstellen.

Meine Beispiele werde ich im Rahmen von Appcelerator Titanium auf der App-Seite und IBM XPages auf der Backend-Seite präsentieren.

Nachdem ich zwei Jahre nicht auf dem Camp war, freue ich mich sehr darauf, wieder dabei zu sein und bin gespannt, wen aus der Community ich dort treffe oder neu kennenlernen kann!