Blog

Engage 2018

  |   Blog   |   1 Comment

Later this month I will be speaking at Engage, delivering the session that John Jardin and I gave at IBM Think, “Tips and Tricks: Domino and JavaScript Development Masterclass”. As ever, Engage looks to be a major conference on the ICS calendar, with a very strong and interesting agenda. The direction that community sessions have taken is not a surprise and follows on from last year’s conference. In my opinion, it seems to confirm that IBM/HCL and the community are following a similar track on where they see app dev going in the context of needing to grow the platform. There are still XPages sessions and XPages is still, from my experience, my quickest web app dev framework. But there are a lot of sessions are looking beyond traditional Domino development approaches. It’s an area Domino developers are probably less experienced in. Certainly I was until the last couple of years. And they are topics where there is a big learning curve for Domino developers and not as many materials available that are specifically aimed at our audience. (For XPages, there are a host of sessions on NotesIn9, TLCC webinars, SlideShare etc and many of those speakers will also be at Engage if you have specific follow-up questions.)

It’s particularly good to deliver this session at Engage, because the REST service uses Java APIs to manage the Domino NSF setup completely in Java code, without needing to develop in Domino Designer. It’s something I first put forward as an ambition at Engage last year, so it’s good to come back a year later and show it completely in action. Personally, I don’t have any major issues with Domino Designer. But if you do, this shows the alternatives that are available if you dig a little deeper. And although this is Java, if the APIs are exposed to REST there’s no reason why this couldn’t be a future approach for JavaScript development. My expectations are that this will become part of the npm modules that are part of the core Domino server in the future, technically it’s not a challenge, the challenge is a security one – how to ensure they cannot be misused by those who are unauthorised.

In the time since IBM Think I’ve finally dug deep into React to understand how the JavaScript application is constructed and glued via the JavaScript web sockets server and Node-RED to Domino. To cement my knowledge I did some React tutorials and then went through the app in detail, documenting the code. Personally, I find this method extremely useful to help verify my learning and teach me more about an actual app. Tutorials do a good job of making something seem easy. But they often omit aspects that become critical when you try to start your first proper project. That was the case for XPages (thank goodness for Declan Lynch’s blog series!). I encountered the same problems when looking at other frameworks and databases some time ago – how to best apply them to Domino or glue them together coming from a Domino background was frustrating and led to a lot of dead-ends. This application uses React, Redux for internal state management, web sockets for two-way communication, and webpack to compile. It’s a lot more complicated than a typical tutorial application, but closer to “production-ready” (though still with some limitations). Personally I think that’s very important for “deep dive” conference sessions, to bridge the gap between theory and practice. Most of my sessions have tended to draw from experience of production or feed into production projects. And this app certainly gives me a lot that would be appropriate for a production application.

Since IBM Think the demo app has also shown its extensibility, one of the key reasons for building it in this way. Frank van der Linden submitted a pull request for a REST service in Spring Boot instead of Domino, writing to a Cloudant database instead of an NSF. This would allow the same JavaScript application to run in non-Domino environments, giving it greater flexibility. The REST service could probably be manipulated fairly easily to integrate with Connections Activities. An interesting follow-up would be to have an XPages front-end talking via REST services to both the Domino REST service and the Cloudant REST service. Of course another extension would be to rewrite the Domino REST service using DominoDB NodeJS classes, once Domino 10 is available. This is the benefit of the microservices approach. That, because it’s not tightly coupled, that change would be self-contained, easy to test, low impact and easy to switch over. But it’s not just about a different complete interface to the application, as I’ll show in the session.

AUTHOR - Paul Withers

Paul Withers is an IBM Lifetime Champion, has been an OpenNTF Board Member since 2013, has worked with Domino since R4.5, XPages since 2009, co-authored XPages Extension Library and was technical editor for Mastering XPages 2nd Edition. He is one of the developers on OpenNTF Domino API as well as contributor to a variety of other OpenNTF projects. For full bio, see https://paulswithers.github.io/professional/

1Comment

Post A Comment