Your SlideShare is downloading. ×
Plug yourself in and your app will never be the same (1 hr edition)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Plug yourself in and your app will never be the same (1 hr edition)

2,165
views

Published on

My presentation from the Belgian Lotus User Group 2011 (1 hour edition)

My presentation from the Belgian Lotus User Group 2011 (1 hour edition)

Published in: Technology, Business

1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total Views
2,165
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
23
Comments
1
Likes
0
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. Belux Lotus User Group 2011 Antwerp, Belgium 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
    • 4. Active blogger: lekkimworld.com
    • 5. Speaker at Lotusphere
    • 6. Articles for THE VIEW
    • 7. E-mail: mh@intravision.dk
    • 8. .com/lekkim
  • 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. What's possible with plugins
  • 15. 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
      • 16. ...or use the bit.ly link >> http://bit.ly/pluginredwiki
  • 17. What I'm going to build (if time permits)
    • Sidebar panel containing
      • A list box
      • 18. Three buttons at the bottom
        • One button reads from a web service
        • 19. One button reads contacts from names.nsf
        • 20. One button creates a new email
          • Reads recipient from list
          • 21. Create document
          • 22. Set subject
          • 23. Add data from web service call to body
    • Create a feature for the plugin
    • 24. Create an update site with the feature
    • 25. Create a widget for the feature from the update site
  • 26. Agenda
    • About Eclipse and Lotus Expeditor Toolkit
    • 27. Installing Lotus Expeditor Toolkit
    • 28. Plugin Development Basics
    • 29. Building UI's with SWT and JFace
    • 30. Jobs, Jobs, Jobs
    • 31. Time to build some stuff...
    • 32. Resources / Q&A
  • 33. 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
  • 34. 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
  • 35. Eclipse workbench
  • 36. Notes workbench s
  • 37. 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
      • 38. FREE! No charge to use the Expeditor toolkit
      • 39. 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
          • 40. 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
  • 41. Installing XPD Toolkit (1)
    • Download the XPD Toolkit
      • http://bit.ly/fKMF5o
      • 42. Unzip
    • In Eclipse
      • Help -> Software Updates...
  • 43. Installing XPD Toolkit (2)
    • Click New Local Site...
    • 44. Browse to unziped update site
    • 45. Select OK
  • 46. Installing XPD Toolkit (3)
    • Select The XPD Toolkit
    • 47. Click Install...
  • 48. Installing XPD Toolkit (4)
    • Agree to the license agreement
    • 49. Install all features
    • 50. Restart
  • 51. Installing XPD Toolkit (5)
    • Start IDE
    • 52. Select Test Environment
      • Notes, Sametime, Symphony, XPD
    • Specify Target Location
      • Point to target runtime
      • 53. <install>/framework/rcp/eclipse
    • Click OK
    • 54. Run -> Run Configuration
    • 55. Double Click Client Services
    • 56. Give The Configuration A Name
    • 57. Select Run
  • 58. 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)
      • 59. By themselves plugins may not do anything, but when you start combining plugins you can build very powerful applications
      • 60. Examples: Eclipse, Notes, Sametime, Symphony
    Application Plugin
  • 61. Anatomy of a plugin
    • Java code (optional)
    • 62. Manifest.mf
      • Basic properties of a plugin
      • 63. 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
      • 64. Files used for translation
      • 65. Images
      • 66. etc....
  • 67. 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
      • 68. 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
  • 69. Key Extension Points
    • org.eclipse.ui.views
      • Registers a view part with the platform
      • 70. View parts can be used inside perspectives or in the sidebar
    • com.ibm.rcp.ui.shelfView
      • An Expeditor extension point
      • 71. 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
  • 72. The arcane art of building UI's
  • 73. UI's are built using code
    • UI's are
      • built using Java code adding widgets (controls) to containes (composites)
      • 74. custom drawn using Java code to listen for paint events
    • In either case it isn't WYSIWYG :-(
  • 75. Standard Widget Toolkit (SWT)
    • Platform native look and feel …
    • 76. Protection from OS Level Changes
    • 77. Very responsive
    • 78. Resulting UI looks like native platform applications
  • 79. Meet WindowBuilder! http://eclipse.org/windowbuilder/
  • 80. 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
        • 81. Like you're used to from LotusScript
      • Asynchronously == non-blocking
        • The calling code continues to run – you now have two pieces of code running
        • 82. To tell the caller we're done we use callbacks or listeners
        • 83. Harder to grasp
        • 84. Used in AJAX – you request data in the background and once the data has been fetched you are told
  • 85. Jobs, jobs, jobs - lets vote for jobs!
    • Eclipse Job Framework
      • java.lang.Thread is way too low-level and error prone
      • 86. Allows for easy background processing
      • 87. Very simple to use
      • 88. Allows scheduling of jobs (“run this code in 2 minutes”)
      • 89. Allows weaving of jobs
      • 90. Allows for listening to job status etc.
      • 91. Standard UI for manipulating jobs
    • Two types of Job
      • Job – for background processing
      • 92. UIJob – for user interface updates
    • Both are abstract classes and normally used as anonymous inner classes
  • 93. There can be only one
    • Any Eclipse application only has ONE thread that may update the user interface
    • 94. It's – surprise, surprise – called the “UI thread”
    • 95. This means that
      • Tying up the UI thread will render the entire client unresponsive
      • 96. Attempts to access the UI (i.e. set the text of a label) outside the UI thread will fail with an exception
      • 97. 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
  • 98. Using Job in code public void fireOnTheEmpire(int initDelay, final String jediName) { // create recurring job to poll web service new Job(&quot;Poll the Force!&quot;) { 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
  • 99. Weaving Jobs
    • Most operations usually include a UI and a background component so you need to “weave jobs”
    • 100. A typical operation from the user consists of 3 steps:
      • Usually you start of with a UI call (button click i.e. button selection)
      • 101. You perform some background operation (e.g. load data from a web service or similar)
      • 102. You need to “call back” into the UI and update or inform
    • We call this “to weave job”
    • 103. We do it by nesting Job instances
  • 104. Let us build something!
  • 105. DOTS (used to be JAVADDIN)
  • 106. 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.”
  • 107. Summary and resources
    • RedWiki about plugin development >> http://bit.ly/pluginredwiki
    • 108. HIGHLY recommended article on the Job API >> http://www.eclipse.org/articles/Article-Concurrency/jobs-api.html
    • 109. Eclipse articles >> http://www.eclipse.org/articles
    • 110. Eclipse WindowBuilder >> http://www.eclipse.org/windowbuilder
  • 111. Q&A