OliverBusse
We4ITGmbH
aveedo.com
@zeromancer1972
oliverbusse.com
2015‑2018
Node.js&
DominoQueryLanguage
DNUGFachgruppentagDevelopment
Essen,20.Februar2019
Agenda
WasistNode.js?
Node.jsinDomino
Sinn&Zweck,Hürden
MeineersteNodeAppmitDomino
DominoQueryLanguage(DQL)
Baustellen
Low‑Code
Fazit
Community
2
WasistNode.js?
Server‑SideJavascriptPlattform
BasierendaufGooglesJavascriptV8Engine
Non‑blockingThread‑>skalierbar
verfügbarfüralleSysteme(Windows,Linux,Mac,ARM,...)
Asynchron
PackageManagement
weitverbreitet
3
Node.jsinDomino
Domino10.0.1
DominoAppDevPack(Linux)
PROTONTask
gRPC(https://grpc.io/about/)
IAM(IdentityAccessManagement)‑Service&Client(preview)
keinBestandteilvonDDE!
4
Node.jsinDomino‑Schema
5
ProtonSetup(1)
ProtonAddinaufServerkopieren
cd /opt/ibm/domino/notes/latest/linux
sudo tar -xvf /tmp/proton-addin-<version>.tgz
ggf.CertifierundKeyringerzeugen(fürIAM)
notes.iniEinträgeeinfügen
# listen on all ip addresses, otherwise define machine's ip
PROTON_LISTEN_ADDRESS=0.0.0.0
# listen on port - free to choose
PROTON_LISTEN_PORT=3002
# use SSL
PROTON_SSL=1
# client certificate authorization, default: anonymous
PROTON_AUTHENTICATION=client_cert
# keyfile, can be the keyfile of SSL enabled HTTP task
PROTON_KEYFILE=proton.kyr
6
ProtonSetup(2)
Taskautomatischmitstarten
ServerTasks=Replica,Router,Update,AMgr,
Adminp,Sched,CalConn,RnRMgr,HTTP,proton
odermanuell
load proton
7
Sinn&Zweck,Hürden
Ergänztbzw.ersetztDAS
EntwicklungvonWeb‑ApplikationenjenseitsXPagesmöglich
Cloud‑ready
DominoistdamitoffenfürFullstackWebDeveloper
Nachwuchs?
Setupsehrkomplex(IAM,DominoalsOAuthProvider)
Unfertig(StandFeb.2019)
esfehlenAssistenten/ScriptsfürAdmins&Entwickler
Dokumentationvorhanden,jedoch"Luftnachoben"
8
MeineersteNodeAppmitDomino
Node.js
npm
domino‑dbPackage
Protonup&running
Editor
9
demo1
DominoQueryLanguage(DQL)
Datenbankenvorbereiten‑>Designcatalog
load updall <database> -e (enable)
load updall <database> -d (refresh)
UPDATE_DESIGN_CATALOG=1
VefügbarfürNode.js,Java,Lotusscript&Konsole*
Java&LS:gleicherServeroderlokaleReplik(10erClient),allerdingsnichtgemischt
Vereinfacht:kombiniertVorteilevonViewIndex&FTSearch
Sehrschnell
*)zumTestengut,liefertaberkeineverwertbareErgebnisse
11
DQL‑Sprachunterschiede
Node.js
const docs = await database.bulkReadDocuments({
query: "form = 'person' and lastname in ('Smith', 'Douglas')",
itemNames: ["lastname", "firstname"]
});
Java
DominoQuery dq = database.createDominoQuery();
DocumentCollection col =
dq.execute("form = 'person' and lastname in ('Smith', 'Douglas')");
Lotusscript
Dim dq As NOTESDOMINOQUERY
Set dq = database.CreateDominoQuery
Dim col As NotesDocumentCollection
Set col = _
dq.Execute(|form = 'person' and lastname in ('Smith', 'Douglas')|)
12
DQL‑Suchoptionen
SuchenachEinzelwerten
form = 'person'
SuchenachMehrfachwerten
lastname in ('Smith', 'Doe')
SuchenachDatumundDatumsbereichen
@dt('2019-02-20') > lastModified > @dt('2019-01-01')
SuchenachWertenundWertebereichen
45 > age > 19
Operatoren
= | > | >= | < | <= | in [all]
and | or | and not | or not
13
DQL‑Strategien
Nutzender"Explain"Funktion
testetnur,fürtnichtsaus
Query Processed:
[form = 'post' and postTags in ('dnug')]
0. AND (childct 2) (totals when complete:)
Prep 0.0 msecs, Exec 12.30 msecs, ScannedDocs 5,
Entries 0, FoundDocs 5
1.form = 'post' NSF document search estimated cost = 100
Prep 2.274 msecs, Exec 0.758 msecs, ScannedDocs 5
Entries 0, FoundDocs 5
1. IN (childct 1) (totals when complete:)
Prep 0.0 msecs, Exec 11.259 msecs, ScannedDocs 802,
Entries 0, FoundDocs 5
2.postTags = 'dnug' NSF document search
estimated cost = 100
Prep 0.201 msecs, Exec 11.180 msecs,
ScannedDocs 802, Entries 0, FoundDocs 5
14
demo2&demo3
Baustellen(Feb2019)
keinRichtext/MIMEundAttachments(Node.js)
wederlesendnochschreibend
Felder,dieimResultsetenthaltenseinsollen,müssen
definiertwerden(Node.js)
GraphQLStandardundgrundsätzlichgut,aberes
fehlteineOptionfür"alleFelder"
Dokumentation(IAM,OAuth)
teilweiseverwirrendundnichteindeutig
ProtonTaskschreibtnichtsindielog.nsf
durchnotes.ini‑SettingsaberaufderKonsole"verbose"zuschalten
ProtonbishernurfürLinux
nochkeinTerminfürWindowsbekannt
16
Low‑Code
BasisfürallesrundumIoT
Think2019DemosvonLuisGuirigaymitAlexasindmitNode‑REDgebaut
visuellesProgrammierenmitJavascript(nichtNode.js!)
läuftselbstaufeinemRaspberryPi:‑)
PluginsohneEnde
DominoV10&DQL
IBMWatsonServices
AmazonAlexa
17
Node‑RED
Fazit
Node.js/ProtonistmomentaneinPoC
AufDQLhabenwirlangegewartet
Low‑CodemitNode‑RED
19
Community
Hilfegibtesaufhttps://openntf.slack.comim
dominonodejsChannel
20
Quellen
WebinarDQL&FAQ:https://www.ibm.com/blogs/collaboration‑solutions/2019/02/04/domino‑
query‑language‑faq
DominoAppDevPackDocumentation:
https://doc.cwpcollaboration.com/appdevpack/docs/en/homepage.html
QuickOverview:https://prominic.net/2018/07/02/node‑js‑domino‑v10‑essentials
Node‑RED:https://nodered.org/
Node‑REDDominoV10Nodes:https://github.com/stefanopog/node‑red‑contrib‑dominodb
Vortrags‑Repository:https://gitlab.com/obusse/dnug_fachgruppe_dev
21
DNUG Development Day 2019
DNUG Development Day 2019

DNUG Development Day 2019