XPages Extensibility API – going deep      NLLUG 2012, Rotterdam           René Winkelmeyer            midpoints GmbH
About me                     midpoints GmbH                     http://www.midpoints.de                     IBM Advanced B...
•   Skype                             muenzpraeger                    •   Twitter                             muenzpraeger...
Agenda   What will be talk about?   - Differences XPages, Extension Library and Extensibility API   - Starting with Plug-I...
Agenda   What will be talk about?   - Differences XPages, Extension Library and Extensibility API   - Starting with Plug-I...
XPages XPages is a great technlogy and expands our possibilities – from the  point of administrators, developers and user...
XPages The most powerful component is the editable area.                                                      7
XPages / XPages Extension Library There are some things which aren‘t so easy...      You are missing controls in the pal...
XPages Extension Library                           9
XPages Extension Library IBM has introduced the XPages Extensibility API with Notes/Domino  8.5.2. This API is a set of ...
XPages Extension Library                           11
XPages Extension Library You‘ll finde it on OpenNTF http://extlib.openntf.org                                            ...
XPages Extension Library It‘s part of Notes/Domino 8.5.3 as „Upgrade Pack 1“ – full product  support through IBM!     Pa...
XPages Extensibility API                           14
XPages Extensibility API It only makes sense to develop your own extensions if you need the  same functionality across mu...
XPages Extensibility API So called „artefacts“ can be added to the existing API during  runtime. JSF is an „open standar...
XPages Architektur                     17
XPages API Concepts XPages Library    OSGi bundle, contains Java code, configuration files Controls    Components whic...
Agenda   What will be talk about?   - Differences XPages, Extension Library and Extensibility API   - Starting with Plug-I...
Powered By Eclipse                     20
Eclipse Plug-In-Architektur                              21
IBM Clients/Server based on Eclipse                                      22
Development setup We are using Eclipse 3.7 (32bit).                                      23
Development setup For keeping it simple: use the OpenNTF project „XPages SDK for  Eclipse RCP.    Nathan T. Freeman:    ...
Development setup First create a new workspace                                 25
Development setup Install new software in Eclipse                                    26
Development setup Select the XPages SDK                          27
Development setup XPages SDK installation (I)            De-select this check box                                       28
Development setup XPages SDK installation (II)                                 29
Development setup XPages SDK installation (III)                                  30
Development setup XPages SDK installation (IV)    Unsigned means, that the plug-ins aren‘t digitially signed. That‘s ok....
Development setup XPages SDK installation (V)                                32
Development setup Configuration of the XPages SDK (I)                                        33
Development setup Configuration of the XPages SDK (II)                                         34
Development setup Configuration of the XPages SDK (III)                                          35
Development setup Configuration of the XPages SDK (IV)                                         36
Development setup Configuration of the XPages SDK (V)                                        37
Development setup Configuration of the XPages SDK (VI)                                         38
Development setup Configuration of the XPages SDK (VII)                                          39
Development setup You shouldn‘t develop without debugging. So we‘re installing a  debugger. We are using the OpenNTF Dom...
Development setup Installation of the Debug-Plug-In (I)                                          41
Development setup Installation of the Debug-Plug-In (II)                                           42
Development setup Installation of the Debug-Plug-In (III)                                            43
Development setup Installation of the Debug-Plug-In (IV)                                           44
Development setup Installation of the Debug-Plug-In (V)                                          45
Development setup Installation of the Debug-Plug-In (VI)                                           46
Development setup Installation of the Debug-Plug-In     Currently only local Domino server installations are supported. ...
Development setup Creating the debug environment (I)                                       48
Development setup Creating the debug environment (II)                                        49
Development setup Creating the debug environment (II)                                        50
Development setup Creating the debug environment (III)                                         51
Development setup Add the following notes.ini parameters to the locally installed  Domino server (they are needed for the...
Agenda   What will be talk about?   - Differences XPages, Extension Library and Extensibility API   - Starting with Plug-I...
Code examples A simple UIComponent created with the XPages Extensibility API                                             ...
General library structure Java files     Controls         javax.faces.component.UIComponent         Base for all UI co...
Project structure                    56
MessagesDialog (UIComponent for Designer)                  for identification                                            57
MessagesDialog (UIComponent for Designer)                                            58
MessagesRenderer (XPages output)                                   59
MessagesRenderer (XPages output)                                   helper method                                          ...
MessagesRenderer (XPages output)                                   61
MessagesRenderer (XPages output)                                   62
Library          63
manifest.mf              optional for JS addin                                      64
plugin.xml             plug-ins library class                                      65
Configuration files Simple till here...or? Now we have to create the configuration files. Remember the  standards!      ...
messages-faces-config.xml (XPage-Rendering)                                              67
messages.xsp-config                      68
messages.xsp-config                      69
messages.xsp-config                      70
messages.xsp-config                      71
plugin.xml für your own @Commands                                    72
Global Java definiton for your own @Commands                                               73
Detail class for your own @Commands                                      74
D-E-B-U-G-G-I-N-G Setup a remote application for debugging.                                              75
D-E-B-U-G-G-I-N-G                    76
Agenda   What will be talk about?   - Differences XPages, Extension Library and Extensibility API   - Starting with Plug-I...
Deployment Domino-Server Create a new database/application based on the Updatesite  template. I highly recommend to use a...
Thank you very much!                       79
Upcoming SlideShare
Loading in...5
×

NLLUG 2012 - XPages Extensibility API - going deep!

1,625

Published on

These slides have been shown at NLLUG 2012 in Rotterdam and are an introduction to programming with the XPages Extensiblity API.

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

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

No notes for slide

NLLUG 2012 - XPages Extensibility API - going deep!

  1. 1. XPages Extensibility API – going deep NLLUG 2012, Rotterdam René Winkelmeyer midpoints GmbH
  2. 2. About me midpoints GmbH http://www.midpoints.de IBM Advanced Business Partner IBM Design Partner for Domino Next IBM Mobile Design Partner Apple Enterprise Developer & MDM Program Services • Notes / Domino Consulting • E-Mail Management • App Development (IBM Connections, RCP, XPages, mobile) We mobilize Notes René Winkelmeyer • Lotus Traveler planning & deployment Senior Consultant • mobile app development • Apple iOS Device Management • Secure mobile content delivery OpenNTF Contributor and OpenNTF Director => File Navigator: http://filenavigator.openntf.org => XSnippets: http://xsnippets.openntf.org 2
  3. 3. • Skype muenzpraeger • Twitter muenzpraeger • LinkedIn muenzpraeger • Facebook muenzpraeger • Slideshare muenzpraeger • G+ www.winkelmeyer.com/+ • WebRené Winkelmeyer http://blog.winkelmeyer.comSenior Consultant http://www.midpoints.de • Mail mail@winkelmeyer.com rene.winkelmeyer@midpoints.de 3
  4. 4. Agenda What will be talk about? - Differences XPages, Extension Library and Extensibility API - Starting with Plug-In-Development - Code examples - Deployment 4
  5. 5. Agenda What will be talk about? - Differences XPages, Extension Library and Extensibility API - Starting with Plug-In-Development - Code examples - Deployment 5
  6. 6. XPages XPages is a great technlogy and expands our possibilities – from the point of administrators, developers and users. Starting with XPages could be really simple. For the very first steps is just drag‘n‘drop, computing stuff and so on. To be honest: Domino web development never was so easy (after you‘ve learned the basics). 6
  7. 7. XPages The most powerful component is the editable area. 7
  8. 8. XPages / XPages Extension Library There are some things which aren‘t so easy...  You are missing controls in the pallette  OneUI ist too complex  You want some custom rendering  ... Here the XPages Extension Library comes to your help. 8
  9. 9. XPages Extension Library 9
  10. 10. XPages Extension Library IBM has introduced the XPages Extensibility API with Notes/Domino 8.5.2. This API is a set of Java classes and methods which allow to integrate specialised functionality directly into XPages.  This means XPages in the browser and XPages in the Notes client. IBM has used this API to provide the well-known XPages Extension Library – (first) on OpenNTF and than as part of the core product! 10
  11. 11. XPages Extension Library 11
  12. 12. XPages Extension Library You‘ll finde it on OpenNTF http://extlib.openntf.org 12
  13. 13. XPages Extension Library It‘s part of Notes/Domino 8.5.3 as „Upgrade Pack 1“ – full product support through IBM!  Part number: CI5GIEN Watch out: If you want to use the Upgrade Pack 1 you‘ll have to uninstann previous versions of the OpenNTF Extension Library.  IBM installs the UP1 in the program directory. The OpenNTF components are installed in the data directory.  Currently only available as Installer – not as Updatesite. 13
  14. 14. XPages Extensibility API 14
  15. 15. XPages Extensibility API It only makes sense to develop your own extensions if you need the same functionality across multiple applications. An extension (aka OSGi Plug-In) needs only to deployed once per server or client – not per application. http://www.osgi.org <= start here 15
  16. 16. XPages Extensibility API So called „artefacts“ can be added to the existing API during runtime. JSF is an „open standard“ which APIs are publically available. The XPages APIs are public since Domino 8.5.2. Artefacts can be:  UI Controls  Converters  Validators  Data Sources  Simple Actions  Language Bindings  ... 16
  17. 17. XPages Architektur 17
  18. 18. XPages API Concepts XPages Library  OSGi bundle, contains Java code, configuration files Controls  Components which are available in the Designer pallette Renderer  Renderer are responsible for displaying the output (HTML, CSS, ...) Complex Types  Those are i. e. used to create encapsulated functions or store data. 18
  19. 19. Agenda What will be talk about? - Differences XPages, Extension Library and Extensibility API - Starting with Plug-In-Development - Code examples - Deployment 19
  20. 20. Powered By Eclipse 20
  21. 21. Eclipse Plug-In-Architektur 21
  22. 22. IBM Clients/Server based on Eclipse 22
  23. 23. Development setup We are using Eclipse 3.7 (32bit). 23
  24. 24. Development setup For keeping it simple: use the OpenNTF project „XPages SDK for Eclipse RCP.  Nathan T. Freeman: http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocum ent&name=XPages%20SDK%20for%20Eclipse%20RCP 24
  25. 25. Development setup First create a new workspace 25
  26. 26. Development setup Install new software in Eclipse 26
  27. 27. Development setup Select the XPages SDK 27
  28. 28. Development setup XPages SDK installation (I) De-select this check box 28
  29. 29. Development setup XPages SDK installation (II) 29
  30. 30. Development setup XPages SDK installation (III) 30
  31. 31. Development setup XPages SDK installation (IV)  Unsigned means, that the plug-ins aren‘t digitially signed. That‘s ok. 31
  32. 32. Development setup XPages SDK installation (V) 32
  33. 33. Development setup Configuration of the XPages SDK (I) 33
  34. 34. Development setup Configuration of the XPages SDK (II) 34
  35. 35. Development setup Configuration of the XPages SDK (III) 35
  36. 36. Development setup Configuration of the XPages SDK (IV) 36
  37. 37. Development setup Configuration of the XPages SDK (V) 37
  38. 38. Development setup Configuration of the XPages SDK (VI) 38
  39. 39. Development setup Configuration of the XPages SDK (VII) 39
  40. 40. Development setup You shouldn‘t develop without debugging. So we‘re installing a debugger. We are using the OpenNTF Domino Debug Plug-In.  http://www.openntf.org/internal/home.nsf/release.xsp?documentId=CBF 874E9C4607B4C8625799D00287B8C&action=openDocument 40
  41. 41. Development setup Installation of the Debug-Plug-In (I) 41
  42. 42. Development setup Installation of the Debug-Plug-In (II) 42
  43. 43. Development setup Installation of the Debug-Plug-In (III) 43
  44. 44. Development setup Installation of the Debug-Plug-In (IV) 44
  45. 45. Development setup Installation of the Debug-Plug-In (V) 45
  46. 46. Development setup Installation of the Debug-Plug-In (VI) 46
  47. 47. Development setup Installation of the Debug-Plug-In  Currently only local Domino server installations are supported. 47
  48. 48. Development setup Creating the debug environment (I) 48
  49. 49. Development setup Creating the debug environment (II) 49
  50. 50. Development setup Creating the debug environment (II) 50
  51. 51. Development setup Creating the debug environment (III) 51
  52. 52. Development setup Add the following notes.ini parameters to the locally installed Domino server (they are needed for the remote debugging)  JAVADEBUGOPTIONS=transport=dt_socket,server=y,suspend=n,addr ess=8000  JAVAENABLEDEBUG=1 52
  53. 53. Agenda What will be talk about? - Differences XPages, Extension Library and Extensibility API - Starting with Plug-In-Development - Code examples - Deployment 53
  54. 54. Code examples A simple UIComponent created with the XPages Extensibility API 54
  55. 55. General library structure Java files  Controls  javax.faces.component.UIComponent  Base for all UI components  Renderers  javax.faces.render.Renderer  Writes the output to the browser Configuration files  faces-config.xml  Runtime JSF configuration, defines i. e. the renderer  .xsp-config  Defines the controls, is used to display within Designer and for compiling the XPages  plugin.xml  Adding the extensions 55
  56. 56. Project structure 56
  57. 57. MessagesDialog (UIComponent for Designer) for identification 57
  58. 58. MessagesDialog (UIComponent for Designer) 58
  59. 59. MessagesRenderer (XPages output) 59
  60. 60. MessagesRenderer (XPages output) helper method 60
  61. 61. MessagesRenderer (XPages output) 61
  62. 62. MessagesRenderer (XPages output) 62
  63. 63. Library 63
  64. 64. manifest.mf optional for JS addin 64
  65. 65. plugin.xml plug-ins library class 65
  66. 66. Configuration files Simple till here...or? Now we have to create the configuration files. Remember the standards! 66
  67. 67. messages-faces-config.xml (XPage-Rendering) 67
  68. 68. messages.xsp-config 68
  69. 69. messages.xsp-config 69
  70. 70. messages.xsp-config 70
  71. 71. messages.xsp-config 71
  72. 72. plugin.xml für your own @Commands 72
  73. 73. Global Java definiton for your own @Commands 73
  74. 74. Detail class for your own @Commands 74
  75. 75. D-E-B-U-G-G-I-N-G Setup a remote application for debugging. 75
  76. 76. D-E-B-U-G-G-I-N-G 76
  77. 77. Agenda What will be talk about? - Differences XPages, Extension Library and Extensibility API - Starting with Plug-In-Development - Code examples - Deployment 77
  78. 78. Deployment Domino-Server Create a new database/application based on the Updatesite template. I highly recommend to use a dedicated database for server-only plug-ins. Import the plug-ins into the database. Replicate the database with all according servers.  Plug-Ins couldn‘t be replicated as the „normally“ reside on the file system. Set the notes.ini parameter OSGI_HTTP_DYNAMIC_BUNDLES=<datenbank.nsf> on the Domino servers. Finished. Restart the http and that‘s all. 78
  79. 79. Thank you very much! 79

×