SlideShare a Scribd company logo
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!

More Related Content

PPTX
OpenNTF Domino API - Overview Introduction
PDF
DanNotes 2013: OpenNTF Domino API
PPTX
Utilizing the OpenNTF Domino API
PPTX
Introducing CrossWorlds for IBM Domino
PDF
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
PDF
TYPO3 Transition Tool
PPTX
Taming the resource tiger
PDF
A Taste of Pharo 7.0
OpenNTF Domino API - Overview Introduction
DanNotes 2013: OpenNTF Domino API
Utilizing the OpenNTF Domino API
Introducing CrossWorlds for IBM Domino
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
TYPO3 Transition Tool
Taming the resource tiger
A Taste of Pharo 7.0

What's hot (20)

PDF
Queick: A Simple Job Queue System for Python
PPTX
Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
PDF
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
PDF
Fluentd v0.14 Plugin API Details
PPTX
Robotframework
PDF
Ratpack JVM_MX Meetup February 2016
PDF
Functional Programming for Busy Object Oriented Programmers
PDF
Developer-friendly taskqueues: What you should ask yourself before choosing one
PDF
Scala Frameworks for Web Application 2016
PDF
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
PDF
Celery introduction
PDF
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
PDF
"Building, deploying and running production code at Dropbox" Васильев Леонид,...
PPTX
ASP.NET Core 1.0
PDF
Asynchronous job queues with python-rq
PDF
Eureka Moment UKLUG
PPTX
[DanNotes] XPages - Beyound the Basics
PDF
LCA13: LAVA and CI Component Review
PDF
ODP
Pywps a tutorial for beginners and developers
Queick: A Simple Job Queue System for Python
Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
Fluentd v0.14 Plugin API Details
Robotframework
Ratpack JVM_MX Meetup February 2016
Functional Programming for Busy Object Oriented Programmers
Developer-friendly taskqueues: What you should ask yourself before choosing one
Scala Frameworks for Web Application 2016
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
Celery introduction
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
"Building, deploying and running production code at Dropbox" Васильев Леонид,...
ASP.NET Core 1.0
Asynchronous job queues with python-rq
Eureka Moment UKLUG
[DanNotes] XPages - Beyound the Basics
LCA13: LAVA and CI Component Review
Pywps a tutorial for beginners and developers
Ad

Viewers also liked (20)

PPTX
Utilizing the open ntf domino api
PPTX
ISBG 2016 - XPages on IBM Bluemix
PDF
ULC - Connect 2014 Nachlese
PDF
OSA Anwendertreffen 2014 - "Clients ausgedünnt: Notes-/Domino-Anwendungen web...
PDF
DNUG 2014 Herbstkonferenz: Moderne Architektur - Hochskalierbare Anwendungsar...
PPTX
Transformations
PPTX
Transformations - a TLCC & Teamstudio Webinar
PPTX
GraphDb in XPages
PPTX
Utilizing the OpenNTF Domino API
PPTX
Dnug 112014 modernization_openn_ntf_ersatzsession
PDF
DNUG 38: "Einen Rahmen schaffen: Vorteile durch Frameworks in der Domino-Webe...
PPTX
Fix & fertig: Best Practises für "XPages-Migranten"
PDF
Xpages - oder was man mit einer alten Notes-DB so alles anstellen kann
PDF
Out of the Blue - the Workflow in Bluemix Development
PDF
Find your data
PDF
Java & Notes - Mit Eclipse neue Features für Notes entwickeln | C.Habermueller
PPTX
Out of the Blue: Getting started with IBM Bluemix development
PPTX
MWLUG 2016 : AD117 : Xpages & jQuery DataTables
PPTX
XPages on Bluemix - the Do's and Dont's
PPTX
A World Without Applications
Utilizing the open ntf domino api
ISBG 2016 - XPages on IBM Bluemix
ULC - Connect 2014 Nachlese
OSA Anwendertreffen 2014 - "Clients ausgedünnt: Notes-/Domino-Anwendungen web...
DNUG 2014 Herbstkonferenz: Moderne Architektur - Hochskalierbare Anwendungsar...
Transformations
Transformations - a TLCC & Teamstudio Webinar
GraphDb in XPages
Utilizing the OpenNTF Domino API
Dnug 112014 modernization_openn_ntf_ersatzsession
DNUG 38: "Einen Rahmen schaffen: Vorteile durch Frameworks in der Domino-Webe...
Fix & fertig: Best Practises für "XPages-Migranten"
Xpages - oder was man mit einer alten Notes-DB so alles anstellen kann
Out of the Blue - the Workflow in Bluemix Development
Find your data
Java & Notes - Mit Eclipse neue Features für Notes entwickeln | C.Habermueller
Out of the Blue: Getting started with IBM Bluemix development
MWLUG 2016 : AD117 : Xpages & jQuery DataTables
XPages on Bluemix - the Do's and Dont's
A World Without Applications
Ad

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

PDF
OpenNTF Domino API (ODA): Super-Charging Domino Development
PDF
Engage 2014 OpenNTF Domino API Slides
PDF
Getting Started with the OpenNTF Domino API
PPTX
BP207 - Meet the Java Application Server You Already Own – IBM Domino
PDF
ICON UK 2015 - ODA and CrossWorlds
PDF
Sutol 2016 - Automation is developer's friend
PDF
Social Connections 2015 CrossWorlds and Domino
PDF
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
ODP
IBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By Example
PPTX
The power of dots
ODP
RESTful services on IBM Domino/XWork (SUTOL 11 Nov. 2015 in Prague)
PDF
OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...
PDF
xpages & dojo
ODP
Dev01 - Don't Reinvent the Wheel
PDF
CrossWorlds: Unleash the Power of Domino for Connections Development
PDF
OpenNTF Overview 09/10
PDF
Beyond Domino Designer
ODP
OpenNTF Essentials
PDF
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
PDF
OpenNTF Webinar - October 2021: Return of the DOTS
OpenNTF Domino API (ODA): Super-Charging Domino Development
Engage 2014 OpenNTF Domino API Slides
Getting Started with the OpenNTF Domino API
BP207 - Meet the Java Application Server You Already Own – IBM Domino
ICON UK 2015 - ODA and CrossWorlds
Sutol 2016 - Automation is developer's friend
Social Connections 2015 CrossWorlds and Domino
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
IBM Connect 2014 - AD204: What's new in the IBM Domino Objects: By Example
The power of dots
RESTful services on IBM Domino/XWork (SUTOL 11 Nov. 2015 in Prague)
OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...
xpages & dojo
Dev01 - Don't Reinvent the Wheel
CrossWorlds: Unleash the Power of Domino for Connections Development
OpenNTF Overview 09/10
Beyond Domino Designer
OpenNTF Essentials
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
OpenNTF Webinar - October 2021: Return of the DOTS

More from Oliver Busse (6)

PDF
HCL Domino Volt - der NSF Killer?
PPTX
Outlook becomes a Team Player - with a clever add-in
PDF
The NERD stuff - opening for Domino to the modern web developer
PDF
DNUG Development Day 2019
PDF
DNUG44 Watson Workspace
PPTX
Paradiesisch - OpenNTF
HCL Domino Volt - der NSF Killer?
Outlook becomes a Team Player - with a clever add-in
The NERD stuff - opening for Domino to the modern web developer
DNUG Development Day 2019
DNUG44 Watson Workspace
Paradiesisch - OpenNTF

Recently uploaded (20)

PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Online Work Permit System for Fast Permit Processing
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPT
Introduction Database Management System for Course Database
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
System and Network Administration Chapter 2
PDF
AI in Product Development-omnex systems
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
top salesforce developer skills in 2025.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Introduction to Artificial Intelligence
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
VVF-Customer-Presentation2025-Ver1.9.pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Online Work Permit System for Fast Permit Processing
2025 Textile ERP Trends: SAP, Odoo & Oracle
Understanding Forklifts - TECH EHS Solution
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Which alternative to Crystal Reports is best for small or large businesses.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PTS Company Brochure 2025 (1).pdf.......
Design an Analysis of Algorithms I-SECS-1021-03
Introduction Database Management System for Course Database
ISO 45001 Occupational Health and Safety Management System
System and Network Administration Chapter 2
AI in Product Development-omnex systems
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
top salesforce developer skills in 2025.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Introduction to Artificial Intelligence
Wondershare Filmora 15 Crack With Activation Key [2025

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