Hands-on: Your first GraphNSF

With more people talking about the usage of Graph data modelling with data residing in IBM Notes documents there is still a threshold getting started writing your first XPages application using the concept or technology.

I had the opportunity to spend a day or two to setup a simple basic construction, document it and demonstrate and explain it to a couple of developers.

The document is available under the following link:

cover-document

 

Here is the table of content:

toc

The document walks through the setup of the implementation and several design elements for the application.

(Again) I have used the Teamroom application, because it’s common available for IBM Notes Domino. On top of the existing XPages application for a Teamroom I have added several XPages to have a simple app showing the Graph capabilities within the OpenNTF Domino API library.

The result of the tutorial is the option to import Notes data into a Graph DB and have a look and some interaction with it. Of course the end-goal is to get some insight in how to set up a basic construction and understanding of some core Graph terminology and how to translate this to an XPages application.

teamroom_graph

I hope it may help you and if you have questions or are interested exploring graph capabilities I am happy to hear from you!

Add 20 years of experience to your workforce

You can 20 years of experience within IBM Notes and Web development to your workforce by hiring me.

Interested? Read my curriculum vitae on LinkedIn: http://www.linkedin.com/in/patrickkwinten and get in contact.

I am happy to work WITH you !

 

 

The IBM Notes and Domino roadmap mantra *sigh*

I guess it was at IconUK Sept 2016 that IBM presented on their roadmap for Notes/Domino since a long time. The “big” news was that Q4 2016 IBM would come with an announcement regarding “updated tooling explored”.

What they meant with that was not clear to me, but “updated tooling” refers to me to what exists today, and that is currently just XPages if you ask me.

So last week during a webinar co-hosted by TeamStudio and TLCC the results of this exploration was expected to be presented as part of the roadmap for Notes and Domino. To my surprise instead of taking the opportunity and time to explain the findings of this exploration IBM simply repeats “updated tooling  explored” but adds the line “more during Connect 2017”. WHAT?!?

Didn’t you first come with a press notification that in Q4 2016 you will explain more about application modernization plans and invite people to come and listen to your views and then during this press report you simply say that people may wait another quarter?

And what does “more” in “more during Connect 2017” mean? How much more can people expect?

I am not sure what it means in English but it Dutch it sounds to me like a “zoethoudertje” but it has a negative interpretation. Probably the best translation is “compensation” It never satisfies any party in the long run.

Customers and developers want to move on and modernize their applications. And I am doubting if IBM is delivering it for Application Development in Notes Domino. If I look at the job market, the market is dead. If I read the modern development forums it is JavaScript (Node JS, Angular, React), Java, NonSQL databases where data is stored directly in JSON, GraphQL or any other Graph db, Websocket connection streams etcetera. Hell yeah blend in a couple of services from Bluemix if you like.

So yes, I am very disappointed in this announced “delay” and this unprofessional “procastination” by IBM. I am not sure what you are doing at your offices. Talk with your customers and development team. Write the technical opportunities down in a living document. Keep the document fresh and fruitful. Allocate sufficient resources so you come to deliverables.

Nobody wants to spend 2 hours listening to a roadmap-mantra that brings “nothing more on updated tooling explored” except Java 1.8, probably.

Development tip: learn some administration

I have no idea what your administration skills are. Mine date officially back to mid 2000 although I have setup recently servers but then mainly for development purposes only.

So if you want your skills and insights updated like I do or you  perhaps a tip for you could be to order the IBM Lotus Domino Administration 8.5.3 Training at Udemy.  Untill 1 November there is a give away action running to buy courses for 10 euro if you provide the coupon UDEMY10OCT.

Okay, it is targetted for 8.5.3 but how much has changed between 8.5.3 and 9.0.1?

I have no idea about the quality of the course, I guess you have to find out yourself.  For 10 euro: what are your alternatives?

Happy administration =)

Send a message from your XPage application to a Slack channel

Introduction

While everyone is ‘waiting in vain’ for the delivery of Project Toscana organizations have start using Slack as a modern way to send messages within departments.

For an example a operation team is using an instructions quality book build on XPages and it would be great to get notified in your Slack channel when new instructions come in or have been updated. Or you want to highlight a specific instruction just to create extra attention to it (e.g. an increasing number of incoming incidents).

slack_sample

Be creative with use-cases 🙂

Slack integration points

Incoming Webhooks are a simple way to post messages from external sources into Slack. They make use of normal HTTP requests with a JSON payload, which includes the message and a few other optional details described later.

JSON, HTTP request… this sounds doable with XPages! So what are the steps you must take?

Setup your integration

Go to http://yourteam.slack.com/apps/build/custom-integration and click on Incoming Webhooks, then select a channel or user you want to post your messages to.

Setup your message

You have two options for sending data to the Webhook URL above:

  • Send a JSON string as the payload parameter in a POST request
  • Send a JSON string as the body of a POST request

Simple message

For a simple message, your JSON payload could contain a text property at minimum. This is the text that will be posted to the channel e.g.:

payload={"text": "This is a line of text in a channel.\nAnd this is another line of text."}

You can decorate your message with text formatting. You will find descriptions in the custom integration page on Slack.

Message attachments

To display a richly-formatted message attachment in Slack, you can use the same JSON payload as above, but add in an attachments array. Each element of this array is a hash containing the following parameters:

{
	"fallback": "Required text summary of the attachment that is shown by clients that understand attachments but choose not to show them.",

	"text": "Optional text that should appear within the attachment",
	"pretext": "Optional text that should appear above the formatted data",

	"color": "#36a64f", // Can either be one of 'good', 'warning', 'danger', or any hex color code

	// Fields are displayed in a table on the message
	"fields": [
		{
			"title": "Required Field Title", // The title may not contain markup and will be escaped for you
			"value": "Text value of the field. May contain standard message markup and must be escaped as normal. May be multi-line.",
			"short": false // Optional flag indicating whether the `value` is short enough to be displayed side-by-side with other values
		}
	]
}

Send the message

With a simple post request you send the message in JavaScript:

function postMessageToSlack(url){
webhook_url = url;
payload= JSONStr;
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('POST', webhook_url, false);
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.send(payload);
}

XSnippet

This whole approach I have added as an XSnippet on OpenNTF:

https://openntf.org/XSnippets.nsf/snippet.xsp?id=slack-integration

You can customize it to your needs. Basically I have a script block and a button on a custom control. Via the Property Definition tab you can set the desired values. In my example I am sending a message to a Slack channel about a picture / document in my Bildr application (shameless plug).

Here is how the message could look like:

sample_slack_message

Since my XPages app is running on a local development machine it is of no use to send sampel thumbnails of the page, but I could. This also refers to the user icon, which could be the icon of the application.

So grab the snippet and start integrating your XPages with Slack (untill Toscana arrives) !

FYI: I am not aware of any restrictions on the number of message you may send to Slack. Please let me know if you have details on this.

Add 20 years of experience to your workforce

You can 20 years of experience within IBM Notes and Web development to your workforce by hiring me.

Interested? Read my curriculum vitae on LinkedIn: http://www.linkedin.com/in/patrickkwinten and get in contact.

I am happy to work WITH you !

 

Update on my Cloudant sample XPages application

I made some additions to my XPages sample app that I am using to understand and demonstrate the usage of IBM Cloudant within XPages.

I am not fully there yet where I want to be, but it is a work in progress. During development I noticed a couple of things:

  • Cloudant’s Lite Pricing Plan has its limitations 🙂
  • Migrating Notes documents to Cloudant goes fast enough. A set of 10 thousands of simple, small documents takes just a couple of seconds.
  • Loading the same amount of documents into XPages e.g. a Repeat Control and navigate between sets via a Pager control has some delay time. This could be due the limitations of my local application server.

The code is available on Github.

cloudant_progress