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