SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
OpenNTF Domino API:
The Community API
Paul Withers – Intec Systems Ltd
Martin Jinoch
20-3-2014 @EngageUG #engageug 1
Paul Withers
• IBM Champion
• Author of XPages Extension Library
• OpenNTF Director
• Co-Developer of OpenNTF Domino
API
20-3-2014 @EngageUG #engageug 2
Martin Jinoch
• Notes developer since version 3.0
• Java/XPages
• Source control
• Test driven development
20-3-2014 @EngageUG #engageug 3
Agenda
•Why Did We Bother?
•Deployment and Configuration
•What’s Available?
•How Do I Convert My Code?
20-3-2014 @EngageUG #engageug 4
Why Bother?
20-3-2014 @EngageUG #engageug 5
* See http://www.shoeboxblog.com/wp-content/uploads/2010/02/life-before-
google-500x496.jpg
Why Java?
• One install per server
• Run contexts
• XPages
• Java / JAR Design Elements
• Agents (slightly different deployment model)
• Applets / Servlets
• Plugins (Client/Designer/OSGi)
• DOTS Tasks
• SSJS just runs Java methods
• So most classes and methods are available in SSJS as well!
20-3-2014 @EngageUG #engageug 6
Why Develop It?
• Bridge gap between LotusScript and Java developers
• Remove risk of infinite loops in DocumentCollections
• No need to recycle
• Take advantage of List and Sets (Collections)
• More intuitively named parameters
• No need to catch NotesExceptions
• Pass more Java objects to methods
• Lots of helper methods
• In context Javadocs
20-3-2014 @EngageUG #engageug 7
After?
Paul Withers: I have a checkIsUnique() method that you
pass a View, a Key, and the current Document. Would that
be a useful addition to DominoUtils?
Nathan T. Freeman: sure that looks useful
Nathan T. Freeman: BUT...
Nathan T. Freeman: you're forgetting something
Nathan T. Freeman: you own the API :)
Nathan T. Freeman: View.checkUnique(Object key,
Document doc)
20-3-2014 @EngageUG #engageug 8
Why Use It?
• Upgrading to 9.0.1 (can be forked for 9.0)
• Open source can be used
• Don’t want to work out where you need to recycle now
• Didn’t realise DateTimes and Vectors were so toxic
• You prefer beer and chocolate and User Groups!
20-3-2014 @EngageUG #engageug 9
Agenda
•Why Did We Bother?
•Deployment and Configuration
•What’s Available?
•How Do I Convert My Code?
20-3-2014 @EngageUG #engageug 10
Deployment
• Download from OpenNTF or download as part of
OpenNTF Essentials from http://essentials.openntf.org
• Upload Update Site to server
• Issue console command “restart task http”
• Sufficient for OSGi-dependent contexts since M4
20-3-2014 @EngageUG #engageug 11
Deployment to Client / Designer
• Install Update Site or
OpenNTF Essentials
via Widget Catalog
or via File > Application
> Install
• Designed for Server
and Client 9.0.1
20-3-2014 @EngageUG #engageug 12
Enable Library for Each NSF
• No draggable components, so we can’t enable it for you
• Enable on Page Generation tab of Xsp Properties
20-3-2014 @EngageUG #engageug 13
Configure Xsp Properties
• org.openntf.domino.xsp=
• godmode: session & database auto-converted to
org.openntf.domino
• marcel: always convert MIME
• raid: run in debug mode
• khan: turn on all fixes, e.g. appendItemValue()
“I am…better.”
“At what?”
“Everything.”
• e.g. org.openntf.domino.xsp=godmode,mime,khan
20-3-2014 @EngageUG #engageug 14
Configure Xsp Properties for OpenLog
•Same as in XPages OpenLog Logger
• xsp.openlog.filepath
• xsp.openlog.displayError
• xsp.openlog.genericErrorMessage
• xsp.openlog.email
• xsp.openlog.debugLevel
• xsp.openlog.suppressEventTrace
20-3-2014 @EngageUG #engageug 15
Agenda
•Why Did We Bother?
•Deployment and Configuration
•What’s Available?
•How Do I Convert My Code?
20-3-2014 @EngageUG #engageug 16
Packages
• org.openntf.domino: core code
• org.openntf.domino.designer: future DDE-specific code
• org.openntf.domino.plugin: core packaged in a plugin
• If you want to modify and test, build this
• org.openntf.domino.xsp: OSGi-specific code
• org.openntf.domino.xsp.feature: feature project
• org.openntf.domino.xsp.update: update site project
• Delete features & plugins folders, open site.xml, click Build All
and export as General > File System
20-3-2014 @EngageUG #engageug 17
Core API Packages
• org.openntf.domino
• Core Domino API interfaces
• Import classes from this package
• org.openntf.domino.ext
• Extension interfaces
• Look here for methods we’ve added
• org.openntf.domino.impl
• Implementations of interfaces
• Look here for the actual code
20-3-2014 @EngageUG #engageug 18
Key Additions
• XPages OpenLog Logger
• Transactional Processing
• Database Event Listeners
• Graph Database
• Jobs and Tasks
• Email Helper
• Sync Helper
• Document Scanner
• Index Database
20-3-2014 @EngageUG #engageug 19
Work in Progress
• Classes for ALL Design Elements
• Data Schemas
• Name / Value Picker DataProviders
• Read / write XPages, Custom
Controls, JARs
• Recycle performance optimisation
• Index Database optimisation
• Collection sorting and progress
serialisation
• AtFormulaParser – quicker
20-3-2014 @EngageUG #engageug 20
Demo
20-3-2014 @EngageUG #engageug 21
Agenda
•Why Did We Bother?
•Deployment and Configuration
•What’s Available?
•How Do I Convert My Code?
20-3-2014 @EngageUG #engageug 22
How do I convert my code?
1. Do nothing and use old code with a new one
together (not recommended!)
2. Replace all implicit objects via godmode
3. Search and replace imports (lotus.domino ->
org.openntf.domino)
4. Remove unnecessary code (try catch blocks,
“throws NotesException”, recycle() calls, …)
5. Enjoy the power of helper methods
20-3-2014 @EngageUG #engageug 23
How do I convert my code
• Use old code with new one together
Converting from new API objects to original and
back via Factory.fromLotus() and Factory.toLotus()
methods
• org.openntf.domino.xsp=godmode
iddqd anyone?
• Change import lotus.domino -> org.openntf.domino
Search and replace in DDE can do this for you for
a whole project
20-3-2014 @EngageUG #engageug 24
Demo
20-3-2014 @EngageUG #engageug 25
Links
• Project on OpenNTF -
http://www.openntf.org/internal/home.nsf/project.xsp?actio
n=openDocument&name=OpenNTF%20Domino%20API
• OpenNTF Essentials - http://essentials.openntf.org/
• Source code on GitHub - https://github.com/OpenNTF/
• Wiki articles -
https://github.com/OpenNTF/org.openntf.domino/wiki/_pag
es
• OpenNTF Webinar (last year) -
http://www.youtube.com/watch?v=g-u2IEEPAfM
20-3-2014 @EngageUG #engageug 26
Questions!
• Paul Withers
• Intec Systems Ltd
• pwithers@intec.co.uk
• http://www.intec.co.uk/blog
• twitter.com/paulswithers
• Martin Jinoch
• http://jinoch.cz
• twitter.com/mjinoch
20-3-2014 @EngageUG #engageug 27

Más contenido relacionado

La actualidad más candente

Ruby projects of interest for DevOps
Ruby projects of interest for DevOpsRuby projects of interest for DevOps
Ruby projects of interest for DevOps
Ricardo Sanchez
 
Automating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and PerlAutomating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and Perl
nohuhu
 

La actualidad más candente (20)

Celery introduction
Celery introductionCelery introduction
Celery introduction
 
Ancient To Modern: Upgrading nearly a decade of Plone in public radio
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
 
XNA L01–Introduction
XNA L01–IntroductionXNA L01–Introduction
XNA L01–Introduction
 
Developer-friendly taskqueues: What you should ask yourself before choosing one
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
 
Developing OpenResty Framework
Developing OpenResty FrameworkDeveloping OpenResty Framework
Developing OpenResty Framework
 
SP24S053 Introduction to PowerShell for SharePoint Developers and Administrators
SP24S053 Introduction to PowerShell for SharePoint Developers and AdministratorsSP24S053 Introduction to PowerShell for SharePoint Developers and Administrators
SP24S053 Introduction to PowerShell for SharePoint Developers and Administrators
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript Debugging
 
Functional Programming in Clojure
Functional Programming in ClojureFunctional Programming in Clojure
Functional Programming in Clojure
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScript
 
Fluentd v1 and Roadmap
Fluentd v1 and RoadmapFluentd v1 and Roadmap
Fluentd v1 and Roadmap
 
PharoDAYS 2015: Pharo Status - by Markus Denker
PharoDAYS 2015: Pharo Status - by Markus DenkerPharoDAYS 2015: Pharo Status - by Markus Denker
PharoDAYS 2015: Pharo Status - by Markus Denker
 
Building RESTful APIs
Building RESTful APIsBuilding RESTful APIs
Building RESTful APIs
 
Ruby projects of interest for DevOps
Ruby projects of interest for DevOpsRuby projects of interest for DevOps
Ruby projects of interest for DevOps
 
Django rest framework tips and tricks
Django rest framework   tips and tricksDjango rest framework   tips and tricks
Django rest framework tips and tricks
 
I18nize Scala programs à la gettext
I18nize Scala programs à la gettextI18nize Scala programs à la gettext
I18nize Scala programs à la gettext
 
F# on the Web
F# on the WebF# on the Web
F# on the Web
 
A Brief History of OWIN
A Brief History of OWINA Brief History of OWIN
A Brief History of OWIN
 
Automating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and PerlAutomating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and Perl
 
Ansible API
Ansible APIAnsible API
Ansible API
 
Reflection in Pharo5
Reflection in Pharo5Reflection in Pharo5
Reflection in Pharo5
 

Similar a Engage 2014 OpenNTF Domino API Slides

High-level Guide: Upgrading to SharePoint 2013
High-level Guide: Upgrading to SharePoint 2013High-level Guide: Upgrading to SharePoint 2013
High-level Guide: Upgrading to SharePoint 2013
C5 Insight
 
SendGrid documentation & open source projects
SendGrid documentation & open source projectsSendGrid documentation & open source projects
SendGrid documentation & open source projects
SendGrid JP
 

Similar a Engage 2014 OpenNTF Domino API Slides (20)

AD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension LibraryAD1545 - Extending the XPages Extension Library
AD1545 - Extending the XPages Extension Library
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications Engage 2019: Modernising Your Domino and XPages Applications
Engage 2019: Modernising Your Domino and XPages Applications
 
SamSegalResume
SamSegalResumeSamSegalResume
SamSegalResume
 
High-level Guide: Upgrading to SharePoint 2013
High-level Guide: Upgrading to SharePoint 2013High-level Guide: Upgrading to SharePoint 2013
High-level Guide: Upgrading to SharePoint 2013
 
Continuous Deployment
Continuous DeploymentContinuous Deployment
Continuous Deployment
 
Making the Agile Leap to Continuous Deployment
Making the Agile Leap to Continuous DeploymentMaking the Agile Leap to Continuous Deployment
Making the Agile Leap to Continuous Deployment
 
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
 
python full stack course in hyderabad...
python full stack course in hyderabad...python full stack course in hyderabad...
python full stack course in hyderabad...
 
python full stack course in hyderabad...
python full stack course in hyderabad...python full stack course in hyderabad...
python full stack course in hyderabad...
 
Introducing wsgi_lineprof / PyCon JP 2017 LT
Introducing wsgi_lineprof / PyCon JP 2017 LTIntroducing wsgi_lineprof / PyCon JP 2017 LT
Introducing wsgi_lineprof / PyCon JP 2017 LT
 
Engage 2018 adm04 - The lazy admin wins
Engage 2018   adm04 - The lazy admin winsEngage 2018   adm04 - The lazy admin wins
Engage 2018 adm04 - The lazy admin wins
 
Engage 2018 adm04 The lazy admin wins
Engage 2018   adm04 The lazy admin winsEngage 2018   adm04 The lazy admin wins
Engage 2018 adm04 The lazy admin wins
 
SendGrid documentation & open source projects
SendGrid documentation & open source projectsSendGrid documentation & open source projects
SendGrid documentation & open source projects
 
Engage 2020-nerd-for-move-on-from-x pages
Engage 2020-nerd-for-move-on-from-x pagesEngage 2020-nerd-for-move-on-from-x pages
Engage 2020-nerd-for-move-on-from-x pages
 
Building a Kubernetes Powered Central Go Modules Repository
Building a Kubernetes Powered Central Go Modules RepositoryBuilding a Kubernetes Powered Central Go Modules Repository
Building a Kubernetes Powered Central Go Modules Repository
 
Sitecore user group mumbai sitecore commerce extension
Sitecore user group mumbai  sitecore commerce extensionSitecore user group mumbai  sitecore commerce extension
Sitecore user group mumbai sitecore commerce extension
 
Performance tuning
Performance tuningPerformance tuning
Performance tuning
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
 

Más de Paul Withers

Más de Paul Withers (20)

Engage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-RedEngage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-Red
 
Engage 2019: AI What Is It Good For
Engage 2019: AI What Is It Good ForEngage 2019: AI What Is It Good For
Engage 2019: AI What Is It Good For
 
Social Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open SourceSocial Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open Source
 
ICONUK 2018 - Do You Wanna Build a Chatbot
ICONUK 2018 - Do You Wanna Build a ChatbotICONUK 2018 - Do You Wanna Build a Chatbot
ICONUK 2018 - Do You Wanna Build a Chatbot
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
 
IBM Think Session 3249 Watson Work Services Java SDK
IBM Think Session 3249 Watson Work Services Java SDKIBM Think Session 3249 Watson Work Services Java SDK
IBM Think Session 3249 Watson Work Services Java SDK
 
GraphQL 101
GraphQL 101GraphQL 101
GraphQL 101
 
GraphQL 101
GraphQL 101GraphQL 101
GraphQL 101
 
OpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentOpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino Development
 
AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...
AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...
AD1279 "Marty, You're Not Thinking Fourth Dimensionally" - Troubleshooting XP...
 
Social Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and DominoSocial Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and Domino
 
ICON UK 2015 - ODA and CrossWorlds
ICON UK 2015 - ODA and CrossWorldsICON UK 2015 - ODA and CrossWorlds
ICON UK 2015 - ODA and CrossWorlds
 
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...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
 
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and ScalabilityIBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
 
OpenNTF Domino API - Overview Introduction
OpenNTF Domino API - Overview IntroductionOpenNTF Domino API - Overview Introduction
OpenNTF Domino API - Overview Introduction
 
What's New and Next in OpenNTF Domino API (ICON UK 2014)
What's New and Next in OpenNTF Domino API (ICON UK 2014)What's New and Next in OpenNTF Domino API (ICON UK 2014)
What's New and Next in OpenNTF Domino API (ICON UK 2014)
 
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...
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
 
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages HeavenIBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
IBM Connect 2014 BP204: It's Not Infernal: Dante's Nine Circles of XPages Heaven
 
Embracing the power of the notes client
Embracing the power of the notes clientEmbracing the power of the notes client
Embracing the power of the notes client
 
Beyond Domino Designer
Beyond Domino DesignerBeyond Domino Designer
Beyond Domino Designer
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Engage 2014 OpenNTF Domino API Slides

  • 1. OpenNTF Domino API: The Community API Paul Withers – Intec Systems Ltd Martin Jinoch 20-3-2014 @EngageUG #engageug 1
  • 2. Paul Withers • IBM Champion • Author of XPages Extension Library • OpenNTF Director • Co-Developer of OpenNTF Domino API 20-3-2014 @EngageUG #engageug 2
  • 3. Martin Jinoch • Notes developer since version 3.0 • Java/XPages • Source control • Test driven development 20-3-2014 @EngageUG #engageug 3
  • 4. Agenda •Why Did We Bother? •Deployment and Configuration •What’s Available? •How Do I Convert My Code? 20-3-2014 @EngageUG #engageug 4
  • 5. Why Bother? 20-3-2014 @EngageUG #engageug 5 * See http://www.shoeboxblog.com/wp-content/uploads/2010/02/life-before- google-500x496.jpg
  • 6. Why Java? • One install per server • Run contexts • XPages • Java / JAR Design Elements • Agents (slightly different deployment model) • Applets / Servlets • Plugins (Client/Designer/OSGi) • DOTS Tasks • SSJS just runs Java methods • So most classes and methods are available in SSJS as well! 20-3-2014 @EngageUG #engageug 6
  • 7. Why Develop It? • Bridge gap between LotusScript and Java developers • Remove risk of infinite loops in DocumentCollections • No need to recycle • Take advantage of List and Sets (Collections) • More intuitively named parameters • No need to catch NotesExceptions • Pass more Java objects to methods • Lots of helper methods • In context Javadocs 20-3-2014 @EngageUG #engageug 7
  • 8. After? Paul Withers: I have a checkIsUnique() method that you pass a View, a Key, and the current Document. Would that be a useful addition to DominoUtils? Nathan T. Freeman: sure that looks useful Nathan T. Freeman: BUT... Nathan T. Freeman: you're forgetting something Nathan T. Freeman: you own the API :) Nathan T. Freeman: View.checkUnique(Object key, Document doc) 20-3-2014 @EngageUG #engageug 8
  • 9. Why Use It? • Upgrading to 9.0.1 (can be forked for 9.0) • Open source can be used • Don’t want to work out where you need to recycle now • Didn’t realise DateTimes and Vectors were so toxic • You prefer beer and chocolate and User Groups! 20-3-2014 @EngageUG #engageug 9
  • 10. Agenda •Why Did We Bother? •Deployment and Configuration •What’s Available? •How Do I Convert My Code? 20-3-2014 @EngageUG #engageug 10
  • 11. Deployment • Download from OpenNTF or download as part of OpenNTF Essentials from http://essentials.openntf.org • Upload Update Site to server • Issue console command “restart task http” • Sufficient for OSGi-dependent contexts since M4 20-3-2014 @EngageUG #engageug 11
  • 12. Deployment to Client / Designer • Install Update Site or OpenNTF Essentials via Widget Catalog or via File > Application > Install • Designed for Server and Client 9.0.1 20-3-2014 @EngageUG #engageug 12
  • 13. Enable Library for Each NSF • No draggable components, so we can’t enable it for you • Enable on Page Generation tab of Xsp Properties 20-3-2014 @EngageUG #engageug 13
  • 14. Configure Xsp Properties • org.openntf.domino.xsp= • godmode: session & database auto-converted to org.openntf.domino • marcel: always convert MIME • raid: run in debug mode • khan: turn on all fixes, e.g. appendItemValue() “I am…better.” “At what?” “Everything.” • e.g. org.openntf.domino.xsp=godmode,mime,khan 20-3-2014 @EngageUG #engageug 14
  • 15. Configure Xsp Properties for OpenLog •Same as in XPages OpenLog Logger • xsp.openlog.filepath • xsp.openlog.displayError • xsp.openlog.genericErrorMessage • xsp.openlog.email • xsp.openlog.debugLevel • xsp.openlog.suppressEventTrace 20-3-2014 @EngageUG #engageug 15
  • 16. Agenda •Why Did We Bother? •Deployment and Configuration •What’s Available? •How Do I Convert My Code? 20-3-2014 @EngageUG #engageug 16
  • 17. Packages • org.openntf.domino: core code • org.openntf.domino.designer: future DDE-specific code • org.openntf.domino.plugin: core packaged in a plugin • If you want to modify and test, build this • org.openntf.domino.xsp: OSGi-specific code • org.openntf.domino.xsp.feature: feature project • org.openntf.domino.xsp.update: update site project • Delete features & plugins folders, open site.xml, click Build All and export as General > File System 20-3-2014 @EngageUG #engageug 17
  • 18. Core API Packages • org.openntf.domino • Core Domino API interfaces • Import classes from this package • org.openntf.domino.ext • Extension interfaces • Look here for methods we’ve added • org.openntf.domino.impl • Implementations of interfaces • Look here for the actual code 20-3-2014 @EngageUG #engageug 18
  • 19. Key Additions • XPages OpenLog Logger • Transactional Processing • Database Event Listeners • Graph Database • Jobs and Tasks • Email Helper • Sync Helper • Document Scanner • Index Database 20-3-2014 @EngageUG #engageug 19
  • 20. Work in Progress • Classes for ALL Design Elements • Data Schemas • Name / Value Picker DataProviders • Read / write XPages, Custom Controls, JARs • Recycle performance optimisation • Index Database optimisation • Collection sorting and progress serialisation • AtFormulaParser – quicker 20-3-2014 @EngageUG #engageug 20
  • 22. Agenda •Why Did We Bother? •Deployment and Configuration •What’s Available? •How Do I Convert My Code? 20-3-2014 @EngageUG #engageug 22
  • 23. How do I convert my code? 1. Do nothing and use old code with a new one together (not recommended!) 2. Replace all implicit objects via godmode 3. Search and replace imports (lotus.domino -> org.openntf.domino) 4. Remove unnecessary code (try catch blocks, “throws NotesException”, recycle() calls, …) 5. Enjoy the power of helper methods 20-3-2014 @EngageUG #engageug 23
  • 24. How do I convert my code • Use old code with new one together Converting from new API objects to original and back via Factory.fromLotus() and Factory.toLotus() methods • org.openntf.domino.xsp=godmode iddqd anyone? • Change import lotus.domino -> org.openntf.domino Search and replace in DDE can do this for you for a whole project 20-3-2014 @EngageUG #engageug 24
  • 26. Links • Project on OpenNTF - http://www.openntf.org/internal/home.nsf/project.xsp?actio n=openDocument&name=OpenNTF%20Domino%20API • OpenNTF Essentials - http://essentials.openntf.org/ • Source code on GitHub - https://github.com/OpenNTF/ • Wiki articles - https://github.com/OpenNTF/org.openntf.domino/wiki/_pag es • OpenNTF Webinar (last year) - http://www.youtube.com/watch?v=g-u2IEEPAfM 20-3-2014 @EngageUG #engageug 26
  • 27. Questions! • Paul Withers • Intec Systems Ltd • pwithers@intec.co.uk • http://www.intec.co.uk/blog • twitter.com/paulswithers • Martin Jinoch • http://jinoch.cz • twitter.com/mjinoch 20-3-2014 @EngageUG #engageug 27