Ben Langhinrichs

Photograph of Ben Langhinrichs

E-mail address - Ben Langhinrichs

Recent posts

Tue 19 May 2020

An unladen user

Thu 7 May 2020

Can we get a huzzah for updated Domino Limits?

Wed 29 Apr 2020

A bigger boat: when in Rome

July, 2020
   01 02 03 04
05 06 07 08 09 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Search the weblog

Genii Weblog

From REST to Notes db in two seconds

Wed 25 Mar 2020, 01:51 PM

by Ben Langhinrichs
A few days ago, Karl-Henry Martinsson (aka "TexasSwede") wrote an excellent post showing how you could use the new JSON classes in LotusScript to retrieve current state date on the pandemic. I encourage you to read it, and to see how the classes work and can be used with any JSON data, usually derived from a REST API.
As I have been talking about high value methods, I thought I'd show how chaining a few together can take the JSON result of a REST API from almost any system out there that provides one, and turn it into a Notes db with a minimum of effort. But rather than a simple drab form, I show how you can make the form look good and be more functional. 
A few advantages to this approach:
1) You don't have to learn almost anything about JSON;
2) You don't have to build a custom script for each REST API;
3) You can get down-and-dirty with the business logic, not the logistics.
4) You can develop a spiffy (or corporate-approved) look-and-feel to use over and over
5) You can even use this in Notes 9 (with slight changes to get the data)  because your company is slower than the last hour before quitting time.
If you want to skip to the demo, here it is. I'll show the code below it.
I'll show the more complex agent first, then the simpler agent.
Final agent:
Inline JPEG image
Simpler agent:
Inline JPEG image
You can see the images in higher resolution by view them by themselves.

Copyright 2020 Genii Software Ltd.

What has been said:

No documents found