Developing social applications with the Social Business Toolkit SDK

Posted by:

Intro

The Social Business Toolkit SDK (SBT SDK) is a set of libraries and code samples that you use for connecting to the IBM Social Platform. As a developer you can choose which web development skills fits you best: Java, (client side) JavaScript or XPages. Your social platform may reside in the cloud or on premise.

In this post I will give you guidelines and practical examples to get you started. I choose XPages as development environment.

Terminology

In the document terms are thoroughly used:

Term

Description

SBT

Social Business Toolkit

SDK

Software Development Kit

DDE

Domino Designer on Eclipse

XPages

XPages is a rapid web and mobile application development technology

OpenNTF

Open Source Community for (IBM) Collaboration Solutions

OAuth

Open standard for authorization

Managed Bean

Java Beans representing system objects and resources

Endpoint

Encapsulates the access to a service provider, like Connections or Sametime

Installation of the SDK

Prerequisites

Before you can start with development in Domino Designer on Eclipse you need to install the SBT SDK. It can be downloaded from the following address: http://ibmsbt.openntf.org/The files you need to work with the SBT SDK and Domino are located in folder ‘redist\domino’ in the downloaded ZIP file.

Extension Library

Another condition to be able to run the Social SDK within your XPages you need to have installed the Extension Library, available on OpenNTF: http://extlib.openntf.org/. You need to have the library installed on both Domino server and DDE.

Installation for Domino Server

You can find a set of instructions how to install the SBT SDK on an IBM Domino server on the address:
http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Social+Business+Toolkit+SDK+documentation#action=openDocument&res_title=Installing_on_Domino_Server_SDK1.0&content=pdcontent. I recommend the installation via an Eclipse Update site. As a result your Update site should display the following plugins:

Screenshot_4

Installation for DDE

The Domino Designer deployment of the IBM Social SDK can use the same imported update site from the Update Site NSF. On Domino Designer verify that the checkbox for "Enable Eclipse plugin install" is checked in the Domino Designer preferences. You can find a set of instructions how to install the SBT SDK on DDE on the same address:
http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Social+Business+Toolkit+SDK+documentation#action=openDocument&res_title=Installing_on_Domino_Server_SDK1.0&content=pdcontent.

Setting up a Notes application

Create a new Notes application from scratch. I called mine ‘bornsocial.nsf’. Open the Xsp Properties file in DDE. Include the following libraries:

  • com.ibm.xsp.extlib.library
  • com.ibm.xsp.sbtsdk.library

Screenshot_5

Authentication

The Social Business Toolkit leverages a credential store for single sign on. For OAuth for example the user tokens are stored in this repository so that users don’t have to authenticate and grant access to services like IBM Connections for every session. The OAuth application tokens are also stored in this repository so that all tokens can be managed in one central place. You can read more on the credential store here: http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Social+Business+Toolkit+SDK+documentation#action=openDocument&res_title=Configuring_token_stores_SDK1.0&content=pdcontent&sa=true. And it is also explained in the following video: http://www.youtube.com/watch?v=2CWD70XarX8#t=100

In basic: the implementation of the credential store is performed by the use of a managed bean. The usage of this credential store is then defined in an endpoint. An endpoint encapsulates the access to a service provider, like Connections or SameTime.

In the Package Explorer open the faces-config.xml file:

Screenshot_6

Add the following lines:

<!– Token Store memory implementation –>
<managed-bean>
    <managed-bean-name>CredStore</managed-bean-name>
    <managed-bean-class>com.ibm.sbt.security.credential.store.MemoryStore</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
  </managed-bean>

<!– Password Store memory implementation –>
<managed-bean>
    <managed-bean-name>PasswordStore</managed-bean-name>
    <managed-bean-class>com.ibm.sbt.security.credential.store.MemoryStore</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
</managed-bean>

Endpoint

In the first example(s) we are only going to demonstrate to connect to IBM Connections. Add the following lines:

<managed-bean>
    <managed-bean-name>connections</managed-bean-name>
    <managed-bean-class>com.ibm.sbt.services.endpoints.ConnectionsBasicEndpoint</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
      <property-name>url</property-name>
      <value>https://your-connections-url.com</value>
    </managed-property>
    <managed-property>
      <property-name>authenticationService</property-name>
      <value>communities/service/atom/communities/all</value>
    </managed-property>
    <managed-property>
      <property-name>authenticationPage</property-name>
      <value>/bornsocial.nsf/_BasicLogin.xsp?endpoint=connections</value>
    </managed-property>
  </managed-bean>

For value of managed property ‘url’ you must enter the address of your connections installation or in case you are using IBM Greenhouse for demonstration purposes you can choose 'https://greenhouse.lotus.com’.

Login page

A custom login page will presented when a user initially tries to connect to IBM Connections:

Screenshot_7

The elements for the login page are in the XPagesSBT.nsf application which comes with the SBT SDK. The nsf is located in folder redist\domino. The login page consists of the following design elements:

Name

Type

_BasicLogin.xsp

XPage

sbtLoginPage

Custom Control

sbtLoginPanel

Custom Control

You can simply copy the design elements from the sample application in your application and modify them e.g. for branding.

Connecting to Connections

Your application is now ready to connect to Connections. Where you place the code to connect to Connections is up to you. A recommended approach could be to establish connections via Managed Beans.A managed bean is nothing more fancy than a registered a JAVA object.

Managed Bean

In our first example we are going to read the content under My Files in Connections. These are the files that you have uploaded and shared.

  1. Create a new Java design element (Java Class).
  2. Enter the following code:

package com.quintessens.bornsocial.sbt;
import java.io.Serializable;
import com.ibm.sbt.services.client.connections.files.FileService;
import com.ibm.sbt.services.client.connections.files.FileServiceException;
import com.ibm.sbt.services.client.connections.files.FileList;

public class ServiceBean implements Serializable{
private static final long serialVersionUID = 1L; 

    public FileList getMyFiles() {   
                FileService service = new FileService();   
                try {      
                    return service.getMyFiles();   
                } catch (FileServiceException e){
                return null;
                } 
        }
}

Code explanation

The function getMyFiles gets handle to the FileService object. Then the getMyFiles function is called to get all the files (both private and shared) the user has uploaded in Connections. Then a FileList object is returned to the caller. 

The FileList object can then be used in a suitable XPage control e.g. the DataTable or the DataView control. 

Registration

In order to access the Managed Bean you have to register it. This is done in the faces-config.xml file. Open the file and add the following lines:

 <managed-bean>
    <managed-bean-name>ServiceBean</managed-bean-name>
    <managed-bean-class>com.quintessens.bornsocial.sbt.ServiceBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
  </managed-bean>

You will access the bean via its name ServiceBean.

XPages

Finally we have come to a point where we can display the files that the managed bean returns from IBM Connections. I have choosen the XPages environment to do so.

Custom Controls

A best practice in XPages development is to divide functionality in individual blocks known as Custom Controls. This make it easier to re-use the functionality across your application.

Custom Control for a ‘My Files’ overview

  • Create a new Custom Control design element.
  • Add the following code to the control:

<xe:widgetContainer id="widgetContainer1" itleBarText="#{javascript:return compositeData.widgetTitle;}">
    <xp:panel>
        <xe:dataView id="dataView1" var="file" rows="5" columnTitles="true" styleClass="filesDataView">
            <xe:this.extraColumns>
                <xe:viewExtraColumn columnTitle="Filetype"></xe:viewExtraColumn>
                <xe:viewExtraColumn columnTitle="Created"></xe:viewExtraColumn>
                <xe:viewExtraColumn columnTitle="Size"></xe:viewExtraColumn>
            </xe:this.extraColumns>

            <xe:this.summaryColumn>
                <xe:viewSummaryColumn columnTitle="Filename"></xe:viewSummaryColumn>
            </xe:this.summaryColumn>
            <xp:this.value>
                <![CDATA[#{javascript:ServiceBean.getMyFiles();}]]>
            </xp:this.value>
            <xp:this.facets>
                <xp:panel xp:key="noRows" id="topicsPanel2">
                    <xp:div styleClass="lotusWidgetBody">
                        <xp:text>
                            <xp:this.value>
                                <![CDATA[#{javascript:return (viewScope.myFilesAvailable ? “No files found.” : “My Files unavailable.”);}]]>
                            </xp:this.value>
                        </xp:text>
                    </xp:div>
                </xp:panel>
                <xp:panel id="summaryPanel" xp:key="summary" style="width:50%;white-space:nowrap;">
                    <h4><xp:link styleClass="dataViewLink" escape="true" id="link7" target="_blank" text="#{javascript:return file.getTitle();}">
    <xp:this.value><![CDATA[#{javascript:return file.getContentUrl();}]]></xp:this.value>
</xp:link></h4>
                </xp:panel>
                <xp:panel id="typePanel" xp:key="extra0" style="width: 20%;white-space:nowrap;">
                    <xp:text>
                        <xp:this.value>
                            <![CDATA[#{javascript:return file.getType();}]]>
                        </xp:this.value>
                    </xp:text>
                </xp:panel>
                <xp:panel id="sizePanel" xp:key="extra2" style="width: 15%;white-space:nowrap;">
                    <xp:text>
                        <xp:this.value>
                            <![CDATA[#{javascript:var size = file.getSize();
var kilobyte = 1024;
var megabyte = kilobyte *1024;
if(size < kilobyte) {
    return (size + " B");
}else if(size < megabyte) {
    return (Math.round(size/kilobyte) + " KB");
}else {
    return (Math.round(size/megabyte) + " MB");
}}]]>
                        </xp:this.value>
                    </xp:text>
                </xp:panel>
                <xp:panel id="panel1" xp:key="extra1" style="width: 15%;white-space:nowrap;">
                    <xp:text escape="true" id="computedField3" value="#{javascript:file.getCreated()}"></xp:text>
                </xp:panel>
            </xp:this.facets>
        </xe:dataView>
    </xp:panel>
</xe:widgetContainer>

As a result the files in IBM Connections for the authenticated user will be listed e.g.: 

Screenshot_8

Code explanation

The DataView control is using the getMyFiles function from Managed Bean ServiceBean for data binding:

 

Screenshot_9

<xe:dataView id="dataView1" var="file" rows="5" columnTitles="true" styleClass="filesDataView">            
            <xp:this.value><![CDATA[#{javascript:ServiceBean.getMyFiles();
        }]]></xp:this.value>
            …
</xe:dataView>

It iterates through the returned FileList object and for each column values from each entry in the ‘file’ collection the value is computed e.g.:

<xp:panel id="summaryPanel" xp:key="summary" style="width:50%;white-space:nowrap;">
                    <h4><xp:link styleClass="dataViewLink" escape="true" id="link7" target="_blank" text="#{javascript:return file.getTitle();}">
                        <xp:this.value><![CDATA[#{javascript:return file.getContentUrl();}]]></xp:this.value>
                    </xp:link></h4>
 </xp:panel>

API Explorer

Use the SBT API Explorer which method each object provides:

Screenshot_10

Link: http://greenhouse.lotus.com/llapiexplorer/.

Summary

As you have seen getting started with the Social Business Toolkit is not that difficult for XPages developers. As alternative you could also choose JavaScript or JAVA if those skills fit you better. The SDK will help you understanding Connections piece by piece from a developer perspective.

In the example information is read from Connections but you can also post data. The SDK allows you to create great 'social enabled' applications. This can be applications that solely work with Connections or integrate with other platforms e.g. IBM Notes. 

I hope to write more on the Social Business Toolkit in another post. Thank you for reading.

Patrick Kwinten

 

 

 

 

 

2

Teknikfrukost med Domino-applikationer i fokus

Posted by:

Domino och XPages frukostseminarie

(see information in English below)

Infoware bjuder in till trevlig Teknikfrukost med era Domino-applikationer i fokus!

Många organisationer har en stor flora av Domino-applikationer. Förvaltningen av dem är en särskild utmaning vid migrering, tex. mellan domäner, till moln, till nya klienter som webb eller mobilt, eller till andra epost-system. Vi visar hur DomainPatrol Pro (ny version släpps under maj) hjälper till med ordningen och hur XPages öppnar dina applikationer för nya klienter.

Agenda:

DomainPatrol Pro ur förvaltning- och migreringsperspektiv

Demo och frågestund kring XPages – specifikt kundcase

Våra seminarier är kostnadsfria och du får träffa några av våra mest erfarna och kompetenta konsulter. Du håller dig uppdaterad inom det tekniska området samtidigt som du äter en god frukost tillsammans med de andra seminariedeltagarna.

Tid och plats
Onsdag 22 maj 2013

08:00 Frukost serveras
08:30 Seminariet startar
09:10 Seminariet slut

Efter seminariet finns vi på plats för vidare diskussioner och frågor.

Kungsholms strand 123
Stockholm

Varmt välkommen att anmäla dig! Antalet platser är begränsat.

info@infoware.se
08-652 17 30

hälsningar Infoware
______________________________________________

In English:

We invite you all to a breakfast meeting about XPages and Domino Apps, on the 22th of May at the Infoware office.

At 08:00  we will be serving breakfast, and at 08:30 the seminar starts.

The seminar will be held in Swedish, but if you would like to know more about our expertise on XPages or Domino Apps, please send us an email!

info@infoware.se

0

XPages – How to get a proper JavaScript debugger in XPiNC!

Posted by:

The low down: Download FireFox 5 + FireBug 1.8.4 and BAM! Instant CSJS debugger!

Yup! It’s basically that simple (for once). Read on for the gory details…

In one of my client projects I had the opportunity to work with XPages in the Notes Client, or XPiNC for short. Being a developer with almost 20 years experience I take “limited pleasure” in developing for the Notes client. My opinion is that you’re too restricted in what you can achieve front-end and graphical layout is unmistakably Notes – in a bad way. IBM Notes has it’s benefits – like you only have to worry about the shortcomings of one client, where as web clients have a legion of different vendors and versions. Sometimes even the same vendor is incompatible with it’s own versions! Yes – I’m looking at you Internet Explorer! But still, the benefits of web based development outweighs the negatives, at least for me.

But, hey! We have a new kid in town: XPages! Who’s supposed to run in the Notes client, more or less without modification…

“Wow! What a totally amazing, excellent discovery!”-Wayne Campbell

 

Excellent! Or – It could have been

XPiNC uses a browser to render your XPage inside the Notes client. We have been able to do parts of this for years, by utilising an embedded browser control in the Notes client:

Domino Designer – Form – Create / Object / Control – “Microsoft Web Browser”

You can see in action here, from an application I did a while back. We’re jumping straight into the action at 3:04 showcasing the embedded  “Microsoft Web Browser”-control in an ordinary Notes form, no XPages as far as the eye can see!

video demo of the "Microsoft Web Browser"-control in action

Video demo of how an embedded web browser control can interact with a Notes client, without using XPages

Yes – Yes! I Know! It doesn’t have the full potential of XPiNC, like offline support, field level encryption and so on. But still, it usually impresses the “general population”. You might notice that the performance of the web part of the GUI isn’t stellar? It’s because the client used IE7 which is “less then great” (to put it kindly) at performance in general and JavaScript in particular.

 

Speaking of old browsers

Anywho! Where was I…? Yes! This could be really great news – the ability to run XPages in the Notes client. But it has some shortcomings. The browser we’re stuck with is something called a “XULRunner”, more about that in a bit. The version of your embedded browser differs depending on the version of IBM Notes in use. In my case: IBM Notes 8.5.3FP1 UP1 translates to R5.0 of XULRunner. One way to check what version your particular installation is using is to run a JavaScript snippet: window.navigator.appVersion on an XPage in your environment. Now, there’s a gazillion different ways to achieve this. Well, maybe not a gazillion exactly – but there abouts. I will demonstrate a particularly cumbersome way, just because I can! (And you will see some added benefits to your development environment in the process).

 

Getting FireBug Lite

When I first started dealing with XPiNC I found that you can set some params in the XSP.properties file to enable some version of FireBug Lite:
xsp.client.script.dojo.djConfig=isDebug:true

That’s one way of doing it. But you’re stuck with a really old (and ugly!) version (surprise! NOT!) A much better way is to inject the FireBug addOn thru an Eclipse plugin. This way, no other developers will be bugged (pun intended) by the debugger and you can always enjoy the latest version of FireBug, regardless of what IBM seems fit.

So, without further ado, I present the excellent work by Mr Karsten Lehman: XPiNC app development tool

 

XPiNC front-end performance

Once that is over and done with, you can run my earlier JS snippet:  window.navigator.appVersion – In my case that would return “5.0 (Windows; sv)”.

– Ok, great! We now know that you’re running R5.0 of something called a “XULRunner”. That’s neat and all! But why should I care?

Well, because XULRunner 5.0 is in all useful purposes equivalent to FireFox 5.0!

– Wohoo! Sweet! But.. But? Isn’t that like reallllly old?

Yes, yes it is. It was released back in the day: 21 of June 2011. 14 releases, or almost two years ago (That’s like 20 “web years”). The latest version, at the time of this writing, is R19.0!

(Earlier version of IBM Notes uses the XULRunner equivalent of Firefox 3.6.x)

HTML5 support

Below is a comparison between the HTML5 capabilities between the different versions of Firefox currently used in IBM Notes vs the latest release of Firefox available:

Comparing HTML5 capabilities Firefox browser versions

[Click the image for the full comparison.]Comparing the HTML5 capabilities of the different versions of Firefox

As you can see the capabilities aren’t great, but whether it’s a real problem is entirely up to the application being developed. Put simply, if you’re not taking advantage of the capabilities in HTML5 (you should!) then this won’t be a problem.

To get some ideas, regarding the benefits of using HTML5, I recommend the site HTML5Rocks.

CSS3 support

But the limitations doesn’t end there I’m afraid. I’ve included a comparison for CSS3 support below. Showing R3.6, R5.0 and R19 in that order. (Click the image for the full comparison! But be warned, it’s BIG!)

Comparing CSS3 support across Firefox versions

This is not an exhaustive comparison, but should give a good indication.

If you click the image, you will be painfully aware of small nuances that will plague your road to the pixel perfect heavens of stardom!

JavaScript performance

If that wasn’t bad enough, the JavaScript performance is about 200% faster in Firefox 19 compared to Firefox 5. (Haven’t been able to test Firefox 3.6, but do expect it to be quite a bit slower.)

Running the browsers thru the ECMAScript testing page (click here to test it yourself) will make you even more depressed. Firefox 3.6 fails in 4247 tests, Firefox 5.0 fails 282 and Firefox 19 in 170. Granted that Firefox 5 scores pretty good, but for instance it doesn’t support the very common DOM operation parentElement. Makes you wonder what else it has in store for you programming endeavours doesn’t it?

Basically, what all this boils down to, is that to keep your XPages compatible with XPiNC you have to limit your webpages to the old standard that particular version of Firefox supports (dragging newer browsers down), or support two different versions of your XPages. Not a very appealing proposition either way.

I expected IBM Domino 9 to update the XULRunner, but no luck there. At least the public Beta 1 is still running R5.0 of XULRunner. I’m not expecting this to change for the released version, which is too bad.

Still some good news

If you’re a “Copy / Paste”-developer – who sticks with the default widgets provided with XPages,  then the above probably won’t cause you much headache and I’m afraid you’ve read most of this in vain. Because XPages in combination with Dojo will make most of the differences go away and the ones that are left might be tolerable to you.

But if you like to not only push the envelope, but to kick the crap out of it! Then the above will be the cause of some major grief and sleepless nights.

Hopefully you can limit some of the pain, revelling in the fact that you can do your front-end debugging using all the glory of FireFox 5 instead of mocking about with the embedded XULRunner client in the Notes client. This includes installing a big fat and juicy version of FireBug 1.8.4 in FireFox 5, no more debuggers on a diet for you!

You can download FireFox 5 here and FireBug 1.8.4 here.

Yet to come

I plan a follow up post where I share my experience developing for XPiNC, like potential pitfalls and how to circumvent those.

Keep watching this space!

In the meanwhile you can follow me @JBoive &| Google+

0

How to make Lotus Notes clients shine!

Posted by:

Previously we’ve talked about how to set up Parallels 8 to work properly on a Macbook Pro Retina. (You can read all about it over here), this final instalment isn’t targeted at Retina capable devices and thus should benefit everyone.

Now it’s time for some tweaking of the Lotus Notes clients themselves (Designer and Notes both) making them shine! Maybe you need to squint a bit, but the look will at least improve. Mission impossible? I think not! Before this article is over we’ll have a look at how to install an Eclipse plugin to manage themes. This will allow us to manage, share and edit the look of our working environment with ease. We’ll make some additional tweaks to the look and another couple of tips to improve and speed-up Domino Designer. But what are we waiting for? Let’s…

Get Started!

If you’re in a hurry – you can just download this setup file which I’ve handily prepared for your coding pleasure: Lotus Notes – Performance by Infoware

You will manually have to install my favorite font: Inconsolata
(Otherwise stuff will look way weirder then usual.)

You won’t get the theme plugin installed either, but you will get the color theme. Choosing this path I’ll assume you know what you’re doing, so I won’t go into any more details (like how to install the setup file). For the rest of you – Go get a cup of joe, because we’ll be here for a while…

Before we begin, last time around I mentioned a potential issue for Chrome users. It looked like graphical glitches when GPU accelerated CSS3 was involved. It worked fine in Parallels 7 as well as in IE10 and Firefox 15 under Parallels 8. Pretty weird stuff, if anyone were to ask me… But, fortunately, it worked itself out with an upgrade of Parallels. You can read all about the details (and workaround if it ever were to resurface) over here. Ok, on to the fun stuff: You’ve probably heard that Lotus Notes is now partially based on Eclipse? Well, if you haven’t – don’t sweat it. Just take my word for it (or have a look at this snasy Wikipedia article). As of 8.0 Lotus Notes client moved to Eclipse and from 8.5 and onwards we now get to enjoy(?) Eclipse in Domino Designer as well. True to their usual shenanigans, IBM won’t let us play with the all new and shiny: For Domino Designer 8.5.3 we’re stuck with the 3.4.2 version of Eclipse, also known as Eclipse Europe. The latest version, at the time of this writing, is Eclipse 4.2 (Juno). This has implications when using plugins, as we’re about to do.

The things I've seen

When things don’t go as expected

The plugins, that you’re installing in Domino Designer, needs to be compatible with Eclipse3.4.2 or horrible things may happen. You have been warned… If you’re running in a VM then just take a snapshot before trying out any new plugins.

Installing The Plugin

But, first things first! We need to enable the ability in Domino Designer to install plugins. This is the same procedure as you need to perform when you enable Source Control in Domino Designer. If you haven’t used SourceControl yet I highly recommend it, it will literally be a life changer! Your hair will grow back, your wife will look thinner and your kids will actually do what you tell them to! (Don’t know but the wife part, but otherwise it’s all good!) If you didn’t get to go to LotusPhere 2012 then here’s another couple of articles to get you started:

But, back to the matters at hand. To enable installation of plugins in Domino Designer: File / Preferences / Domino Designer – “Enable Eclipse plug-in install”

Enable Eclipse plug-in install

When “Enable Eclipse plug-in install” is enabled you’ll get additional menu options in Domino Designer: File / Application

Now you can manage your plugins here

  1. Click on File / Application / Install.
  2. In the following dialog, select: “Search for new features to install”.
  3. Click “Add Remote Location”
    Name: <Anything You Like> (I really went wild and chose: “Eclipse Color Theme”)
    URL: http://eclipse-color-theme.github.com/update
  4. Click “Finish”
  5. Make sure “Eclipse Color Theme” is checked.
  6. Accept the terms.
  7. Click “Next”.
  8. Click “Finish”.
  9. Select “Install this plug-in”
  10. Sacrifice a goat to the hacker gods and restart the client (The sacrifice is optional, but it can’t hurt)
  11. Done!

If all went as planned you should now be able to find the Eclipse Color Theme plugin in Domino Designer at: File / Preferences / General / Appearance / Color Theme

Eclipse Color Theme plugin in Domino Designer! Woot!

These are just the default themes to choose from. There are, at the time of this writing, 10240 more themes to choose from!
You can find the rest of the themes at http://eclipsecolorthemes.org as well as the plugin we just installed.

Someone might have noticed that this plugin doesn’t support Eclipse 3.4.2, but in my experience everything seem to work fine anyway.

My current favorite is “Zenburn” (bottom of the list). But do have a good look around for yourself, feel free to report back which one(s) you prefer or if you write your own.

Now, one might think that all is good and well. But, unfortunately, there’s still some kinks to work out on our quest to stardom. If you use LotusScript you won’t appreciate this new color scheme below:

Looks rather depressing, doesn’t it?

I don’t want an angry mob of LotusScript coders kicking my door down, screaming for blood! So, let’s fix this – quickly!

Fixing LotusScript

In Domino Designer – File / Preferences / Domino Designer / LotusScript Editor / Fonts and Colors

In the right pane, change:

  • “Normal Text” – Color: rgb(246, 243, 232)
  • “Identifiers”- Color: rgb(246, 243, 232)
  • “Keywords” – Color: rgb(223, 190, 149)
  • “Comments” – Color: rgb(128, 128, 128)
  • “Multi-line Comments” – Color: rgb(128, 128, 128)
  • “Constants” – Color: rgb(165, 194, 77)
  • “Directive” – Bold, Italic, Color: rgb(165, 194, 77)

Changing the font

While we’re at it, take the opportunity to change the hideous Arial font to something nicer. It’s easy! Close your eyes and take a pick! Or use the one I prefer: Inconsolato.

Now isn’t that better?!

But why stop there, we’re on a roll here! Let’s change to the same font for everything in the Lotus Notes clients:

In Domino Designer: File / Preferences / General / Appearance / Colors and Fonts.

– In the filter box, search for “fonts” (without the quotes) and replace everything with your new shiny font. I also took the opportunity to remove anything that’s set to bold, just because…

In Notes Client: File / Preferences / Basic Notes Client Configuration / Default Fonts

– Just set everything to the new font of your choosing.

Again, in Notes Client: File / Preferences / Fonts and Colors / Mail view font

While you’re in the preferences box, you might want to take a peek under: Windows and Themes / Theme and set to “Operating System Theme”.

I counted to no less then 9(!) different fonts for the different parts of the interface, now it’s much more consistent and hopefully a bit easier on the eyes.

If I haven’t bored you to tears just yet, I’ll finish you off with a couple of more tweaks:

Have a look at this excellent article by Nathan T. Freeman
Making Domino Designer work like you want

Also I recommend changing the memory config of Domino Designer with this little utility:
Designer Mem Config

Let’s do a summary, shall we?

We’ve enabled the ability to install Eclipse plugin in Domino Designer and touched briefly on the dangers of using plugins for newer versions of Eclipse than 3.4.2. We installed the Eclipse Color Theme plugin, configured that and made some much-needed adjustments to the LotusScript editor theme. I gave you a couple of links with tips of more tweaks to top it all of.

But that does seem like an awful lot of steps doesn’t it?! You feel like you’ve read all of the above and deserve some kind of reward, right? Sure you do! As I stated in the beginning I’ve saved a file that does all of the above (including Nathans tips and adjusting the memory configuration of Domino Designer) + some small tweaks of my own – thrown in their for good measure. (AutoSave every 15 minutes, “Right double-click closes window”, disable “Check Subscriptions” and disable “Enable Java Applets”

All you need to do is to install the Inconsolata font (or follow the instructions to change the font to something else) and import my settings!

If you followed Nathans advice then, in Domino Designer, you should have a tab that says “Package Explorer”. If you haven’t, then here’s where to find it:

Window / Show Eclipse Views / Package Explorer

  1. Under Package Explorer, where its white space – right-click.
  2. Select “Export”, from the popup menu. (We’ll get to the import, just make a backup copy of your preferences first).
  3. General / Preferences
  4. Export All
  5. Name it and save some place… Safe.

Then, Import / General / Preferences, Import All and select the file you downloaded from: Lotus Notes – Performance by Infoware.

Restart the client and…. Stick a fork in me, I’m Done!

If you believe I’ve missed something essential, please share in the comments below.

As always: follow @jBoive for the latest of the greatest!

4

How to setup Domino Designer on a Retina screen

Posted by:

If you are one of the lucky few who has a Macbook Pro Retina in their possession AND you happen to be a Lotus Domino developer, then this article is for you! This will perhaps not appeal to the broadest of audiences, but to the selected few – I hope it will be of value.

There are a surprising number of Domino Developers who choose to run on Mac, myself included. If this is just because we have good taste, or because of something else I leave to you, my beloved readers, to judge. For a Domino Developer there really isn’t much of a benefit, as we still need to run Wintendos since Domino Designer isn’t available on OS X just yet. (From what I hear it won’t be anytime soon either). There are a number of options that are available to you when your forced in to the Windows environment using a Mac: Boot Camp, Parallels Desktop or Vmware Fusion being the most popular.

Personally, I prefer Parallels Desktop 8. I did run with Vmware Fusion 4 for a while, but decided to give Parallels a shot and haven’t looked back! In all fairness: I haven’t tried Vmvare Fusion 5, but to be honest I haven’t found a reason to switch from Parallels. It performs better in general and just feels more complete (comparing previous releases), especially with the new 8 release.

(You can find a comparison here: Comparison of VMware Fusion and Parallels Desktop)

[EDIT: Here’s a current benchmark comparison between Parallels Desktop 8 and VMware Fusion 5: Benchmarking Parallels vs VMware]

Parallels claimed Retina support even with R7 and that was just a bunch of crock, in plain english. But with R8 they have delivered!

Now, finally, we’re getting to the really juicy bits!

Here’s what we’re aiming for: (Click images for the full Retina experience!)

Illustrating Domino Designer in 2880x1800

Yes, it’s HUMONGOUS!

XPages Source

Plenty of space for code!

JavaScript - Source

Yup! JavaScript works as well!

If you haven’t fallen asleep yet, or rushed to the nearest Apple Store – This was just something to wet your appetite. Next time we’ll have a look at how to actually accomplish this, what settings to use and so on. If there’s enough interest I’d might even share my custom dark theme for editing JavaScript and XML!

Follow @jBoive for updates and/or stay tuned!

5

AD108: The grand tour of IBM Lotus Notes and Domino 8.5.3 upgrade pack XPages capabilities.

Posted by:

Very informative session with lots of demos of the components available in Upgrade Pack 1. No information how skinnable the components are, but since they’re probably based on One UI v2.1 this shouldn’t be a problem. I would definitely look into this before implementing any components in an external site as they look… Well… Very much like Domino web based apps. Not brilliant, to be nice. 😉

With UP1 (Upgrade Pack 1) we now have access to using REST services. There are three different kinds, depending on where you wish to utilize them.

  • Domino Data Service
    When you’re not using XPages to access Domino data.
  • XPages REST Services Control
    When you ARE using XPages. This is more flexible then the above, so it’s preferred.
  • Custom Database Servlet
    When you need complete control! Requires Java skills.

There is a Kitchen Sink/Demo application that allows you to test all these new features and of course have a look at the source code. The application is automatically installed with the UP1.

The differences from the Extension Library are:

  • UP1 IS supported by IBM, where ExtLib is not.
  • UP1 shows the design element instead of just a computed text – enhanced Designer experience.
  • UP1 is fully accessibility compliant, where ExtLib may not be.
  • UP1 comes with an installer/uninstaller. ExtLib comes in a .ZIP-file.
However, UP1 are missing two things from ExtLib:
This may or may not be a deal braker for you.

You can find the documentation for UP1 here

You can find the slides here

1

AD110 – IBM Lotus Domino XPages Go Zoom!

Posted by:

This session talked briefly about suitable tools that you may use the debug and/or get a glimpse behind the sceen regarding frontend peformance:

Firebug
Chrome Developer Tools
Speed Tracer
Page Speed
Yslow
IE Developer Toolbar
Opera Dragonfly
Weinre
Fiddler
XPages Toolbox

Most of them should you be fairly familiar with. Firebug, at the very least. Personally I prefer Chrome Developer Tools, because I prefer Chrome and I find their Dev tools less prone to crashing.

For IE Development the IE Developer Toolbar is a must.

Fiddler is great across everything that uses HTTP/S. It sits in the middle as a proxy and record a lots of useful information as well as the ability to simulate modem speeds.

XPages a toolbox is also a welcome addition to be able to get a backstage view of what takes up most of the time in you XPages application.

The session went on and talked, in great detail, about the differences between the execution modes. To summarize:

Full refresh – Is the most expensive. Recalculates and sends the entire page.
Partial refresh – Recalculates the entire page, but just sends the part of the page you specify.
Partial execution + Partial refresh – Just computes the requested area and returns that.

For best performance, use the last combination specified above where ever possible.

Other suggestions are:
Use get requests instead of post. This skips a lot of steps in the life cycle and as such reduces the load on the server and calculates quicker.
Set all containers, that don’t require input, to read only. Again, saves computing power.
Use the dataCache-property on every Domino view source you can.
Use the viewsScope/Request scope to cache objects and variable. Caching reduces CPU utilization and using short lived scoped variables reduces the memory footprint.

Can’t remember if they mentioned this, but in reality modern web applications main bottleneck isn’t the server, it’s the number of http requests the page does. There for you will get the biggest performance boost if you enable Application Preferences / XPages-tab / “Use runtime optimized JavaScript and CSS resources”. (Domino 8.5.3 only) This merges most (not all) JavaScript and CSS external references you might have into one request per type.

Combine all of the above and your XPage applications will be screaming!

20120123-190448.jpg

1

BP103 – IBM Lotus Domino XPages Blast!

Posted by:

A good session for the not so seasoned XPages developer. If you’ve been doing this for a while then maybe they’re weren’t so many new things revealed, or it shouldn’t be anyway. 😉

But something’s are worth repeating so here we go:

Thomas Gums have written a CGI Scriptlibrary that is worth checking out if you’re working with CGI variables like REMOTE_ADDR and the like.

Use resource bundles instead of profile document for better functionallity and performance. Include bundle on the XPage then you can use SSJS like .getString(“key”) to retire information from it.
Another cool thing with using bundles for keywords and/or language files is that you can easily export them using LotusScript to DXL that anyone can read and edit without having Designer access.

XPages agents are much faster then any LS or java agent, so use that when possible.

Here’s a neat trick to export Notes data to a formatted Excel file: create the Excel file and format it the way you normally would, save it as XML and paste that into your XPages agent. That way you get all the formatting done for you and you can concentrate on injecting just the dynamic parts. (Just don’t forget to set the correct content-type in XPages).

There are a couple of SSJS functions available for working with JSON that may not be apparent at first:
isJson
fromJson
toJson

Ju also have the equivalent on CSJS in Dojo, except the isJson-method.

20120119-093536.jpg

0

AD107 – IBM Lotus Domino XPages Meets Enterprise Data – Relational++

Posted by:

A good session with lots of examples combined with thorough walkthrus.

Using the Extension Library (not available using Upgrade Pack 1).

You Can get data from any db, just provide the jdbc driver.
Add JDBC query and rowset as a data source so you can use it as any other view data source with repeats and so on.

@jdbcDbColumn queries a RDBMS like @dbColumn() does a .NSF, but without the 32k limit.
You need a data source as a JDBC connection and a .jdbc file under Package Explorer WebContent/WEB-INF/jdbc. The file describes the connection, like the driver, url and login. This catalog is NOT accessible from an URL, so the info is secure.

You can compute the SQL queries, making them very flexible.

They even support stored procedures and batch changes of the RDBMS.

New SSJS functions
jdbcDbColumn
jdbcInsert
jdbcUpdate
jdbcDelete
jdbcExecuteQuery
jdbcGetConnection

20120119-094216.jpg

0

AD109 – Ready, Set, Go! How IBM Lotus Domino XPages Became Mobile

Posted by:

I really-really want to like Dojo Mobile that Domino uses. But I can’t say that I do, not with a straight face.

The good thing first: it’s easy and you’re probably already comfortable developing using Dojo, being an XPage developer and all.

The bad: everything else! I’m being a bit harsh here, but you get the point.

The functionallity isn’t bad, but the looks are off. The transitions are off, buttons looks ugly and so on. We’re at severe risk to fall back into the trap that “Domino apps look bad on the web”. I’ve proven on numerous occasions that they don’t HAVE to be – showing a screenshot from our new product DP Social, not a Domino app per say, but could’ve been!

20120117-170357.jpg

Or have a look at my Calendar Overview Demo that IS Domino and XPages based.

Feel free to compare the look and feel between Dojo Mobile with jQuery Mobile and decide for yourself.

You might also wish to check out the tool for skinning jQuery Mobile solutions: Theme Roller
Something that Dojo doesn’t have, to my knowledge.

To make more advanced solutions in jQM you will need to learn jQuery, but that’s not a bad thing to put on your resume.

So I urge you! Don’t fall in the trap of an easy fix with drag and drop development. Do it properly! It will take little more time, but the end result will be much better! One can also discuss if you should try and replicate a native app on the web in the first place, but that’s a topic for another day.

I recommend jQuery Mobile, it’s similar in structure to Dojo Mobile. But there are others that are also very good. One that springs to mind is Sencha Touch.

20120118-080815.jpg

0
Page 1 of 2 12