SUTOL 2015 - Utilizing the OpenNTF Domino API

Oliver Busse
Oliver BusseSenior ICS Consultant & Software Architect bei We4IT Group um We4IT Group
Simplify your code:
give Java a try with the
OpenNTF Domino API
Oliver Busse
We4IT GmbH
Thanks to our sponsors!
7th Sutol Conference, November 2015
7th Sutol Conference, November 2015
Oliver Busse
3
• „Bleeding Yellow“ since R4.5
• Certified Lotus Instructor
since 2001
• IBM Champion for ICS in 2015
• OpenNTF Member Director
• XPages Advocate
• IBM Bluemix curious
• Software Architect at We4IT
@zeromancer1972
www.oliverbusse.com
www.we4it.com
7th Sutol Conference, November 2015
Special thanks go to
Paul S. Withers
Jesse Gallagher
Nathan T. Freeman
Martin Jinoch
John Dalsgaard
7th Sutol Conference, November 2015
Agenda
• What is the OpenNTF Domino API?
• Setup and Implementation
• Other Considerations
• Examples, examples, examples
5
What is the OpenNTF Domino
API?
6
7th Sutol Conference, November 2015
What is the OpenNTF Domino API?
• It‘s an open source project on OpenNTF
• It‘s was created in April 2013
• It‘s maintained by generous developers you
may know
• It fills the gaps and gives the power you
always wanted in Java for Domino
• It‘s often refered to as „ODA“
7
7th Sutol Conference, November 2015
Key developers of the ODA
• Nathan T. Freeman
• Paul S. Withers
• Jesse Gallagher
• Roland Praml
• Martin Jinoch
• René Winkelmeyer
• Tim Tripcony (never forgotten)
8
7th Sutol Conference, November 2015
What is the OpenNTF Domino API? (cont‘d)
• The ODA consists of several packages
– core
– formula
– rest
– xsp
– …
• It‘s an OSGi plugin
• It‘s designed for running on the Domino server
• It‘s designed for XPages (Java, SSJS) and
Plugins
• It can‘t be used in Java Agents 
9
Setup and Implementation
10
7th Sutol Conference, November 2015
Setup and implementation
• Grab it from OpenNTF (recommended)
– http://www.openntf.org/main.nsf/project.xsp?r=pr
oject/OpenNTF%20Domino%20API
• Grab it from the Git-Repo
– https://github.com/OpenNTF/org.openntf.domino
• Grab it from the OpenNTF Stash
– https://stash.openntf.org/projects/ODA
11
7th Sutol Conference, November 2015
Setup and implementation (cont‘d)
• Since the ODA is an OSGi plugin you can
install it via the update site mechanism
• It runs as an extension to the XSP runtime on
the HTTP server JVM
• It comes with it‘s own logger
12
7th Sutol Conference, November 2015
Setup: prepare the server
• Set the signer of the NSF as „Sign or run…“ in
server document‘s security section
13
7th Sutol Conference, November 2015
Setup: prepare the updatesite
• Create an updatesite
NSF
• Name it whatever
you want
• Make sure you set
ACL to let the server
READ documents
14
7th Sutol Conference, November 2015
Setup: import ODA into update site
• Find the site.xml file to import it as a local
update site into your NSF
• After import goto „Actions, Sign all Content“
15
7th Sutol Conference, November 2015
Setup: add the ODA to server startup
• Add a new line to your server‘s notes.ini file
– edit file manually
– use a configuration setting (prefered)
• OSGI_HTTP_DYNAMIC_BUNDLES=updatesite.nsf
16
7th Sutol Conference, November 2015
Setup: add the ODA to server startup
• This is what you should see when the server
starts:
17
HTTP JVM: CLFAD0330I: NSF Based plugins are being installed
in the OSGi runtime. For more information please consult the
log
• Check the plugins with
– tell http osgi ss openntf
7th Sutol Conference, November 2015
Setup: prepare Domino Designer
• Open DDE‘s preferences
– Goto „Domino Designer“ section
– Activate „Enable Eclipse plug-in install“
• Open the update site NSF you just created
– Goto „Actions, Show URLs“
– Copy one of the two URLs to clipboard
• Goto „File, Application, Install“
– Choose „Search for new features to install“
– On the next screen „Add (a) Remote Location“
– Enter a name for it and paste the URL in the clipboard
– On the next screen check the ODA entry and click next/yes if
you are asked to
18
Other Considerations
19
7th Sutol Conference, November 2015
Other Considerations
• ODA utilizes the OpenLog project
– XspOpenLogUtil.logEvent(…)
– XspOpenLogUtil.logError(…)
• Get familiar with the OpenLog project from
OpenNTF
• Create a new OpenLog.nsf file in your
server‘s root (if you haven‘t already)
20
DEMO TIME!
21
7th Sutol Conference, November 2015
Examples, examples, examples
• Session handling
• View handling (loops)
• Document & Field handling
• DateTime enhancements
• Transactions
• Xots
• Graphs
22
Session handling
23
7th Sutol Conference, November 2015
Session handling: different approaches
• Extension Library
– ExtlibUtil.getCurrentSession()
– ExtlibUtil.getCurrentSessionAsSigner()
– ExtlibUtil.getCurrentSessionAsSignerWithFullAccess()
– needs exception handling
• XSPUtil
– like ExtlibUtil
– needs exception handling
• Factory
– only one method required, getSession()
– uses enums for different session types
– no exception handling needed!
24
View handling
25
7th Sutol Conference, November 2015
View handling: what you are used to (1)
26
7th Sutol Conference, November 2015
View handling: what you are used to (2)
27
7th Sutol Conference, November 2015
What you now are able to do
28
Document handling
29
7th Sutol Conference, November 2015
Safe lines of code using new methods
• New creation methods
– Database.createDocument(String, Object, …)
– Database.createDocument(HashMap fields)
• Alternatives to replaceItemValue
– Document.put(String field, Object o)
– Document.putAll(HashMap fields)
• Alternatives to getItemValueXXX
– Document.get(Object o) // returns a Map
– Document.getItemValue(String field, Class type)
7th Sutol Conference, November 2015
Document.getItemValue: what you are used to
• getItemValue returns a Vector
• Vectors are not type safe
– editor / compiler complains non-type-safety
– they can contain „anything“
– you have to check what is inside
• if the item does not exist you are running
into trouble…
31
7th Sutol Conference, November 2015
Document.getItemValue: what you can do now
• cast to a type of your choice
– ArrayList<?> values = doc.getItemValue(„foo", ArrayList.class);
• forget type safety
– define your own!
• a non existing item is returned as null, not as
empty Vector
32
DateTime enhancements
33
7th Sutol Conference, November 2015
DateTime enhancements
• Session.createDateTime(y,m,d,hh,mm,ss)
– uses int values
• conversion toJavaDate() not necessary
– DateTime.isBefore()
– DateTime.isAfter()
• other useful comparisons
– DateTime.equalsIgnoreDate()
– DateTime.equalsIgnoreTime()
Transactions
35
7th Sutol Conference, November 2015
Transactions
• ODA adds transactional capabilities to your
Notes data
• You can modify documents without saving
them individually (e.g. in a loop)
• You can also rollback every modification if
you need to (e.g. when you run into an error)
7th Sutol Conference, November 2015
Transactions (cont‘d)
• Create a new DatabaseTransaction object
from the database
– DatabaseTransaction txn = db.startTransaction()
• Perform your modifications
• Decide whether to commit or rollback
– txn.commit()
– txn.rollback()
37
Xots (Xpages OSGi Tasklet Service)
7th Sutol Conference, November 2015
Xots
• Xots = XPages & DOTS
• It‘s the extended version of DOTS (Domino
Tasklet Services
• Use cases
– Can be coded inside the NSF, no plugin project
needed
– Multi-threaded tasks like Runnable, but you can
return values
– Bulk execution of time consuming code
7th Sutol Conference, November 2015
Xots (cont‘d)
• Advantages
– More granular time and event triggering than in
Agents
– Can run with server-side permissions
– Runs in a shared container (JVM) unlikely of an
Agent which runs in a dedicated JVM
• you can exchange data between tasklets
– It‘s coded in a plain Java class and not in an
Agent design element
– You can use SCM systems
40
7th Sutol Conference, November 2015
Xots (cont‘d)
• Core elements of tasklet
– Interface Callable<?>
– Interface Future<?>
• get() method to get the return value(s)
• only if you are interested in a return value
– Class Xots from the ODA
• submit() method to create a tasklet
• schedule() methos to create a periodic tasklet
– use PeriodicScheduler!
41
„Graphs“
42http://whatis.techtarget.com/definition/graph-database
7th Sutol Conference, November 2015
Graph DB
A graph database, also called a graph-oriented
database, is a type of NoSQL database that uses graph
theory to store, map and query relationships.
A graph database is essentially a collection of nodes
and edges. Each node represents an entity (such as a
person or business) and each edge represents a
connection or relationship between two nodes.
http://whatis.techtarget.com/definition/graph-database
7th Sutol Conference, November 2015
Graphs – terminology
• Vertices (Nodes)
– Properties (Key-Value pairs)
• Edges
• ElementStores
– for us: NSF databases
• MetaverseIDs
– Replica + UNID (hashed)
– internal use only (don‘t care about them)
44
7th Sutol Conference, November 2015
Graph DB – in Domino?
• Vertices and Edges are stored as Documents
• The data container is a NSF
• The ElementStore defines the filepath of the
NSF
• An ElementStore can hold different types of
Vertices
• Usually you create one ElementStore for
each Vertice type
45
Let‘s see the demo &
some code
Graph DB
46
7th Sutol Conference, November 2015
Resources
• The XPages demo application
– https://bitbucket.org/zeromancer1972/sutol-2015-oda-graph-demo
• A nice glossary
– http://www.intec.co.uk/from-xpages-to-web-app-glossary/
• OpenNTF Domino API
– http://www.openntf.org/main.nsf/project.xsp?r=project/OpenNTF%20Domino%20API
– http://www.openntf.org/main.nsf/project.xsp?r=project/OpenNTF%20Domino%20API%20Demo%20Database
• Xots
– http://www.intec.co.uk/xots-background-and-multithreaded-tasks-the-openntf-domino-api-way-part-one/
– http://www.intec.co.uk/xots-background-and-multithreaded-tasks-the-openntf-domino-api-way-part-two/
– http://www.intec.co.uk/xots-background-and-multithreaded-tasks-the-openntf-domino-api-way-part-three/
• Graphs
– http://de.slideshare.net/ktree19/the-graph-revolution
Q & A
48
Thank you!
1 von 49

Recomendados

OpenNTF Domino API - Overview Introduction von
OpenNTF Domino API - Overview IntroductionOpenNTF Domino API - Overview Introduction
OpenNTF Domino API - Overview IntroductionPaul Withers
2.4K views28 Folien
DanNotes 2013: OpenNTF Domino API von
DanNotes 2013: OpenNTF Domino APIDanNotes 2013: OpenNTF Domino API
DanNotes 2013: OpenNTF Domino APIPaul Withers
3K views34 Folien
Utilizing the OpenNTF Domino API von
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIOliver Busse
3.2K views48 Folien
Introducing CrossWorlds for IBM Domino von
Introducing CrossWorlds for IBM DominoIntroducing CrossWorlds for IBM Domino
Introducing CrossWorlds for IBM DominoDaniele Vistalli
6.1K views27 Folien
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou... von
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...Paul Withers
3.6K views56 Folien
TYPO3 Transition Tool von
TYPO3 Transition ToolTYPO3 Transition Tool
TYPO3 Transition Toolcrus0e
374 views32 Folien

Más contenido relacionado

Was ist angesagt?

Queick: A Simple Job Queue System for Python von
Queick: A Simple Job Queue System for PythonQueick: A Simple Job Queue System for Python
Queick: A Simple Job Queue System for PythonRyota Suenaga
564 views43 Folien
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift von
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using SwiftDiego Freniche Brito
104 views35 Folien
Fluentd v0.14 Plugin API Details von
Fluentd v0.14 Plugin API DetailsFluentd v0.14 Plugin API Details
Fluentd v0.14 Plugin API DetailsSATOSHI TAGOMORI
21.6K views56 Folien
Robotframework von
RobotframeworkRobotframework
RobotframeworkElla Sun
519 views19 Folien
Ratpack JVM_MX Meetup February 2016 von
Ratpack JVM_MX Meetup February 2016Ratpack JVM_MX Meetup February 2016
Ratpack JVM_MX Meetup February 2016Domingo Suarez Torres
1.1K views30 Folien

Was ist angesagt?(20)

Queick: A Simple Job Queue System for Python von Ryota Suenaga
Queick: A Simple Job Queue System for PythonQueick: A Simple Job Queue System for Python
Queick: A Simple Job Queue System for Python
Ryota Suenaga564 views
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift von Diego Freniche Brito
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
Fluentd v0.14 Plugin API Details von SATOSHI TAGOMORI
Fluentd v0.14 Plugin API DetailsFluentd v0.14 Plugin API Details
Fluentd v0.14 Plugin API Details
SATOSHI TAGOMORI21.6K views
Robotframework von Ella Sun
RobotframeworkRobotframework
Robotframework
Ella Sun519 views
Functional Programming for Busy Object Oriented Programmers von Diego Freniche Brito
Functional Programming for Busy Object Oriented ProgrammersFunctional Programming for Busy Object Oriented Programmers
Functional Programming for Busy Object Oriented Programmers
Developer-friendly taskqueues: What you should ask yourself before choosing one von Sylvain Zimmer
Developer-friendly taskqueues: What you should ask yourself before choosing oneDeveloper-friendly taskqueues: What you should ask yourself before choosing one
Developer-friendly taskqueues: What you should ask yourself before choosing one
Sylvain Zimmer684 views
Scala Frameworks for Web Application 2016 von takezoe
Scala Frameworks for Web Application 2016Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016
takezoe7.2K views
Ancient To Modern: Upgrading nearly a decade of Plone in public radio von Cristopher Ewing
Ancient To Modern: Upgrading nearly a decade of Plone in public radioAncient To Modern: Upgrading nearly a decade of Plone in public radio
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
Cristopher Ewing1.5K views
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib... von Paul Withers
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
Paul Withers1.6K views
"Building, deploying and running production code at Dropbox" Васильев Леонид,... von it-people
"Building, deploying and running production code at Dropbox" Васильев Леонид,..."Building, deploying and running production code at Dropbox" Васильев Леонид,...
"Building, deploying and running production code at Dropbox" Васильев Леонид,...
it-people462 views
ASP.NET Core 1.0 von Ido Flatow
ASP.NET Core 1.0ASP.NET Core 1.0
ASP.NET Core 1.0
Ido Flatow701 views
Asynchronous job queues with python-rq von Ashish Acharya
Asynchronous job queues with python-rqAsynchronous job queues with python-rq
Asynchronous job queues with python-rq
Ashish Acharya2.5K views
[DanNotes] XPages - Beyound the Basics von Ulrich Krause
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
Ulrich Krause56.4K views
LCA13: LAVA and CI Component Review von Linaro
LCA13: LAVA and CI Component ReviewLCA13: LAVA and CI Component Review
LCA13: LAVA and CI Component Review
Linaro880 views
Pywps a tutorial for beginners and developers von Jorge Mendes
Pywps a tutorial for beginners and developersPywps a tutorial for beginners and developers
Pywps a tutorial for beginners and developers
Jorge Mendes8.7K views

Destacado

Utilizing the open ntf domino api von
Utilizing the open ntf domino apiUtilizing the open ntf domino api
Utilizing the open ntf domino apiOliver Busse
782 views48 Folien
ISBG 2016 - XPages on IBM Bluemix von
ISBG 2016 - XPages on IBM BluemixISBG 2016 - XPages on IBM Bluemix
ISBG 2016 - XPages on IBM BluemixOliver Busse
616 views51 Folien
ULC - Connect 2014 Nachlese von
ULC - Connect 2014 NachleseULC - Connect 2014 Nachlese
ULC - Connect 2014 NachleseOliver Busse
1K views26 Folien
OSA Anwendertreffen 2014 - "Clients ausgedünnt: Notes-/Domino-Anwendungen web... von
OSA Anwendertreffen 2014 - "Clients ausgedünnt: Notes-/Domino-Anwendungenweb...OSA Anwendertreffen 2014 - "Clients ausgedünnt: Notes-/Domino-Anwendungenweb...
OSA Anwendertreffen 2014 - "Clients ausgedünnt: Notes-/Domino-Anwendungen web...Oliver Busse
1.2K views44 Folien
DNUG 2014 Herbstkonferenz: Moderne Architektur - Hochskalierbare Anwendungsar... von
DNUG 2014 Herbstkonferenz: Moderne Architektur - Hochskalierbare Anwendungsar...DNUG 2014 Herbstkonferenz: Moderne Architektur - Hochskalierbare Anwendungsar...
DNUG 2014 Herbstkonferenz: Moderne Architektur - Hochskalierbare Anwendungsar...JRibbeck
1.9K views33 Folien
Transformations von
TransformationsTransformations
TransformationsOliver Busse
1K views33 Folien

Destacado(20)

Utilizing the open ntf domino api von Oliver Busse
Utilizing the open ntf domino apiUtilizing the open ntf domino api
Utilizing the open ntf domino api
Oliver Busse782 views
ISBG 2016 - XPages on IBM Bluemix von Oliver Busse
ISBG 2016 - XPages on IBM BluemixISBG 2016 - XPages on IBM Bluemix
ISBG 2016 - XPages on IBM Bluemix
Oliver Busse616 views
ULC - Connect 2014 Nachlese von Oliver Busse
ULC - Connect 2014 NachleseULC - Connect 2014 Nachlese
ULC - Connect 2014 Nachlese
Oliver Busse1K views
OSA Anwendertreffen 2014 - "Clients ausgedünnt: Notes-/Domino-Anwendungen web... von Oliver Busse
OSA Anwendertreffen 2014 - "Clients ausgedünnt: Notes-/Domino-Anwendungenweb...OSA Anwendertreffen 2014 - "Clients ausgedünnt: Notes-/Domino-Anwendungenweb...
OSA Anwendertreffen 2014 - "Clients ausgedünnt: Notes-/Domino-Anwendungen web...
Oliver Busse1.2K views
DNUG 2014 Herbstkonferenz: Moderne Architektur - Hochskalierbare Anwendungsar... von JRibbeck
DNUG 2014 Herbstkonferenz: Moderne Architektur - Hochskalierbare Anwendungsar...DNUG 2014 Herbstkonferenz: Moderne Architektur - Hochskalierbare Anwendungsar...
DNUG 2014 Herbstkonferenz: Moderne Architektur - Hochskalierbare Anwendungsar...
JRibbeck1.9K views
Transformations - a TLCC & Teamstudio Webinar von Oliver Busse
Transformations - a TLCC & Teamstudio WebinarTransformations - a TLCC & Teamstudio Webinar
Transformations - a TLCC & Teamstudio Webinar
Oliver Busse1.3K views
Utilizing the OpenNTF Domino API von Oliver Busse
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino API
Oliver Busse912 views
Dnug 112014 modernization_openn_ntf_ersatzsession von Oliver Busse
Dnug 112014 modernization_openn_ntf_ersatzsessionDnug 112014 modernization_openn_ntf_ersatzsession
Dnug 112014 modernization_openn_ntf_ersatzsession
Oliver Busse931 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...DNUG 38: "Einen Rahmen schaffen: Vorteile durch Frameworks in der Domino-Webe...
DNUG 38: "Einen Rahmen schaffen: Vorteile durch Frameworks in der Domino-Webe...
Oliver Busse643 views
Fix & fertig: Best Practises für "XPages-Migranten" von Oliver Busse
Fix & fertig: Best Practises für "XPages-Migranten"Fix & fertig: Best Practises für "XPages-Migranten"
Fix & fertig: Best Practises für "XPages-Migranten"
Oliver Busse1.7K views
Xpages - oder was man mit einer alten Notes-DB so alles anstellen kann von Belsoft
Xpages - oder was man mit einer alten Notes-DB so alles anstellen kannXpages - oder was man mit einer alten Notes-DB so alles anstellen kann
Xpages - oder was man mit einer alten Notes-DB so alles anstellen kann
Belsoft1.9K views
Out of the Blue - the Workflow in Bluemix Development von Oliver Busse
Out of the Blue - the Workflow in Bluemix DevelopmentOut of the Blue - the Workflow in Bluemix Development
Out of the Blue - the Workflow in Bluemix Development
Oliver Busse3.2K views
Java & Notes - Mit Eclipse neue Features für Notes entwickeln | C.Habermueller von Christian Habermueller
Java & Notes - Mit Eclipse neue Features für Notes entwickeln | C.HabermuellerJava & Notes - Mit Eclipse neue Features für Notes entwickeln | C.Habermueller
Java & Notes - Mit Eclipse neue Features für Notes entwickeln | C.Habermueller
Out of the Blue: Getting started with IBM Bluemix development von Oliver Busse
Out of the Blue: Getting started with IBM Bluemix developmentOut of the Blue: Getting started with IBM Bluemix development
Out of the Blue: Getting started with IBM Bluemix development
Oliver Busse1.7K views
MWLUG 2016 : AD117 : Xpages & jQuery DataTables von Michael Smith
MWLUG 2016 : AD117 : Xpages & jQuery DataTablesMWLUG 2016 : AD117 : Xpages & jQuery DataTables
MWLUG 2016 : AD117 : Xpages & jQuery DataTables
Michael Smith3.7K views
XPages on Bluemix - the Do's and Dont's von Oliver Busse
XPages on Bluemix - the Do's and Dont'sXPages on Bluemix - the Do's and Dont's
XPages on Bluemix - the Do's and Dont's
Oliver Busse1.4K views
A World Without Applications von Red Pill Now
A World Without ApplicationsA World Without Applications
A World Without Applications
Red Pill Now3.7K views

Similar a SUTOL 2015 - Utilizing the OpenNTF Domino API

Sutol 2016 - Automation is developer's friend von
Sutol 2016 - Automation is developer's friendSutol 2016 - Automation is developer's friend
Sutol 2016 - Automation is developer's friendmpradny
1.7K views42 Folien
RESTful services on IBM Domino/XWork (SUTOL 11 Nov. 2015 in Prague) von
RESTful services on IBM Domino/XWork (SUTOL 11 Nov. 2015 in Prague)RESTful services on IBM Domino/XWork (SUTOL 11 Nov. 2015 in Prague)
RESTful services on IBM Domino/XWork (SUTOL 11 Nov. 2015 in Prague)John Dalsgaard
809 views56 Folien
Serverless and AI: Orit Nissan-Messing, Iguazio, Serverless NYC 2018 von
Serverless and AI: Orit Nissan-Messing, Iguazio, Serverless NYC 2018Serverless and AI: Orit Nissan-Messing, Iguazio, Serverless NYC 2018
Serverless and AI: Orit Nissan-Messing, Iguazio, Serverless NYC 2018iguazio
217 views16 Folien
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin... von
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...BrianFraser29
199 views43 Folien
Plantilla oracle von
Plantilla oraclePlantilla oracle
Plantilla oracleUriel Barrales Garrido
315 views45 Folien
A (XPages) developers guide to Cloudant von
A (XPages) developers guide to CloudantA (XPages) developers guide to Cloudant
A (XPages) developers guide to CloudantFrank van der Linden
847 views44 Folien

Similar a SUTOL 2015 - Utilizing the OpenNTF Domino API(20)

Sutol 2016 - Automation is developer's friend von mpradny
Sutol 2016 - Automation is developer's friendSutol 2016 - Automation is developer's friend
Sutol 2016 - Automation is developer's friend
mpradny1.7K views
RESTful services on IBM Domino/XWork (SUTOL 11 Nov. 2015 in Prague) von John Dalsgaard
RESTful services on IBM Domino/XWork (SUTOL 11 Nov. 2015 in Prague)RESTful services on IBM Domino/XWork (SUTOL 11 Nov. 2015 in Prague)
RESTful services on IBM Domino/XWork (SUTOL 11 Nov. 2015 in Prague)
John Dalsgaard809 views
Serverless and AI: Orit Nissan-Messing, Iguazio, Serverless NYC 2018 von iguazio
Serverless and AI: Orit Nissan-Messing, Iguazio, Serverless NYC 2018Serverless and AI: Orit Nissan-Messing, Iguazio, Serverless NYC 2018
Serverless and AI: Orit Nissan-Messing, Iguazio, Serverless NYC 2018
iguazio217 views
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin... von BrianFraser29
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
Brisbane MuleSoft Meetup 2023-03-22 - Anypoint Code Builder and Splunk Loggin...
BrianFraser29199 views
Custom Activities in UiPath (Activity Builder) von Cristina Vidu
Custom Activities in UiPath (Activity Builder)Custom Activities in UiPath (Activity Builder)
Custom Activities in UiPath (Activity Builder)
Cristina Vidu239 views
MySQL as a Document Store von Ted Wennmark
MySQL as a Document StoreMySQL as a Document Store
MySQL as a Document Store
Ted Wennmark360 views
Whats new in_mlflow von Databricks
Whats new in_mlflowWhats new in_mlflow
Whats new in_mlflow
Databricks449 views
Enabling IoT Devices’ Hardware and Software Interoperability, IPSO Alliance (... von Open Mobile Alliance
Enabling IoT Devices’ Hardware and Software Interoperability, IPSO Alliance (...Enabling IoT Devices’ Hardware and Software Interoperability, IPSO Alliance (...
Enabling IoT Devices’ Hardware and Software Interoperability, IPSO Alliance (...
Day 13 - Creating Data Processing Services | Train the Trainers Program von FIWARE
Day 13 - Creating Data Processing Services | Train the Trainers ProgramDay 13 - Creating Data Processing Services | Train the Trainers Program
Day 13 - Creating Data Processing Services | Train the Trainers Program
FIWARE125 views
SplunkLive London 2014 Developer Presentation von Damien Dallimore
SplunkLive London 2014  Developer PresentationSplunkLive London 2014  Developer Presentation
SplunkLive London 2014 Developer Presentation
Damien Dallimore2.3K views
Broadcast Music Inc - Release Automation Rockstars! von ghodgkinson
Broadcast Music Inc - Release Automation Rockstars!Broadcast Music Inc - Release Automation Rockstars!
Broadcast Music Inc - Release Automation Rockstars!
ghodgkinson659 views
Practical automation for beginners von Seoweon Yoo
Practical automation for beginnersPractical automation for beginners
Practical automation for beginners
Seoweon Yoo2.7K views
SPEC Innovations: New Features in Innoslate Webinar von Elizabeth Steiner
SPEC Innovations: New Features in Innoslate WebinarSPEC Innovations: New Features in Innoslate Webinar
SPEC Innovations: New Features in Innoslate Webinar
Session 8 - Creating Data Processing Services | Train the Trainers Program von FIWARE
Session 8 - Creating Data Processing Services | Train the Trainers ProgramSession 8 - Creating Data Processing Services | Train the Trainers Program
Session 8 - Creating Data Processing Services | Train the Trainers Program
FIWARE301 views

Más de Oliver Busse

HCL Domino Volt - der NSF Killer? von
HCL Domino Volt - der NSF Killer?HCL Domino Volt - der NSF Killer?
HCL Domino Volt - der NSF Killer?Oliver Busse
142 views43 Folien
Outlook becomes a Team Player - with a clever add-in von
Outlook becomes a Team Player - with a clever add-inOutlook becomes a Team Player - with a clever add-in
Outlook becomes a Team Player - with a clever add-inOliver Busse
116 views26 Folien
The NERD stuff - opening for Domino to the modern web developer von
The NERD stuff - opening for Domino to the modern web developerThe NERD stuff - opening for Domino to the modern web developer
The NERD stuff - opening for Domino to the modern web developerOliver Busse
650 views49 Folien
DNUG Development Day 2019 von
DNUG Development Day 2019DNUG Development Day 2019
DNUG Development Day 2019Oliver Busse
376 views23 Folien
DNUG44 Watson Workspace von
DNUG44 Watson WorkspaceDNUG44 Watson Workspace
DNUG44 Watson WorkspaceOliver Busse
255 views24 Folien
Paradiesisch - OpenNTF von
Paradiesisch - OpenNTFParadiesisch - OpenNTF
Paradiesisch - OpenNTFOliver Busse
269 views38 Folien

Más de Oliver Busse(6)

HCL Domino Volt - der NSF Killer? von Oliver Busse
HCL Domino Volt - der NSF Killer?HCL Domino Volt - der NSF Killer?
HCL Domino Volt - der NSF Killer?
Oliver Busse142 views
Outlook becomes a Team Player - with a clever add-in von Oliver Busse
Outlook becomes a Team Player - with a clever add-inOutlook becomes a Team Player - with a clever add-in
Outlook becomes a Team Player - with a clever add-in
Oliver Busse116 views
The NERD stuff - opening for Domino to the modern web developer von Oliver Busse
The NERD stuff - opening for Domino to the modern web developerThe NERD stuff - opening for Domino to the modern web developer
The NERD stuff - opening for Domino to the modern web developer
Oliver Busse650 views
DNUG Development Day 2019 von Oliver Busse
DNUG Development Day 2019DNUG Development Day 2019
DNUG Development Day 2019
Oliver Busse376 views
DNUG44 Watson Workspace von Oliver Busse
DNUG44 Watson WorkspaceDNUG44 Watson Workspace
DNUG44 Watson Workspace
Oliver Busse255 views
Paradiesisch - OpenNTF von Oliver Busse
Paradiesisch - OpenNTFParadiesisch - OpenNTF
Paradiesisch - OpenNTF
Oliver Busse269 views

Último

WebAssembly von
WebAssemblyWebAssembly
WebAssemblyJens Siebert
48 views18 Folien
Myths and Facts About Hospice Care: Busting Common Misconceptions von
Myths and Facts About Hospice Care: Busting Common MisconceptionsMyths and Facts About Hospice Care: Busting Common Misconceptions
Myths and Facts About Hospice Care: Busting Common MisconceptionsCare Coordinations
5 views1 Folie
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... von
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Donato Onofri
825 views34 Folien
Sprint 226 von
Sprint 226Sprint 226
Sprint 226ManageIQ
5 views18 Folien
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge... von
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...Deltares
17 views12 Folien
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... von
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Marc Müller
37 views83 Folien

Último(20)

Myths and Facts About Hospice Care: Busting Common Misconceptions von Care Coordinations
Myths and Facts About Hospice Care: Busting Common MisconceptionsMyths and Facts About Hospice Care: Busting Common Misconceptions
Myths and Facts About Hospice Care: Busting Common Misconceptions
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... von Donato Onofri
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri825 views
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge... von Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
Deltares17 views
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... von Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller37 views
Airline Booking Software von SharmiMehta
Airline Booking SoftwareAirline Booking Software
Airline Booking Software
SharmiMehta6 views
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... von Deltares
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
Deltares14 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx von animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm14 views
Copilot Prompting Toolkit_All Resources.pdf von Riccardo Zamana
Copilot Prompting Toolkit_All Resources.pdfCopilot Prompting Toolkit_All Resources.pdf
Copilot Prompting Toolkit_All Resources.pdf
Riccardo Zamana8 views
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the... von Deltares
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
Deltares6 views
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h... von Deltares
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...
Deltares5 views
FIMA 2023 Neo4j & FS - Entity Resolution.pptx von Neo4j
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptx
Neo4j7 views
Generic or specific? Making sensible software design decisions von Bert Jan Schrijver
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme... von Deltares
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
Deltares5 views
Headless JS UG Presentation.pptx von Jack Spektor
Headless JS UG Presentation.pptxHeadless JS UG Presentation.pptx
Headless JS UG Presentation.pptx
Jack Spektor7 views
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action von Márton Kodok
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok5 views

SUTOL 2015 - Utilizing the OpenNTF Domino API

  • 1. Simplify your code: give Java a try with the OpenNTF Domino API Oliver Busse We4IT GmbH
  • 2. Thanks to our sponsors! 7th Sutol Conference, November 2015
  • 3. 7th Sutol Conference, November 2015 Oliver Busse 3 • „Bleeding Yellow“ since R4.5 • Certified Lotus Instructor since 2001 • IBM Champion for ICS in 2015 • OpenNTF Member Director • XPages Advocate • IBM Bluemix curious • Software Architect at We4IT @zeromancer1972 www.oliverbusse.com www.we4it.com
  • 4. 7th Sutol Conference, November 2015 Special thanks go to Paul S. Withers Jesse Gallagher Nathan T. Freeman Martin Jinoch John Dalsgaard
  • 5. 7th Sutol Conference, November 2015 Agenda • What is the OpenNTF Domino API? • Setup and Implementation • Other Considerations • Examples, examples, examples 5
  • 6. What is the OpenNTF Domino API? 6
  • 7. 7th Sutol Conference, November 2015 What is the OpenNTF Domino API? • It‘s an open source project on OpenNTF • It‘s was created in April 2013 • It‘s maintained by generous developers you may know • It fills the gaps and gives the power you always wanted in Java for Domino • It‘s often refered to as „ODA“ 7
  • 8. 7th Sutol Conference, November 2015 Key developers of the ODA • Nathan T. Freeman • Paul S. Withers • Jesse Gallagher • Roland Praml • Martin Jinoch • René Winkelmeyer • Tim Tripcony (never forgotten) 8
  • 9. 7th Sutol Conference, November 2015 What is the OpenNTF Domino API? (cont‘d) • The ODA consists of several packages – core – formula – rest – xsp – … • It‘s an OSGi plugin • It‘s designed for running on the Domino server • It‘s designed for XPages (Java, SSJS) and Plugins • It can‘t be used in Java Agents  9
  • 11. 7th Sutol Conference, November 2015 Setup and implementation • Grab it from OpenNTF (recommended) – http://www.openntf.org/main.nsf/project.xsp?r=pr oject/OpenNTF%20Domino%20API • Grab it from the Git-Repo – https://github.com/OpenNTF/org.openntf.domino • Grab it from the OpenNTF Stash – https://stash.openntf.org/projects/ODA 11
  • 12. 7th Sutol Conference, November 2015 Setup and implementation (cont‘d) • Since the ODA is an OSGi plugin you can install it via the update site mechanism • It runs as an extension to the XSP runtime on the HTTP server JVM • It comes with it‘s own logger 12
  • 13. 7th Sutol Conference, November 2015 Setup: prepare the server • Set the signer of the NSF as „Sign or run…“ in server document‘s security section 13
  • 14. 7th Sutol Conference, November 2015 Setup: prepare the updatesite • Create an updatesite NSF • Name it whatever you want • Make sure you set ACL to let the server READ documents 14
  • 15. 7th Sutol Conference, November 2015 Setup: import ODA into update site • Find the site.xml file to import it as a local update site into your NSF • After import goto „Actions, Sign all Content“ 15
  • 16. 7th Sutol Conference, November 2015 Setup: add the ODA to server startup • Add a new line to your server‘s notes.ini file – edit file manually – use a configuration setting (prefered) • OSGI_HTTP_DYNAMIC_BUNDLES=updatesite.nsf 16
  • 17. 7th Sutol Conference, November 2015 Setup: add the ODA to server startup • This is what you should see when the server starts: 17 HTTP JVM: CLFAD0330I: NSF Based plugins are being installed in the OSGi runtime. For more information please consult the log • Check the plugins with – tell http osgi ss openntf
  • 18. 7th Sutol Conference, November 2015 Setup: prepare Domino Designer • Open DDE‘s preferences – Goto „Domino Designer“ section – Activate „Enable Eclipse plug-in install“ • Open the update site NSF you just created – Goto „Actions, Show URLs“ – Copy one of the two URLs to clipboard • Goto „File, Application, Install“ – Choose „Search for new features to install“ – On the next screen „Add (a) Remote Location“ – Enter a name for it and paste the URL in the clipboard – On the next screen check the ODA entry and click next/yes if you are asked to 18
  • 20. 7th Sutol Conference, November 2015 Other Considerations • ODA utilizes the OpenLog project – XspOpenLogUtil.logEvent(…) – XspOpenLogUtil.logError(…) • Get familiar with the OpenLog project from OpenNTF • Create a new OpenLog.nsf file in your server‘s root (if you haven‘t already) 20
  • 22. 7th Sutol Conference, November 2015 Examples, examples, examples • Session handling • View handling (loops) • Document & Field handling • DateTime enhancements • Transactions • Xots • Graphs 22
  • 24. 7th Sutol Conference, November 2015 Session handling: different approaches • Extension Library – ExtlibUtil.getCurrentSession() – ExtlibUtil.getCurrentSessionAsSigner() – ExtlibUtil.getCurrentSessionAsSignerWithFullAccess() – needs exception handling • XSPUtil – like ExtlibUtil – needs exception handling • Factory – only one method required, getSession() – uses enums for different session types – no exception handling needed! 24
  • 26. 7th Sutol Conference, November 2015 View handling: what you are used to (1) 26
  • 27. 7th Sutol Conference, November 2015 View handling: what you are used to (2) 27
  • 28. 7th Sutol Conference, November 2015 What you now are able to do 28
  • 30. 7th Sutol Conference, November 2015 Safe lines of code using new methods • New creation methods – Database.createDocument(String, Object, …) – Database.createDocument(HashMap fields) • Alternatives to replaceItemValue – Document.put(String field, Object o) – Document.putAll(HashMap fields) • Alternatives to getItemValueXXX – Document.get(Object o) // returns a Map – Document.getItemValue(String field, Class type)
  • 31. 7th Sutol Conference, November 2015 Document.getItemValue: what you are used to • getItemValue returns a Vector • Vectors are not type safe – editor / compiler complains non-type-safety – they can contain „anything“ – you have to check what is inside • if the item does not exist you are running into trouble… 31
  • 32. 7th Sutol Conference, November 2015 Document.getItemValue: what you can do now • cast to a type of your choice – ArrayList<?> values = doc.getItemValue(„foo", ArrayList.class); • forget type safety – define your own! • a non existing item is returned as null, not as empty Vector 32
  • 34. 7th Sutol Conference, November 2015 DateTime enhancements • Session.createDateTime(y,m,d,hh,mm,ss) – uses int values • conversion toJavaDate() not necessary – DateTime.isBefore() – DateTime.isAfter() • other useful comparisons – DateTime.equalsIgnoreDate() – DateTime.equalsIgnoreTime()
  • 36. 7th Sutol Conference, November 2015 Transactions • ODA adds transactional capabilities to your Notes data • You can modify documents without saving them individually (e.g. in a loop) • You can also rollback every modification if you need to (e.g. when you run into an error)
  • 37. 7th Sutol Conference, November 2015 Transactions (cont‘d) • Create a new DatabaseTransaction object from the database – DatabaseTransaction txn = db.startTransaction() • Perform your modifications • Decide whether to commit or rollback – txn.commit() – txn.rollback() 37
  • 38. Xots (Xpages OSGi Tasklet Service)
  • 39. 7th Sutol Conference, November 2015 Xots • Xots = XPages & DOTS • It‘s the extended version of DOTS (Domino Tasklet Services • Use cases – Can be coded inside the NSF, no plugin project needed – Multi-threaded tasks like Runnable, but you can return values – Bulk execution of time consuming code
  • 40. 7th Sutol Conference, November 2015 Xots (cont‘d) • Advantages – More granular time and event triggering than in Agents – Can run with server-side permissions – Runs in a shared container (JVM) unlikely of an Agent which runs in a dedicated JVM • you can exchange data between tasklets – It‘s coded in a plain Java class and not in an Agent design element – You can use SCM systems 40
  • 41. 7th Sutol Conference, November 2015 Xots (cont‘d) • Core elements of tasklet – Interface Callable<?> – Interface Future<?> • get() method to get the return value(s) • only if you are interested in a return value – Class Xots from the ODA • submit() method to create a tasklet • schedule() methos to create a periodic tasklet – use PeriodicScheduler! 41
  • 43. 7th Sutol Conference, November 2015 Graph DB A graph database, also called a graph-oriented database, is a type of NoSQL database that uses graph theory to store, map and query relationships. A graph database is essentially a collection of nodes and edges. Each node represents an entity (such as a person or business) and each edge represents a connection or relationship between two nodes. http://whatis.techtarget.com/definition/graph-database
  • 44. 7th Sutol Conference, November 2015 Graphs – terminology • Vertices (Nodes) – Properties (Key-Value pairs) • Edges • ElementStores – for us: NSF databases • MetaverseIDs – Replica + UNID (hashed) – internal use only (don‘t care about them) 44
  • 45. 7th Sutol Conference, November 2015 Graph DB – in Domino? • Vertices and Edges are stored as Documents • The data container is a NSF • The ElementStore defines the filepath of the NSF • An ElementStore can hold different types of Vertices • Usually you create one ElementStore for each Vertice type 45
  • 46. Let‘s see the demo & some code Graph DB 46
  • 47. 7th Sutol Conference, November 2015 Resources • The XPages demo application – https://bitbucket.org/zeromancer1972/sutol-2015-oda-graph-demo • A nice glossary – http://www.intec.co.uk/from-xpages-to-web-app-glossary/ • OpenNTF Domino API – http://www.openntf.org/main.nsf/project.xsp?r=project/OpenNTF%20Domino%20API – http://www.openntf.org/main.nsf/project.xsp?r=project/OpenNTF%20Domino%20API%20Demo%20Database • Xots – http://www.intec.co.uk/xots-background-and-multithreaded-tasks-the-openntf-domino-api-way-part-one/ – http://www.intec.co.uk/xots-background-and-multithreaded-tasks-the-openntf-domino-api-way-part-two/ – http://www.intec.co.uk/xots-background-and-multithreaded-tasks-the-openntf-domino-api-way-part-three/ • Graphs – http://de.slideshare.net/ktree19/the-graph-revolution