SlideShare a Scribd company logo
Suche senden
Hochladen
The NERD stuff - opening for Domino to the modern web developer
Melden
Teilen
Oliver Busse
Senior ICS Consultant & Software Architect bei We4IT Group um We4IT Group
Folgen
•
3 gefällt mir
•
650 views
1
von
49
The NERD stuff - opening for Domino to the modern web developer
•
3 gefällt mir
•
650 views
Melden
Teilen
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Software
Presentation from Engage 2019 at AutoWorld in Brussels by Jan Krejcarek & Oliver Busse
Mehr lesen
Oliver Busse
Senior ICS Consultant & Software Architect bei We4IT Group um We4IT Group
Folgen
Recomendados
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive... von
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios
1.1K views
•
69 Folien
Nagios Conference 2012 - Mike Weber - NRPE von
Nagios Conference 2012 - Mike Weber - NRPE
Nagios
1.9K views
•
44 Folien
Introduction to node.js By Ahmed Assaf von
Introduction to node.js By Ahmed Assaf
Ahmed Assaf
198 views
•
41 Folien
Node js von
Node js
Chirag Parmar
2.9K views
•
28 Folien
Артем Маркушев - JavaScript von
Артем Маркушев - JavaScript
DataArt
681 views
•
35 Folien
Abhishek_Kumar von
Abhishek_Kumar
Abhishek Kumar
112 views
•
8 Folien
Más contenido relacionado
Similar a The NERD stuff - opening for Domino to the modern web developer
Day In A Life Of A Node.js Developer von
Day In A Life Of A Node.js Developer
Edureka!
1.2K views
•
23 Folien
PHP QA Tools von
PHP QA Tools
rjsmelo
2.1K views
•
21 Folien
OSDC.no 2015 introduction to node.js workshop von
OSDC.no 2015 introduction to node.js workshop
leffen
341 views
•
28 Folien
Zend Framework Foundations von
Zend Framework Foundations
Chuck Reeves
668 views
•
78 Folien
MeaNstack on Docker von
MeaNstack on Docker
Daniel Ku
1.9K views
•
54 Folien
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv von
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Aleksey Asiutin
213 views
•
41 Folien
Similar a The NERD stuff - opening for Domino to the modern web developer
(20)
Day In A Life Of A Node.js Developer von Edureka!
Day In A Life Of A Node.js Developer
Edureka!
•
1.2K views
PHP QA Tools von rjsmelo
PHP QA Tools
rjsmelo
•
2.1K views
OSDC.no 2015 introduction to node.js workshop von leffen
OSDC.no 2015 introduction to node.js workshop
leffen
•
341 views
Zend Framework Foundations von Chuck Reeves
Zend Framework Foundations
Chuck Reeves
•
668 views
MeaNstack on Docker von Daniel Ku
MeaNstack on Docker
Daniel Ku
•
1.9K views
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv von Aleksey Asiutin
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Aleksey Asiutin
•
213 views
SWT Tech Sharing: Node.js + Redis von Infinity Levels Studio
SWT Tech Sharing: Node.js + Redis
Infinity Levels Studio
•
1.5K views
ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel) von ZFConf Conference
ZFConf 2012: Zend Framework 2, a quick start (Enrico Zimuel)
ZFConf Conference
•
3.9K views
NodeJS : Communication and Round Robin Way von Edureka!
NodeJS : Communication and Round Robin Way
Edureka!
•
2.9K views
"JavaME + Android in action" CCT-CEJUG Dezembro 2008 von Vando Batista
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
Vando Batista
•
1.3K views
Zend Framework 2 quick start von Enrico Zimuel
Zend Framework 2 quick start
Enrico Zimuel
•
9.6K views
Node.js with Express von Gergely Németh
Node.js with Express
Gergely Németh
•
2.2K views
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio... von Olivier Destrebecq
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
Olivier Destrebecq
•
620 views
Debugging PHP with xDebug inside of Eclipse PDT 2.1 von Bastian Feder
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Bastian Feder
•
6K views
Node.js Build, Deploy and Scale Webinar von jguerrero999
Node.js Build, Deploy and Scale Webinar
jguerrero999
•
622 views
Inside neutron 2 von Robin Gong
Inside neutron 2
Robin Gong
•
15.4K views
Develop microservices in php von Zend by Rogue Wave Software
Develop microservices in php
Zend by Rogue Wave Software
•
1.8K views
Front matter: Next Level Front End Deployments on OpenShift von Lance Ball
Front matter: Next Level Front End Deployments on OpenShift
Lance Ball
•
95 views
NetWeaver Developer Studio for New-Beas von Chander445
NetWeaver Developer Studio for New-Beas
Chander445
•
1.8K views
How to Manage Cloud Infrastructures using Zend Framework von Zend by Rogue Wave Software
How to Manage Cloud Infrastructures using Zend Framework
Zend by Rogue Wave Software
•
1K views
Más de Oliver Busse
HCL Domino Volt - der NSF Killer? von
HCL Domino Volt - der NSF Killer?
Oliver Busse
142 views
•
43 Folien
Outlook becomes a Team Player - with a clever add-in von
Outlook becomes a Team Player - with a clever add-in
Oliver Busse
116 views
•
26 Folien
DNUG Development Day 2019 von
DNUG Development Day 2019
Oliver Busse
376 views
•
23 Folien
DNUG44 Watson Workspace von
DNUG44 Watson Workspace
Oliver Busse
255 views
•
24 Folien
Paradiesisch - OpenNTF von
Paradiesisch - OpenNTF
Oliver Busse
269 views
•
38 Folien
Find your data von
Find your data
Oliver Busse
962 views
•
20 Folien
Más de Oliver Busse
(20)
HCL Domino Volt - der NSF Killer? von Oliver Busse
HCL Domino Volt - der NSF Killer?
Oliver Busse
•
142 views
Outlook becomes a Team Player - with a clever add-in von Oliver Busse
Outlook becomes a Team Player - with a clever add-in
Oliver Busse
•
116 views
DNUG Development Day 2019 von Oliver Busse
DNUG Development Day 2019
Oliver Busse
•
376 views
DNUG44 Watson Workspace von Oliver Busse
DNUG44 Watson Workspace
Oliver Busse
•
255 views
Paradiesisch - OpenNTF von Oliver Busse
Paradiesisch - OpenNTF
Oliver Busse
•
269 views
Find your data von Oliver Busse
Find your data
Oliver Busse
•
962 views
ISBG 2016 - XPages on IBM Bluemix von Oliver Busse
ISBG 2016 - XPages on IBM Bluemix
Oliver Busse
•
616 views
GraphDb in XPages von Oliver Busse
GraphDb in XPages
Oliver Busse
•
785 views
Utilizing the OpenNTF Domino API von Oliver Busse
Utilizing the OpenNTF Domino API
Oliver Busse
•
912 views
Utilizing the open ntf domino api von Oliver Busse
Utilizing the open ntf domino api
Oliver Busse
•
782 views
XPages on Bluemix - the Do's and Dont's von Oliver Busse
XPages on Bluemix - the Do's and Dont's
Oliver Busse
•
1.4K views
Utilizing the OpenNTF Domino API von Oliver Busse
Utilizing the OpenNTF Domino API
Oliver Busse
•
3.2K views
SUTOL 2015 - Utilizing the OpenNTF Domino API von Oliver Busse
SUTOL 2015 - Utilizing the OpenNTF Domino API
Oliver Busse
•
1.1K views
Out of the Blue - the Workflow in Bluemix Development von Oliver Busse
Out of the Blue - the Workflow in Bluemix Development
Oliver Busse
•
3.2K views
Transformations - a TLCC & Teamstudio Webinar von Oliver Busse
Transformations - a TLCC & Teamstudio Webinar
Oliver Busse
•
1.3K views
Transformations von Oliver Busse
Transformations
Oliver Busse
•
1K views
Out of the Blue: Getting started with IBM Bluemix development von Oliver Busse
Out of the Blue: Getting started with IBM Bluemix development
Oliver Busse
•
1.7K views
Fix & fertig: Best Practises für "XPages-Migranten" von Oliver Busse
Fix & fertig: Best Practises für "XPages-Migranten"
Oliver Busse
•
1.7K views
Dnug 112014 modernization_openn_ntf_ersatzsession von Oliver Busse
Dnug 112014 modernization_openn_ntf_ersatzsession
Oliver Busse
•
931 views
DNUG 38: "Einen Rahmen schaffen: Vorteile durch Frameworks in der Domino-Webe... von Oliver Busse
DNUG 38: "Einen Rahmen schaffen: Vorteile durch Frameworks in der Domino-Webe...
Oliver Busse
•
643 views
Último
Playwright Retries von
Playwright Retries
artembondar5
7 views
•
1 Folie
Agile 101 von
Agile 101
John Valentino
13 views
•
20 Folien
Mobile App Development Company von
Mobile App Development Company
Richestsoft
5 views
•
6 Folien
Chat GPTs von
Chat GPTs
Gene Leybzon
13 views
•
36 Folien
predicting-m3-devopsconMunich-2023.pptx von
predicting-m3-devopsconMunich-2023.pptx
Tier1 app
10 views
•
24 Folien
Introduction to Git Source Control von
Introduction to Git Source Control
John Valentino
8 views
•
18 Folien
Último
(20)
Playwright Retries von artembondar5
Playwright Retries
artembondar5
•
7 views
Agile 101 von John Valentino
Agile 101
John Valentino
•
13 views
Mobile App Development Company von Richestsoft
Mobile App Development Company
Richestsoft
•
5 views
Chat GPTs von Gene Leybzon
Chat GPTs
Gene Leybzon
•
13 views
predicting-m3-devopsconMunich-2023.pptx von Tier1 app
predicting-m3-devopsconMunich-2023.pptx
Tier1 app
•
10 views
Introduction to Git Source Control von John Valentino
Introduction to Git Source Control
John Valentino
•
8 views
Introduction to Maven von John Valentino
Introduction to Maven
John Valentino
•
7 views
Benefits in Software Development von John Valentino
Benefits in Software Development
John Valentino
•
6 views
Electronic AWB - Electronic Air Waybill von Freightoscope
Electronic AWB - Electronic Air Waybill
Freightoscope
•
6 views
Page Object Model von artembondar5
Page Object Model
artembondar5
•
7 views
Flask-Python von Triloki Gupta
Flask-Python
Triloki Gupta
•
10 views
.NET Deserialization Attacks von Dharmalingam Ganesan
.NET Deserialization Attacks
Dharmalingam Ganesan
•
7 views
Automated Testing of Microsoft Power BI Reports von RTTS
Automated Testing of Microsoft Power BI Reports
RTTS
•
11 views
nintendo_64.pptx von paiga02016
nintendo_64.pptx
paiga02016
•
7 views
predicting-m3-devopsconMunich-2023-v2.pptx von Tier1 app
predicting-m3-devopsconMunich-2023-v2.pptx
Tier1 app
•
14 views
The Path to DevOps von John Valentino
The Path to DevOps
John Valentino
•
6 views
ADDO_2022_CICID_Tom_Halpin.pdf von TomHalpin9
ADDO_2022_CICID_Tom_Halpin.pdf
TomHalpin9
•
6 views
Understanding HTML terminology von artembondar5
Understanding HTML terminology
artembondar5
•
8 views
FOSSLight Community Day 2023-11-30 von Shane Coughlan
FOSSLight Community Day 2023-11-30
Shane Coughlan
•
8 views
Winter Projects GDSC IITK von SahilSingh368445
Winter Projects GDSC IITK
SahilSingh368445
•
416 views
The NERD stuff - opening for Domino to the modern web developer
1.
De07 TheNERDstuff:openingDominotothe modernwebdeveloper JanKrejcarek PPFbanka(CZ) @jan_krejcarek OliverBusse We4IT(D) @zeromancer1972
2.
Agenda Spoiler:NERD=Node.js,Express,React,Domino Node.jsintroduction AppDevPack Proton,DesignCatalog&DQL Development,Testing,Deployment CRUDdemo Securityoptions GettingHelp Resume:why? Q&A Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
3.
Node.jsintroduction Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
4.
Node.jsisNOTaserver Butyoucancodeone Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
5.
Simplestserverexample const http =
require('http'); const server = http.createServer((req, res) => { res.statusCode = 200; res.setHeader('Content-Type', 'text/plain'); res.write(new Date().toISOString()); res.end(); }); server.listen({port:8080}, () => { console.log("listening") }); Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
6.
FrameworksforNode.jswebapps Express Koa Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
7.
Expressbasicprinciple Codefortheendpoint: router.get('/certificates/expiring/:someDate?', async (req,
res, next) => { let d = null; if (typeof req.params.someDate != 'undefined') { d = parse(req.params.someDate); } else { d = addMonths(endOfDay(new Date()), 3); } try { var docs = await dao.getCertificatesExpiringBefore(d); res.json(docs); } catch (error) { res.status(500).json({error:error.message}) } }) Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
8.
DominoAppDevPack Standalonedistribution(partnumberCC0NGEN) NotpartoftheNotes/Dominoinstallationpackage NotsupportedinDominoDesigner(whichisgood) AvailableforDominoonLinuxandWindows(sincev1.0.1,March26,2019) Quarterlyreleases Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
9.
ContentoftheAppDevPack Protonservertask DominoDBmoduleforNode.js(notavailableonnpmjs.org,yet) Demoapplicationwithdata Documentation Installationprocedure APIdocumentation DominoQueryLanguagesyntax IAMexamples Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
10.
Protonschema Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
11.
Protontaskinstallation Copythe"proton"filetotheDominoprogramdirectory Add"Proton"totheServerTasksvariableinnotes.initostarttheProton taskwhenDominostarts ConfiguretheProtonusingnotes.inivariables: PROTON_LISTEN_ADDRESS=0.0.0.0 Listensonallavailablenetworkinterfaces PROTON_LISTEN_PORT=30000 TCP/IPporttouse PROTON_SSL=1 UseTLSforcommunication PROTON_KEYFILE=server.kyr CanbethesameDominoalreadyusesforTLS PROTON_AUTHENTICATION=client_cert AuthenticateNode.jsappsusingacertificate Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
12.
Recommendedsettingforproduction Encryptthecommunication Authenticateapplicationsusingacertificate Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
13.
Three‑tierarchitecture BymovingapplicationlogictoNode.jsandthepresentationlogictothe browserweareactuallymovingtoathree‑tierarchitecturewhereDomino functionsasastorage Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
14.
Proton Three‑tierarchitecture Inthatcaseuserswillbeauthenticatedbytheapplicationlayer(Node.js) andtheNode.jsapplicationwilluseanotheraccounttoaccessthedata Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
15.
Proton Howitworks ProtonseesNode.jsapplicationconnectingusingDominoDBmoduleasa userwithcertainrights Alloperationsondataareexecutedundertheauthorityofthisuser ThisusersneedssufficientrightsintheACLofthedatabaseituses ItistheNode.jsapplication'stasktoensurecorrectaccesstodatatoits users Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
16.
Proton Authenticatingusingacertificate Node.jsapplicationusingDominoDBneedstohaveaPersondocumentin theDominoDirectory ItalsoneedsanX.509certificateandholdtheprivatekeytothatcertificate ThecertificateneedstobeloadedtothePersondocument ImportInternetCertificateactiononthePersondocument ThenameinthePersondocumentmustcorrespondtothesubject's commonnamefromthecertificate TheuserneedstohaveaccesstothedatabaseviaACL Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
17.
Persondocumentfortheapplication Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
18.
ACLrecordinthedatabase Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
19.
RunningProton commandontheDominoserverconsole:loadproton Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
20.
DesignCatalog,DQL domino‑dbmoduleloadsacollectionofdocumentsbyrunningaDQL query. DesignCatalogisneededforDQLtoworkproperly. Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
21.
DesignCatalog,DQL Addadatabasetothecatalog: load updall <database
path> -e Updateadatabaseinthecatalogwhenthedesignchanges: load updall <database path> -d Whentheupdatefails: runtheupdallagainwiththe‑eflag: Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
22.
DQLFacts1/3 DQLscansalimitednumberofdocumentsandviewentries(200000) increaseitwithanotes.inisetting(systemwide) QUERY_MAX_DOCS_SCANNED QUERY_MAX_VIEW_ENTRIES_SCANNED DQLqueryrunsforalimitedtime(2minutes) rethinkyourdesign Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
23.
DQLFacts2/3 ProtonreturnstheresultssortedbyNoteIDandreturnsonlyasubsetofthe results(max200). Youhavetoloadallresultsandsortthemyourself SortingshouldbeavailableinDomino11 Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
24.
DQLFacts3/3 "Mindthegap" DQLqueryneedsspacesaroundoperators,valuesanditemnames 'Cards'.Subtypes ='Beast' ERR_BAD_REQUEST:Queryisnotunderstandable‑syntaxerror‑MUSThaveat leastoneoperator UsetheexplainQuery()methodtoanalyzeyourqueriesandoptimizethem ['Cards'.Subtypes =
'Beast' AND 'Cards'.ConvertedManaCost > 4] 0. AND (childct 2) (totals when complete:) Prep 0.0 msecs, Exec 71.428 msecs, Sc 1.'Cards'.Subtypes = 'Beast' View Column Search estimated cost = 5 Prep 0.326 msecs, Exec 3.506 msecs, ScannedDocs 0, Entries 248, FoundDocs 1.'Cards'.ConvertedManaCost > 4 View Column Search estimated cost = 10 Prep 0.112 msecs, Exec 67.915 msecs, ScannedDocs 0, Entries 4482, FoundDoc Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
25.
Settingupyourdevelopmentenvironment (1) InstallNode.jsruntime(Win,Mac,Linux) Grabyourfavoriteeditor(VSCoderecommended) Inittheproject mkdir myProject cd myProject npm
init Addthedomino‑dbNodepackagetoyourproject npm install <pathToAppDevPack>/domino-domino-db-1.2.0.tgz -save Startcoding Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
26.
Settingupyourdevelopmentenvironment (2) Checkthepackage.jsonfile itwillalreadycontainthedepencyfordomino/domino‑db addotherdependencies Createthestartjavascriptfile Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
27.
Testing?Sure! Severalunittestpackagesavailable Mocha Tape Chai Sinon Testsaredefinedinseparatefiles Testsareconfiguredinthepackage.jsonfile { "test-unit": "NODE_ENV=test mocha
'/**/*.spec.js'", } Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
28.
Deployment(1) Scenariostoconsider deploytoacloudservicelikeAWS,Azure,IBMCloud,Heroku deploytoon‑premisesenvironment On‑premises Doesyourserverhaveinternetaccesstoinstallpackages? Doesyourserverutilizealoadbalancer? Hotdeploymentornot? UsingaDockercontainer? Usingaproxylikenginx Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
29.
Deployment‑usingaproxy AsNode.jsappscanusedifferentportsyoushouldutilizethemwitha proxytokeeptheURLendpointssimple nginxisalightweightproxyserverwhichiseasytosetup # excerpt from
nginx.conf location /app1 { proxy_pass http://localhost:3001/; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /app2 { proxy_pass http://localhost:3002/; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
30.
Deployment‑ProcessManager(1) Useaprocessmanagertohandleallyourapps Donotstartyourappsmanuallyorwithasystemdscript/service pm2ishighlyrecommended Verysimpletosetup Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
31.
Deployment‑ProcessManager(2) starttheappwiththeprocessmanager pm2 start myApp.js showallappsmanagedbypm2 pm2
ls ┌───────────────────────┬────┬─────────┬──────┬───────┬────────┬─────────┬────────┬──────┬ │ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ ├───────────────────────┼────┼─────────┼──────┼───────┼────────┼─────────┼────────┼──────┼ │ node alexa-node-red │ 11 │ N/A │ fork │ 24488 │ online │ 0 │ 2M │ │ node domino-node-list │ 9 │ N/A │ fork │ 24152 │ online │ 0 │ 2M │ │ node rootweb │ 10 │ N/A │ fork │ 24229 │ online │ 0 │ 2M │ │ node-red │ 0 │ N/A │ fork │ 5463 │ online │ 6 │ 49D │ └───────────────────────┴────┴─────────┴──────┴───────┴────────┴─────────┴────────┴──────┴ Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
32.
Deployment‑ProcessManager(3) savetheappstothelistofbootableapps pm2 save enablepm2tostartallsavedappsatboot pm2 startup AllcommandsarethesameonWin,Mac&Linux Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
33.
domino‑dbmodule Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
34.
domino‑dbclasses Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
35.
domino‑dbmodule providesfourbasicoperationswithdata‑Create,Read,Update,Delete hasasingleentrypoint:userServer()function const { useServer
} = require('@domino/domino-db'); const server = await useServer({hostName: 'localhost', connection:{ port: '30000' }}); Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
36.
domino‑dbcommandlineexample const { useServer
} = require('@domino/domino-db'); const serverConfig = {hostName: 'localhost',connection:{ port: '30000' const databaseConfig = { filePath: 'database/node-demo.nsf' }; (async function() { try { const server = await useServer(serverConfig); const db = await server.useDatabase(databaseConfig); const response = await db.bulkReadDocuments({ query: "'AllContacts'.State = 'FL'", itemNames: ['LastFirstName', 'Email'], computeOptions: { computeWithForm: true } }); console.log(JSON.stringify(response)); } catch (error) { console.log(`${error.code}: ${error.message}`) } })() Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
37.
DEMO‑WebApplication Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
38.
CRUDDetails CalluseServer()andServer::useDatabase()onlyonceandcachethe instancesinacustomDataAccessObject Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
39.
CRUDDetails‑Create Whencreatingadocument,youneedtoprovidethe"Form"property WhenwritingaDateitem,youneedtospecifyitlikethis: DueDate: { type:
'datetime', data: '2019-06-30'} Timeneedstobespecifiedtoahundredthofasecond,youcan'tdirectly useaJavaScriptDateobject YoucanspecifycomputeOptionstocomputeitemsinthedocument Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
40.
CRUDDetails‑Read Youalwaysspecifywhichitemsyouwanttoreceive(keepstheamountof transfereddatalow) usecomputeOptionsparametertocomputethecontentofcomputedfor displayitems const response =
await db.bulkReadDocuments({ query: "'AllContacts'.State = 'FL'", itemNames: ['LastFirstName', 'Email'], computeOptions: { computeWithForm: true } }); Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
41.
CRUDDetails‑Update Selectionofoptionsforupdatingdocuments changeselecteditemsinoneormoredocumentsatonce replaceallitemswithasetofotheritems Documentsareimmediatelysaved,thereisnosave()method Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
42.
SecurityOptions(1) IAM(IdentityAccessManagement)enablesaccessfromaNode.jsappto DominoasarealDNNuser UsesOAuthmechanismtoauthorizeagainstDomino Domino10providesOAuth(kindof) Accessisrestrictedtocertainscopes open_id offline_access das.freebusy das.calendar.read.with.shared das.calendar.write.with.shared CurrentlyIAMdoesnotsupporttheNode.jsAPIforDomino,onlyDAS:‑( Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
43.
SecurityOptions(2) SetupDominoasanOAuthprovideristimeconsuming(expect1workday) Youwillneedtotouchthefollowingareasof(Domino)administration Certificatehandling Keyringgeneration DominowithSSL DominoLDAPconfiguration OAuthDSAPIsetup SetuptheIAMserviceapp(serverpart) CustomizetheIAMserviceapp(optional) Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
44.
SecurityOptions(3) IAMcomeswithexamplesofdifferentauthorizationflows AuthorizationCodeFlow ClientCredentialFlow Theseexamplescanbeusedtointegratethosemechanismtoyourown app(i.e.IAMclientapp) AppsmustberegisteredwiththeIAMserviceapp(generatestheappID andtheappsecret) YouareresponsibleforthetokenhandlingwhenaccessingtheDomino server! Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
45.
GettingHelp/Resume:why? NERDiscompletelydifferentfromtraditionalNotesdevelopment Gettinghelp DominowithNodeisdiscussedintheOpenNTFSlackchanneldominonodejs ReachoutfortheexpertslikeDanDumont,PeiSunorHeikoVoigt(allactiveon Slack) Whyyoushoulduseit? ItopensDominoforthemodernwebdeveloper(newbloodforthebestapp serverintheworld) OfferstonsofnewpossibilitiescomingwithvariousNodemodulesandplugins Usinge.g.Node‑REDdirectstothereallow‑codearea‑butthisiscontentfor separatesessions;‑) Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
46.
Q&A Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
47.
Resources 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 VisualStudioCodeEditor:https://code.visualstudio.com/ UnittestingandTDDinNode.js:https://www.codementor.io/davidtang/unit‑testing‑and‑tdd‑in‑node‑js‑part‑1‑8t714s877 Node.jsUnitTesting:https://blog.risingstack.com/node‑hero‑node‑js‑unit‑testing‑tutorial/ Nginxwebserver:https://nginx.org/en/docs/ pm2processmanager:https://pm2.io/runtime/ StackOverflowNode.js:https://stackoverflow.com/questions/tagged/node.js OpenNTFSlack:https://slackin.openntf.org/ Node‑RED:https://nodered.org/ SessionRepo:https://gitlab.com/obusse/engage‑2019 Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
48.
Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)
49.
Engage2019‑TheNERDstuff:openingDominotothemodernwebdeveloper(De07)