Ben Langhinrichs

Photograph of Ben Langhinrichs

E-mail address - Ben Langhinrichs







Recent posts

Wed 25 Mar 2020

From REST to Notes db in two seconds



Thu 19 Mar 2020

Mind the Gap - A mid-level development manifesto



Thu 19 Mar 2020

High value methods: AppendFieldsWithJSON


March, 2020
SMTWTFS
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

Have your say:

Name *:
E-mail:
e-mail addresses will not be displayed on this site
Comment *:


<HTML is not allowed>
Linking: Add links as {{http://xxx|title}}, and they will be activated once approved
Blocked? Unable to post a comment? Please read this for a possible explanation...