Last week I started to dive deeper into Connections customisation using ICEC. I dared to try to create a custom widget. There was a lot of learning involved, not least because I’m a jQuery novice and far from expert at JavaScript. I’m a big fan of the stronger validation at compile time of Java. For a few days there seemed to be very good reason.

For those who haven’t done it, the custom widget is typically in a separate file, referenced and registered from the custom.js file uploaded to ICEC. Both are uploaded by clicking on the “Customize” button on ICEC and going to “Engagement Center Settings” and uploading the JavaScript into the “Customisation Files” area. I worked from the documentation page. As is my typical approach when stepping into the unknown, I broke it down to smaller steps, with a basic custom widget before planning on more extensive changes. I copied the JavaScript from the documentation and modified it to register the widget. I uploaded the custom.js – and the page was blank, just a title, with no “Customize” button.

It turned out the JavaScript samples in the documentation used XCC.W.registerCustomwidget, but the method is actually XCC.W.registerCustomWidget. A JavaScript error was thrown, preventing the page from loading.

After various attempts to find a way to work around it and after raising a support call, I came across a set of labs for ICEC custom widgets by Dimitri Prosper of IBM. He also had a video here outlining this exact issue and how to resolve it, using Developer Tools in Chrome. Thanks to that video I was able to recover the situation and also have a way forward that gives more options for safer development in the future.

I also looked at the other projects by Dimitri, one of which is creating a GraphQL server for IBM Connections APIs. Anyone who has followed sessions I’ve done at conferences over the last couple of years knows my enthusiasm about GraphQL and why I think it makes a lot of sense for social data (in both Domino and Connections). This approach was what I was expecting when Connections Pink initially promised modern APIs. It makes so much sense for accessing Connections data from multiple hierarchies in a single REST service call. I went across to the Connections Aha ideas site and was glad to see GraphQL had already been requested there. Hopefully we’ll see this released – with mutations as well as queries – when HCL take over responsibility for Connections later this year.

The Node.js GraphQL server Dimitri built may also be an interesting option for GraphQL against Domino V10, maybe with an interface to help developers generate the schema that will then get used. All it would take is a database in which to store that schema and pick it up on-the-fly! 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.