Genii Weblog

A bigger boat: growing the vision for Domino development

Thu 2 Apr 2020, 04:34 PM



by Ben Langhinrichs
Inline GIF image
 
In this classic scene from Jaws, police chief Martin Brody already knows he is facing a dangerous creature, but when the great white shark finally appears, he realizes has been thinking on the wrong scale. Over the years, the phrase, "You're gonna need a bigger boat" has become a popular way of saying that you have underestimated the problem.
 
HCL is doing wonderful things with Domino, building an infrastructure made for today's world, and especially today's web. But the folks at Iris and later Lotus realized early on that you could build the best platform in the world, but it wouldn't do you any good if people couldn't build their business apps on it. They went all in on APIs to make it possible to do fantastic things, well ahead of the competition. But the competition has had a lot of time to improve. Look around at Microsoft and Google and Amazon and a hundred other smaller tech companies, and you realize that if Domino is going to carve out a place in this world, we need a bigger boat.
 
We at Genii Software have a vision for a comprehensive set of functionality that transcends the traditional Domino development framework. We are not competing with HCL, and won't hesitate to piggyback off of their technology where we can. The goal is not to beat HCL, but to enhance the development landscape along with them for all our sakes. Basically, we want to build a bigger boat together with HCL and other partners.
 
This very brief demo shows a first look at our Exciton Power offering, in beta now. This is a Node.js module with (currently) six classes, over two hundred methods, and over 150 properties, all allowing you to build kick butt business apps combining the wealth of Node.js modules with the power and security of Notes/Domino. If you've seen my recent demos, you'll recognize the functionality shown here, but in JavaScript instead of LotusScript. The code below the demo should look very familiar to those who know and love the Midas LSX, but this is more than a Midas port to JavaScript, and it goes far beyond rich text, including form/view/etc. design, data mining, high fidelity rendering, and more. All available to work with both local and server-based databases using the traditional Notes security model, whether your Notes ID is local or in the ID Vault. Oh yes, and you'll notice the demo is in Notes 9.0.1. Exciton Power is built to work with Notes/Domino 8.5.x/9.x/10.x/11.x on both 32-bit and 64-bit Windows and 32-bit and 64-bit Linux. If you need to build a Node.js app for a Domino customer, you don't want to worry what version or OS they are on. You want to meet them where they are, and then take them where you are going.
 
 
If you would be interested in participating in the Exciton beta, or even if you just have questions, contact me by e-mail at 
 
Source Code for demo:
Let's take a quick look at the code. I am using the really basic approach to fulfilling the HTTP request, but you obviously can grab the results of the GET however you like. Just make sure it is a JSON text stream when it is passed to the methods. (This is a first look of the beta, so don't count on everything being exactly like this.) Not bad for 47 lines of code, eh?
 
const https = require('https');
const useExcitonPower = require('./build/debug/ExcitonPower32');

// *** Initiate a session
const gs = useExcitonPower();

// *** Connect to a rich text item
const rtitem = gs.useGRTItem();
rtitem.connect('', 'UseCases.nsf', '2E92311B5BB4CB168525853D0016F8E5', 'Body', true);
const rtchunk = rtitem.useGRTChunk(rtitem);
rtchunk.defineChunk(rtitem, "Everything");

// *** Define the properties to access the data
const props = "AsTable='horizontal' AsObjectArray='yes' TitleFont='Bold #004080' TableWidth='Fit with margins'";
const col1props = "Text='' TextFont='Bold #004080'";
const col2props = "Text='' TextFont='-Bold #084000'";

// Add the first tab with data about how many tests have been run
https.get('https://covid19-server.chrismichael.now.sh/api/v1/TestsinUS', (resp) => {
  let data = '';
  // A chunk of data has been recieved.
  resp.on('data', (chunk) => {
    data += chunk;
  });

 // The whole response has been received. Add the internal table to tab 1
 resp.on('end', () => {

  // *** Add the title, and make everything Verdana to look better
  rtchunk.setFont("Plain 10pt Default Sans Serif");
  console.log("Adding tabbed table with two tabs.");
  rtchunk.appendTable(1, 1, "RowDisplay='Tabbed' TabFont='14pt Bold' BorderEffects='Drop_Shadow'",
          "CellColor='RGB227,234,240' TabLabel='COVID-19 Testing' Width=4");
  rtchunk.zoomIn("Table 1");
  rtchunk.appendRow(false, 1, "CellColor='RGB227,234,240' TabLabel='World Stats'");
  rtchunk.zoomOut();
  
  // *** Appends the fields to the form and save
  rtchunk.zoomIn("Table 1; Row 1; Inside column 1");
  console.log("Adding nested table inside first tab with Testing stats from one REST API call.");
  rtchunk.appendFieldsWithJSON(data, props+" ChildOf='tests.table'", col1props, col2props);
  rtchunk.zoomOut();

  // Add the second tab with data about how many tests have been run in the U.S.
  https.get('https://covid19-server.chrismichael.now.sh/api/v1/AllCasesInAmerica', (resp) => {
    data = '';
  
    // A chunk of data has been recieved.
    resp.on('data', (chunk) => {
      data += chunk;
    });
  
    // The whole response has been received. Add the internal table to tab 1
    resp.on('end', () => {
    
    // *** Appends the fields to the form and save
    rtchunk.zoomIn("Table 1; Row 2; Inside column 1");
    console.log("Adding nested table inside second tab with World stats from a different REST API call.");
    rtchunk.appendFieldsWithJSON(data, props+" ChildOf='data.table'", col1props, col2props);
    rtchunk.zoomOut();
  
    rtitem.save();
    console.log("Document saved");
  });

  }).on("error", (err) => {
    console.log("Error: " + err.message);
  });
  
});

}).on("error", (err) => {
  console.log("Error: " + err.message);
});

 
 

Copyright © 2020 Genii Software Ltd.

What has been said:

No documents found