SlideShare a Scribd company logo
LSBG Vårseminar, maj 2011 Larvik, Norge Plug yourself in and your applications will never be the same! (An introduction to plugin development for Lotus Notes, Domino and Sametime)
About me Developer: Notes / Domino / Sametime / Java / DB2 / WebSphere / web / plug-ins
Design Partner for Domino NEXT and Lotus Connections 3.0
Active blogger: lekkimworld.com
Speaker at Lotusphere
Articles for THE VIEW
E-mail: mh@intravision.dk
.com/lekkim
What I do! Well plugins of course... But ”plugins” are a many-headed beast! It's not just ”stuff” for the Notes sidebar
It's about extending the UI in Notes, Sametime  and Symphony
It's about delivering a UI capable of doing  stuff you cannot do in ”traditional” Notes
It's about developing custom components for  the XPages Extensibility Library
It's about DOTS (previously JAVADDIN) and OSGi  on the Lotus Domino Server
Why I do it! Plugin development is often about integration You often build extensions to existing applications to add functionality
Eclipse and therefore Expeditor, Notes, Symphony, and Sametime, are built to allow for extensibility Plugin development has several advantages Java Mature
Well Adopted
Multi-platform
Libraries Eclipse Community Web Services
Web Applications
Database Integrations
etc....
What's possible with plugins Torsdag, sal 1, 11:20-12:00 - Ta samarbeid og planlegging til neste nivå
RedWiki for plugin development Lotus Notes and Domino Application Development wiki / IBM Redbook Publications http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Table_of_Contents_Developing_Customized_Components_for_Lotus_Notes_Sametime_and_Symphony
...or use the bit.ly link >> http://bit.ly/pluginredwiki
What I'm going to build (if time permits) Sidebar panel containing A list box
Three buttons at the bottom One button reads from a web service
One button reads contacts from names.nsf
One button creates a new email Reads recipient from list
Create document
Set subject
Add data from web service call to body Create a feature for the plugin
Create an update site with the feature
Create a widget for the feature from the update site
Agenda About Eclipse and Lotus Expeditor Toolkit
Installing Lotus Expeditor Toolkit
Plugin Development Basics
Building UI's  with SWT and JFace
Jobs, Jobs, Jobs
Logging
APIs
Debugging
Deployment
Resources / Q&A
Eclipse architecture Workbench JFace SWT Core Extension Point Framework Service Framework Rich Client Platform Plug-in Plug-in Extension Pt. Plug-in Extension Point Extension Point Extension Point A software component in Eclipse Extension Point declares contract to extend plug-in functionality Extension code extends this functionality RCP allows you to build GUI apps on multiple OS SWT provides  uniform UI API across multiple OS that calls  OS UI API for native look and feel JFace provides  components to make it easier to write a GUI e.g. wizards, preference pages, actions, dialogs  Workbench is desktop UI and customizable Service Framework supports registration and lifecycle management of  plug-ins
IBM Lotus Clients – built on Eclipse Sametime Expeditor Apps and Plug-ins (ISV + Customer) Notes Symphony Industry knowledge  and experience ecosystem of  partners open and  extensible collaborative services Integrated applications Portal Browser Desktop Mobile Multiplatform support Scalability Security
Eclipse workbench
Notes workbench s
Lotus Expeditor (XPD) Toolkit An integrated set of tools to develop, test, and deploy applications built on top of Expeditor Supports Expeditor, Sametime, Notes and Symphony
FREE! No charge to use the Expeditor toolkit
Supported on Windows and Linux operating systems Benefits Of Using The Toolkit Easily configure your development environment to develop for the platforms above Takes ~ 1 minute to configure your environment Set your target environment
Point to the target locations on your machine Provides a new launcher to launch products built on top of Expeditor Create a new launch configuration to launch the application from Eclipse Provides numerous samples to get your started developing for Expeditor based products
Installing XPD Toolkit (1) Download the XPD Toolkit http://bit.ly/fKMF5o
Unzip In Eclipse 3.4(.2) Help -> Software Updates... http://www.eclipse.org/downloads/packages/eclipse-rcpplug-developers/ganymedesr2
Installing XPD Toolkit (2) Click New Local Site...
Browse to unziped update  site
Select OK
Installing XPD Toolkit (3) Select The XPD Toolkit
Click Install...

More Related Content

ODP
Lotusphere 2011 Jmp103 - Jumpstart Your "Jedi Plug-in Development Skills" wi...
PPT
Titanium Meetup Deck
PPTX
Getting started with Appcelerator Titanium
PPTX
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
PPTX
Titanium Appcelerator - Beginners
PDF
Introduction to html5 game programming with impact js
PPTX
Learning C# iPad Programming
Lotusphere 2011 Jmp103 - Jumpstart Your "Jedi Plug-in Development Skills" wi...
Titanium Meetup Deck
Getting started with Appcelerator Titanium
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
Titanium Appcelerator - Beginners
Introduction to html5 game programming with impact js
Learning C# iPad Programming

What's hot (20)

PPT
OSCON Titanium Tutorial
PDF
Android programming-basics
PDF
Cordova: APIs and instruments
PPTX
Titanium Studio [Updated - 18/12/2011]
PPTX
Eclipse e4 on Java Forum Stuttgart 2010
PPTX
[Devoxx Morocco 2015] Apache Cordova In Action
PPTX
[ApacheCon 2016] Advanced Apache Cordova
PPTX
Building apps for multiple devices
PDF
Getting started with ibm worklight tips
PPT
Core Java Slides
PPTX
Appium Mobile Testing: Nakov at BurgasConf - July 2021
PDF
An overview of the architecture of electron.js
PDF
Architecting iOS Project
PPTX
Java Programming (M&M)
PDF
[2015/2016] Apache Cordova
PPTX
Apache Cordova In Action
PPT
Desarrollo AIR Mobile
PPTX
Appium Meetup #2 - Mobile Web Automation Introduction
PDF
Tellurium At Rich Web Experience2009
DOCX
Class notes(week 10) on applet programming
OSCON Titanium Tutorial
Android programming-basics
Cordova: APIs and instruments
Titanium Studio [Updated - 18/12/2011]
Eclipse e4 on Java Forum Stuttgart 2010
[Devoxx Morocco 2015] Apache Cordova In Action
[ApacheCon 2016] Advanced Apache Cordova
Building apps for multiple devices
Getting started with ibm worklight tips
Core Java Slides
Appium Mobile Testing: Nakov at BurgasConf - July 2021
An overview of the architecture of electron.js
Architecting iOS Project
Java Programming (M&M)
[2015/2016] Apache Cordova
Apache Cordova In Action
Desarrollo AIR Mobile
Appium Meetup #2 - Mobile Web Automation Introduction
Tellurium At Rich Web Experience2009
Class notes(week 10) on applet programming
Ad

Viewers also liked (17)

PPTX
OnTime Partner Webinar September 2011
ODP
Plug yourself in and your app will never be the same (1 hr edition)
PPTX
Lotus Community Call - 22 March 2011
PPT
Lotusphere Comes To You 2011
ODP
Plug yourself in and your app will never be the same (2 hour edition)
PDF
BP205: There’s an API for that! Why and how to build on the IBM Connections P...
PPTX
IBM Connections 5 Gæstemodel
PPTX
Lotus Notes Plugin Installation For Dummies
ODP
BP309 Project Management Inside and Outside the Box
PDF
BP207 - Easy as pie creating widgets for ibm connections
PPT
Creating a keystore for plugin signing the easy way
PPTX
Introduction to OAuth
PDF
Social Connections VI Prague - An introduction to ibm connections as an appde...
PDF
BP301 - An introduction to working with the activity stream
PPTX
There’s an API for that! Why and how to build on the IBM Connections PLATFORM
PPTX
Introduction to OAuth 2.0 - the technology you need but never really learned
PPTX
An Introduction to Working With the Activity Stream
OnTime Partner Webinar September 2011
Plug yourself in and your app will never be the same (1 hr edition)
Lotus Community Call - 22 March 2011
Lotusphere Comes To You 2011
Plug yourself in and your app will never be the same (2 hour edition)
BP205: There’s an API for that! Why and how to build on the IBM Connections P...
IBM Connections 5 Gæstemodel
Lotus Notes Plugin Installation For Dummies
BP309 Project Management Inside and Outside the Box
BP207 - Easy as pie creating widgets for ibm connections
Creating a keystore for plugin signing the easy way
Introduction to OAuth
Social Connections VI Prague - An introduction to ibm connections as an appde...
BP301 - An introduction to working with the activity stream
There’s an API for that! Why and how to build on the IBM Connections PLATFORM
Introduction to OAuth 2.0 - the technology you need but never really learned
An Introduction to Working With the Activity Stream
Ad

Similar to Plug yourself in and your app will never be the same (2 hr editon) (20)

PPT
Introduction To Eclipse RCP
PPT
ITU - MDD - Eclipse Plug-ins
PPT
"Eclipse Application Development" at GNUnify 07
PDF
Eclipse plug in development
PDF
Overview of Eclipse technologies
PPTX
IBM Connect 2016: Speaker Session with Teresa Deane, Senior Developer, BCC
PDF
Dr. Strangelove, or how I learned to love plugin development
ODP
Introduction To The Eclipse Platform
PPT
Eclipse Training - Introduction
PPTX
Eclipse Overview
PPTX
Building Eclipse Plugins
PPTX
Eclipse RCP Overview @ Rheinjug
PPT
BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...
PPT
Creation&imitation
PPT
eclipse.dk - Eclipse RCP Under the Hood
PDF
Eclipse_Building_Blocks
PPTX
BP207 - Meet the Java Application Server You Already Own – IBM Domino
PDF
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
PPT
Eclipse Plug-in Develompent Tips And Tricks
PPTX
Eclipse Developement @ Progress Software
Introduction To Eclipse RCP
ITU - MDD - Eclipse Plug-ins
"Eclipse Application Development" at GNUnify 07
Eclipse plug in development
Overview of Eclipse technologies
IBM Connect 2016: Speaker Session with Teresa Deane, Senior Developer, BCC
Dr. Strangelove, or how I learned to love plugin development
Introduction To The Eclipse Platform
Eclipse Training - Introduction
Eclipse Overview
Building Eclipse Plugins
Eclipse RCP Overview @ Rheinjug
BP218 IBM Lotus Notes 8 and IBM Lotus Expeditor Customization for LotusScript...
Creation&imitation
eclipse.dk - Eclipse RCP Under the Hood
Eclipse_Building_Blocks
BP207 - Meet the Java Application Server You Already Own – IBM Domino
From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Lib...
Eclipse Plug-in Develompent Tips And Tricks
Eclipse Developement @ Progress Software

Recently uploaded (20)

PDF
Modernizing your data center with Dell and AMD
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Electronic commerce courselecture one. Pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Big Data Technologies - Introduction.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Cloud computing and distributed systems.
PDF
Machine learning based COVID-19 study performance prediction
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Modernizing your data center with Dell and AMD
Spectral efficient network and resource selection model in 5G networks
Electronic commerce courselecture one. Pdf
Understanding_Digital_Forensics_Presentation.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Big Data Technologies - Introduction.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Review of recent advances in non-invasive hemoglobin estimation
20250228 LYD VKU AI Blended-Learning.pptx
Unlocking AI with Model Context Protocol (MCP)
The AUB Centre for AI in Media Proposal.docx
Cloud computing and distributed systems.
Machine learning based COVID-19 study performance prediction
NewMind AI Monthly Chronicles - July 2025
Chapter 3 Spatial Domain Image Processing.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

Plug yourself in and your app will never be the same (2 hr editon)

  • 1. LSBG Vårseminar, maj 2011 Larvik, Norge Plug yourself in and your applications will never be the same! (An introduction to plugin development for Lotus Notes, Domino and Sametime)
  • 2. About me Developer: Notes / Domino / Sametime / Java / DB2 / WebSphere / web / plug-ins
  • 3. Design Partner for Domino NEXT and Lotus Connections 3.0
  • 9. What I do! Well plugins of course... But ”plugins” are a many-headed beast! It's not just ”stuff” for the Notes sidebar
  • 10. It's about extending the UI in Notes, Sametime and Symphony
  • 11. It's about delivering a UI capable of doing stuff you cannot do in ”traditional” Notes
  • 12. It's about developing custom components for the XPages Extensibility Library
  • 13. It's about DOTS (previously JAVADDIN) and OSGi on the Lotus Domino Server
  • 14. Why I do it! Plugin development is often about integration You often build extensions to existing applications to add functionality
  • 15. Eclipse and therefore Expeditor, Notes, Symphony, and Sametime, are built to allow for extensibility Plugin development has several advantages Java Mature
  • 22. What's possible with plugins Torsdag, sal 1, 11:20-12:00 - Ta samarbeid og planlegging til neste nivå
  • 23. RedWiki for plugin development Lotus Notes and Domino Application Development wiki / IBM Redbook Publications http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Table_of_Contents_Developing_Customized_Components_for_Lotus_Notes_Sametime_and_Symphony
  • 24. ...or use the bit.ly link >> http://bit.ly/pluginredwiki
  • 25. What I'm going to build (if time permits) Sidebar panel containing A list box
  • 26. Three buttons at the bottom One button reads from a web service
  • 27. One button reads contacts from names.nsf
  • 28. One button creates a new email Reads recipient from list
  • 31. Add data from web service call to body Create a feature for the plugin
  • 32. Create an update site with the feature
  • 33. Create a widget for the feature from the update site
  • 34. Agenda About Eclipse and Lotus Expeditor Toolkit
  • 37. Building UI's with SWT and JFace
  • 40. APIs
  • 44. Eclipse architecture Workbench JFace SWT Core Extension Point Framework Service Framework Rich Client Platform Plug-in Plug-in Extension Pt. Plug-in Extension Point Extension Point Extension Point A software component in Eclipse Extension Point declares contract to extend plug-in functionality Extension code extends this functionality RCP allows you to build GUI apps on multiple OS SWT provides uniform UI API across multiple OS that calls OS UI API for native look and feel JFace provides components to make it easier to write a GUI e.g. wizards, preference pages, actions, dialogs Workbench is desktop UI and customizable Service Framework supports registration and lifecycle management of plug-ins
  • 45. IBM Lotus Clients – built on Eclipse Sametime Expeditor Apps and Plug-ins (ISV + Customer) Notes Symphony Industry knowledge and experience ecosystem of partners open and extensible collaborative services Integrated applications Portal Browser Desktop Mobile Multiplatform support Scalability Security
  • 48. Lotus Expeditor (XPD) Toolkit An integrated set of tools to develop, test, and deploy applications built on top of Expeditor Supports Expeditor, Sametime, Notes and Symphony
  • 49. FREE! No charge to use the Expeditor toolkit
  • 50. Supported on Windows and Linux operating systems Benefits Of Using The Toolkit Easily configure your development environment to develop for the platforms above Takes ~ 1 minute to configure your environment Set your target environment
  • 51. Point to the target locations on your machine Provides a new launcher to launch products built on top of Expeditor Create a new launch configuration to launch the application from Eclipse Provides numerous samples to get your started developing for Expeditor based products
  • 52. Installing XPD Toolkit (1) Download the XPD Toolkit http://bit.ly/fKMF5o
  • 53. Unzip In Eclipse 3.4(.2) Help -> Software Updates... http://www.eclipse.org/downloads/packages/eclipse-rcpplug-developers/ganymedesr2
  • 54. Installing XPD Toolkit (2) Click New Local Site...
  • 55. Browse to unziped update site
  • 57. Installing XPD Toolkit (3) Select The XPD Toolkit
  • 59. Installing XPD Toolkit (4) Agree to the license agreement
  • 62. Installing XPD Toolkit (5) Start IDE
  • 63. Select Test Environment Notes, Sametime, Symphony, XPD Specify Target Location Point to target runtime
  • 65. Run -> Run Configuration
  • 69. Installing XPD Toolkit – Demo Start IDE
  • 70. Select Test Environment Symphony, Sametime, Notes , Expeditor Specify Target Location Point to target runtime
  • 72. Run -> Run Configuration
  • 76. What are plugins? Plugins are the building blocks of Eclipse based applications At their core a plugin is some code plus some declarations (extension points)
  • 77. By themselves plugins may not do anything, but when you start combining plugins you can build very powerful applications
  • 78. Examples: Eclipse, Notes, Sametime, Symphony Application Plugin
  • 79. Anatomy of a plugin Java code (optional)
  • 80. Manifest.mf Basic properties of a plugin
  • 81. Specifies dependencies this plugin has Plugin.xml Extension points the plugin uses / defines Build.properties Manages the build configuration of the plugin Resources (optional) Jars the plugin may need
  • 82. Files used for translation
  • 85. Demo: Creating a plugin project File -> New -> Project -> Plugin Development
  • 87. Extension Points Extension points make plugins “pluggable” Plugins define extension points for other plugins to use Examples: sidebar, toolbar buttons, right click menus... Extension points allow the platform to be more performant
  • 88. Eclipse has a nice editor for adding and defining extension points How do I know what extension points are available? Eclipse.org and the Expeditor wiki are your friends Plugin Using Extension Point Extension Point Definition
  • 89. Key Extension Points org.eclipse.ui.views Registers a view part with the platform
  • 90. View parts can be used inside perspectives or in the sidebar com.ibm.rcp.ui.shelfView An Expeditor extension point
  • 91. Used to add a view part to the sidebar org.eclipse.ui.actionSets Used to add top level toolbars and menus org.eclipse.ui.menus Used to add context menus org.eclipse.ui.preferencePages Used to add preference pages to the preferences
  • 92. The arcane art of building UI's
  • 93. UI's are built using code UI's are built using Java code adding widgets (controls) to containes (composites)
  • 94. custom drawn using Java code to listen for paint events In either case it isn't WYSIWYG :-(
  • 95. Standard Widget Toolkit (SWT) Platform native look and feel …
  • 96. Protection from OS Level Changes
  • 98. Resulting UI looks like native platform applications
  • 99. JFace UI toolkit built on top of SWT without hiding it
  • 100. Provides coarser grained components than SWT Dialogs
  • 101. Image / Font Registries
  • 105. Demo: Create a sidebar plugin Add org.eclipse.ui.views extension point
  • 107. Add com.ibm.rcp.ui.shelfView extension point
  • 108. Use WindowBuilder to create UI
  • 110. All The APIs You Need Do not reinvent the wheel!
  • 111. Java and Eclipse contains a rich set of API's that you can use when developing plugins for Lotus clients
  • 112. Knowing the API's available to you is crucial
  • 113. We'll cover Jobs (threading)
  • 117. Threading lightly A thread is an abstraction in computers to allow programs to perform multiple operations simultaneously Avoid tying up the program with background operations Two ways to call other code Synchronously == blocking Blocks current code until call is done and then returns to continue processing
  • 118. Like you're used to from LotusScript Asynchronously == non-blocking The calling code continues to run – you now have two pieces of code running
  • 119. To tell the caller we're done we use callbacks or listeners
  • 121. Used in AJAX – you request data in the background and once the data has been fetched you are told
  • 122. Jobs, jobs, jobs - lets vote for jobs! Eclipse Job Framework java.lang.Thread is way too low-level and error prone
  • 123. Allows for easy background processing
  • 125. Allows scheduling of jobs (“run this code in 2 minutes”)
  • 127. Allows for listening to job status etc.
  • 128. Standard UI for manipulating jobs Two types of Job Job – for background processing
  • 129. UIJob – for user interface updates Both are abstract classes and normally used as anonymous inner classes
  • 130. There can be only one Any Eclipse application only has ONE thread that may update the user interface
  • 131. It's – surprise, surprise – called the “UI thread”
  • 132. This means that Tying up the UI thread will render the entire client unresponsive
  • 133. Attempts to access the UI (i.e. set the text of a label) outside the UI thread will fail with an exception
  • 134. You need a way to “do stuff” in the UI thread To do stuff in the UI thread you use an UIJob from the Job API
  • 135. Using Job in code public void fireOnTheEmpire(int initDelay, final String jediName) { // create recurring job to poll web service new Job("Poll the Force!") { protected IStatus run(IProgressMonitor monitor) { // invoke endpoint using input String srvc = “http://moon5.tatooine.com/JediFinder”; WSFacade facade = new WSFacade(srvc); String result = facade.fire(jediName); // do something with the result ... // reschedule this job (in 5 mintues) this.schedule(5 * 60 * 1000); // return return Status.OK_STATUS; } }.schedule(initialDelay * 60 * 1000); } final
  • 136. Using UIJob in code final List lstJedis = new List(parent, SWT.NONE); ... public void psssst(final String[] jedis) { // since we're called in a background process // use that UIJob we learned about to update the UI new UIJob("Load Jedis") { public IStatus runInUIThread(IProgressMonitor monitor) { // update UI for (String jedi : jedis) { lstJedis.add(jedi); } // return status return Status.OK_STATUS; } }.schedule(); }
  • 137. Avoid Spinning Wheel of Death public void createPartControl(Composite parent) { final Label txt = new Label(parent, SWT.NONE); new UIJob("Indicate job starting") { public IStatus runInUIThread(IProgressMonitor monitor) { txt.setText("Turning star cruiser (" + new Date() + ")..."); // do long running task == BAD!! try { Thread.sleep(5000); } catch (Exception e) {} txt.setText("Done turning star cruiser (" + new Date() + ")..."); // reschedule and return this.schedule(5000); return Status.OK_STATUS; } }.schedule(5000); }
  • 138. Weaving Jobs Most operations usually include a UI and a background component so you need to “weave jobs”
  • 139. A typical operation from the user consists of 3 steps: Usually you start of with a UI call (button click i.e. button selection)
  • 140. You perform some background operation (e.g. load data from a web service or similar)
  • 141. You need to “call back” into the UI and update or inform We call this “to weave job”
  • 142. We do it by nesting Job instances
  • 143. Do it right! public void widgetSelected(SelectionEvent event) { list.add("Starting to run code (" + new Date() + ")...", 0); new Job("Long running job") { protected IStatus run(IProgressMonitor monitor) { downloadEntireGoogleSearchIndex(); // call back into UI to tell user we're done new UIJob("Update UI") { public IStatus runInUIThread(IProgressMonitor monitor) { list.add("Done running code (" + new Date() + ")...", 0); return Status.OK_STATUS; } }.schedule(); return Status.OK_STATUS; } }.schedule(); }
  • 144. Demo: Using jobs in your code Adding a button for background operation
  • 146. Load data from the web
  • 147. Once call is done update the UI
  • 148. Logging System.out.println is NEVER the solution! Seems easy at first but 99% of the time it's easier to just use logging from the beginning Lotus Expeditor / Notes comes with many supported logging mechanisms The one to use is java.util.logging as it's built-in and easy to use and configure Logging is done through the Logger class and at a specified Level Level (SEVERE, WARNING, INFO, FINE, FINER, FINEST, CONFIG)
  • 149. Expensive logging may be guarded using isLoggable(Level) Loggers are hierarchically named and level is set hierarchically as well
  • 150. Logging – Example package com.example.demo1; public class MainViewPart extends ViewPart { private static final Logger logger = Logger.getLogger(MainViewPart.class .getPackage().getName()); public MainViewPart() { try { logger.info("Main view part instantiated"); String senateCount = this.countSenators(); if (logger.isLoggable(Level.FINEST)) { logger.finest("Found “ + senateCount + “ senators (" + this + “)”); } } catch (Throwable t) { logger.severe(“There was a disturbance in the Force!”, t); } } }
  • 151. Logging – getting at it Logging output goes to client log Help > Support > View Log/Trace Configured using OSGi console
  • 152. Edit <Notes data>/workspace/.config/rcpinstall.properties and add <logger name>.level=<LEVEL> at the end com.lekkimworld.twitnotes2.level=FINEST
  • 153. Demo: Adding logging to the code Add a logger to our view part
  • 154. Log the current sunrise and sunset
  • 156. Notes backend API You have access to the Notes Java API you know and love!
  • 157. Basic usage is almost the same as you know and love
  • 158. To get access to the classes you DO NOT import notes.jar as you normally do
  • 159. DO depend on the com.ibm.notes.java.api plugin To access Notes data you DO NOT use NotesThread.sinitThread
  • 160. DO use the Job API and the supplied NotesSessionJob
  • 161. Notes backend API in code new NotesSessionJob(&quot;Access Notes data&quot;) { public IStatus runInNotesThread(Session session, IProgressMonitor monitor) throws NotesException { // print username System.out.println(session.getDatabase(null, “names.nsf”).getTitle()); // return return Status.OK_STATUS; } }.schedule();
  • 162. Notes frontend API Modeled pretty much like the LotusScript UI API NotesUIWorkspace, NotesUIView, NotesUIDocument, … Should run in the UI thread
  • 163. Bridges a MAJOR gap in the Notes product as it gives us access to the Notes UI from Java
  • 164. Been with us for a while Added in Notes 8.5 as beta
  • 166. More functionality added in Notes 8.5.2 To use it add a dependency on com.ibm.notes.java.ui
  • 167. Example project available from OpenNTF.org (“Java UI API Exerciser”)
  • 168. Notes frontend API (cont.) NotesUIWorkspace Entry point
  • 169. Access to run an agent with context (access to LotusScript!) NotesUIView Most functionality added in Notes 8.5.2
  • 170. Listen for selection events and view entries
  • 171. Works for Java and traditional views NotesUIDocument You can work in the document on the glass
  • 172. Access to backend document
  • 173. Edit / Field / Modify listeners
  • 174. Access to copy/paste, refresh, reload Data classes for easy access (i.e. NotesViewData)
  • 175. Demo: Use the Notes APIs Use NotesSessionJob to access the user's name.nsf file
  • 176. Place the email addresses of the user's contacts in the list box
  • 177. Use the composeDocument API to compose an email to selected contact with data
  • 178. Final word on APIs Accounts Secure storage for credentials, Automatic authentication for HTTP requests Lotus Sametime Awareness / realtime collaboration Search Search other applications from the search center Domino Designer Extend Domino Designer with custom actions Composite Applications Create components for using Eclipse technology and listen for properties and expose actions XPages Extensibility Library Add custom widgets for XPages LiveText / Toolbox (LiveText / Widgets API's is targeted to be publicly supported from 8.5.3) Inject recognizers based on business rules
  • 179. Final word on APIs – I promise!! Like with Lotus Notes there a multitude of API's available to you for Selection, Jobs, Actions / menus, Drag'n'drop, Custom drawing, Charting
  • 180. … Explore Eclipse.org and remember to search for “Eclipse” and not “Lotus Notes” as it will yield far more results
  • 181. Demo: Debugging basics Launching Notes from Eclipse in debug mode
  • 185. Deploying your fantastic work Deployment is done by Packaging your plugin(s) in a feature
  • 186. Creating an update site to hold the feature
  • 187. Installing the feature into the clients either manually or using a widget descriptor Feature Plug-in Plug-in . . . Feature Plug-in Plug-in . . . Update Site . . .
  • 188. Demo: Wrapping it all up Create a feature project
  • 190. Create an update site NSF
  • 191. Add our feature to the update site NSF
  • 192. Create a widget for our feature
  • 193. Add it to a widget catalog
  • 194. Watch a video at: http://bit.ly/h4pjMb
  • 195. DOTS (used to be JAVADDIN)
  • 196. XPages Extensibility Library ” A new project has been created which contains a simple sample for how to to develop a 'native' XPages control via the Java extensibility API. This control can be deployed globally as an OSGi bundle/plugin to Lotus Domino and Lotus Notes/Domino Designer and then used in all NSFs without having to put the code in all NSFs redundantely. The new control shows up in the palette in Designer as other out of the box controls.”
  • 197. Summary and resources RedWiki about plugin development >> http://bit.ly/pluginredwiki
  • 198. HIGHLY recommended article on the Job API >> http://www.eclipse.org/articles/Article-Concurrency/jobs-api.html
  • 199. Eclipse articles >> http://www.eclipse.org/articles
  • 200. Eclipse WindowBuilder >> http://www.eclipse.org/windowbuilder
  • 204. Give it to me! :-)