Still going at a Klip

Opinion
Oct 4, 20044 mins

KlipFolio is one of the most intriguing information delivery systems we’ve seen for a while and its potential is limited only by the relative youth of Serence – which is to say that the company’s documentation and debug facilities are disappointing. In KlipFolio it is easy to build basic functionality, but when you try to be clever the documentation lets you down. Even so, KlipFolio is impressive and reliable.

In last week’s Gearhead we discussed a fabulous tool, er, utility, no, system . . . well, an unusual piece of software called KlipFolio published by Serence. To briefly recap: KlipFolio is a framework for managing mini-applications scripted in JavaScript.

At the end of last week’s missive, we threatened to look at building one of these applications called Klips and so, using your seat cushion as a flotation device if necessary, here we go . . .

To develop Klips, first enable “developer mode” in KlipFolio. This mode provides a debug tab in the KlipFolio preferences dialog that switches the display of debugging output from Klips on and off. It also enables modal alert dialogs to display debug output and a context (right click) menu option that lets you reload Klips so that you can run the latest version immediately after editing.

To switch this on we need to add the line

true

 in the

section of the KlipFolio preferences file (located in the KlipFolio directory).

Next download the development kit, the developer’s guide and the API specification.

Now we’re ready. Using a text editor we open the template from the development kit and save it under the name we want our Klip to have. We’ll call it, say, Bob.

The template is an XML description of the Klip that includes author, date, revision level. See a link to the template on Serence’s Template page.

There’s a certain amount of setup information defining the Klip’s name but we’ll skip to the code section. Here’s an abbreviated version of the template – the entire Klip is specified within the tags and the code goes in the section:

To add items to our Klip panel we need to use:

. . .

 

   

       Code goes here

    ]]>

 

Items.addItem (string);

The default behavior of a Klip is to enumerate the number of items added to the right of the icon (the icon is specified in the setup section) when the Klip is in its minimized form, when manually resized or when you mouse over the panel, below the icon.

So, as an example, the following code will repeatedly (depending on the refresh interval specified in the Klip specification file) display the time:

function onRefresh()

{

var currenttime = new Date();

var hrs = currenttime.getHours();

var min = currenttime.getMinutes();

var sec = currenttime.getSeconds();

Items.clear();

Items.status = “”;

Items.addItem (hrs + “:” + min + “:” + sec);

}

The method Items.clear removes all current items from the display to ensure that there is only one line showing at a time, and setting the Items.status property to an empty string removes the count of the number of items (which would otherwise always be 1).

KlipFolio provides support for reading RSS, Atom, XML, Resource Description Framework and HTML content, and signed Klips can access raw TCP/IP connections (Serence does the signing for free). KlipFolio also has its own object model.

The only area of programming functionality that is obviously missing is support for low-level protocols such as Internet Control Messaging Protocol. Developers also can have Serence encrypt their code – a service that the company charges for.

KlipFolio is one of the most intriguing information delivery systems we’ve seen for a while and its potential is limited only by the relative youth of Serence – which is to say that the company’s documentation and debug facilities are disappointing. In KlipFolio it is easy to build basic functionality, but when you try to be clever the documentation lets you down.

Even so, KlipFolio is impressive and reliable. We recommend keeping an eye on this unique product – it could well be the corporate information delivery vehicle you’ve been looking for.

Deliver you thoughts to gearhead@gibbs.com.