Your SlideShare is downloading. ×
Engage 2014 OpenNTF Domino API Slides
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Engage 2014 OpenNTF Domino API Slides

1,273
views

Published on

Presentation by Paul Withers and Martin Jinoch at Engage 2014 about OpenNTF Domino API

Presentation by Paul Withers and Martin Jinoch at Engage 2014 about OpenNTF Domino API

Published in: Technology

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,273
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
32
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 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
  • 21. Demo 20-3-2014 @EngageUG #engageug 21
  • 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
  • 25. Demo 20-3-2014 @EngageUG #engageug 25
  • 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