SlideShare une entreprise Scribd logo
1  sur  50
Télécharger pour lire hors ligne
Presenter: Paul Withers 
Company: Intec Systems Ltd 
Presenter: John Cooper 
Company: JCB 
ICON UK 2014 From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Libraries
2 
Paul Withers 
•XPages Developer since 2009 
•IBM Champion 
•Author of XPages Extension Library 
•Developer XPages OpenLog Logger 
•Co-Developer of OpenNTF Domino API
3 
John Cooper 
Began developing XPages from 8.5.0 
Developed many XPage applications using java beans and custom components so decide to create OSGI Plugin to be able to deploy once 
New to blogging, contributed 1 project to Open NTF so far.
4 
Agenda 
•Why 
•Development and Debugging Environment 
•XPages Starter Kit 
•Structure and Deployment
5 
XPages Developer Roadmap 
•11 types of developer – Stephan Wissel 
•Three types of developer – Niklas Heidloff 
•Five tiers of developers – Greg Reeder 
Extension Library development should be the goal of XPages developers
6 
Why? 
•Build Once, Use Anywhere (virtually!) 
•Easier to deploy new versions 
•Deploy for junior developers 
•Deploy third-party libraries 
•Apache POI etc 
•JDBC Drivers 
•More easily avoid Java security exceptions 
•Required for DOTS
7 
Examples 
•XPages Extension Library 
•IBM SBT 
•XPages OpenLog Logger 
•OpenNTF Domino API 
•Bootstrap4Xpages 
•XPage Debug Toolbar 
•XPages Scaffolding 
•XPages Toolkit
8 
JDBC Driver Plugin Wizard 
•Enhancement to RDBMS part of Ext Lib 
•Requires latest version of ExtLib 
•Allows a plugin to be created from one dialog for a JDBC driver 
•See 3:15 on video http://www.openntf.org/main.nsf/blog.xsp?permaLink=NHEF-9N7CKD
9 
Agenda 
•Why 
•Development and Debugging Environment 
•XPages Starter Kit 
•Structure and Deployment
10 
Development and Debugging Environment 
•Eclipse 
•XPages SDK 
•Debug Plugin 
•IBM Java Runtime 
•Local Domino Server recommended
11 
Eclipse for RCP and RAP Developers 
•Latest release is Luna 
•Debug plugin does not support this? 
•Can have multiple versions installed
12 
OpenNTF XPages SDK Project 
•Two downloads needed 
•Installation video from Niklas Heidloff
13 
XPages SDK 
•Gives XPages JREs and Target Platforms 
•From 4:40 in video 
•Point Preferences to Domino and Notes installs 
•Ensure “Automatically create JRE” ticked 
•Tick relevant entry in Java > Installed JREs 
•Create and select entry under Plug-in Development > Target Platform
14 
Debug Plugin 
•Allows you to point Domino server direct to projects in relevant workspace 
•From 7:44 in video 
•Point Preferences to Domino install 
•Configure Domino server for Java debugging, as for Java development 
•Run > Debug Configurations 
•Create Debug Configuration
15 
OSGi Configuration 
•Create new OSGi Framework configuration – tells Domino to use Eclipse workspace 
•Set as Domino OSGi Framework 
•Set auto-start to false 
•Click Debug – creates pde.launch.ini 
•Issue “res task http” command 
•Obviously will cause problems on networked server!
16 
New Plugins 
•For new plugins 
•Go to OSGi Framework configuration 
•Select the new plugin 
•Click Debug to update config 
•Issue “res task http” command 
•If plugin is changed 
•Issue “res task http” command
17 
Java Runtime 
•Not necessary for most development 
•Needed to debug Extension Library 
•See blog post by Paul Withers 
•Point eclipse.ini to Domino javaw.exe 
•Ensures it uses IBM version of Java 
•Add before Xms 
•No spaces
18 
Agenda 
•Why 
•Development and Debugging Environment 
•XSP Starter Kit 
•Structure and Deployment
19 
XSP Starter Kit
20 
XSP Starter Kit 
•Sample Plugin 
•Includes examples for all main classes 
•Components 
•Beans 
•SSJS – not straightforward 
•Listeners 
•and more
21 
Agenda 
•Why 
•Development and Debugging Environment 
•XPages Starter Kit 
•Structure and Deployment
22 
Structure 
•Plugin project 
•This is all that’s needed for OSGi framework configuration 
•Feature project loads one or more plugin 
•Update Site project points to one or more feature 
•Creates plugins and features jars 
•Export as General > File System
23 
Update Site Project
24 
Deployment to Server / DDE 
•Run from Eclipse using Domino Debug Plugin 
•Install to remote server as other Ext Libs 
•See Chapter 2 of XPages Extension Library pp28+ 
•Install to DDE as other Ext Libs
25 
Deploy to DDE 
•Every change you make to the component re-install the update – Quite laborious for development 
•Add directly to DDE plugins 
•Best to create separate directory See blog post by John Cooper
26 
Create new Directory 
•Navigate to framework directory inside the Notes Data Directory 
•Create a new plugin directory
27 
Create a Link file 
•Inside your newly created text file add the following: 
path=C:/Program Files (x86)/IBM/Notes/framework/jmc-plugins
28 
Update Platform.XML file 
•Change the transient attribute on the config tag to false 
•Replace all the instances of policy="MANAGED-ONLY" to policy="USER-EXCLUDE"
29 
Export Plugin 
•Export plugin as a “Deployable Plugin and Fragment” 
•Put in newly created directory 
•Restart designer
30 
Is It Working? 
•Check Help > Support > View Log and View Trace for errors / print statements
31 
Is It Working?
32 
Deployment to Developers / XPiNC 
•Add to Widget Catalog from Update Site database 
•See XPages Extension Library pp40+ 
•Best practice is using Desktop Policy, ensures updates automatically deployed
33 
Plugin Structure 
•See Extensibility API Developers Guide 
•Activator is optional 
•Allows generic code to be run 
•Extend org.eclipse.core.runtime.Plugin
34 
Extensions 
•Extensions load other Java classes 
•Extend com.ibm.commons.Extension 
•Use “tell http osgi pt -v com.ibm. commons.Extension” to see types and classes currently loaded
35 
Library 
•Selected in Xsp Properties 
•Type=com.ibm.xsp.Library 
•Extend AbstractXspLibrary 
•Defines 
•Dependencies 
•Faces-Config files 
•Xsp-Config files
36 
Contributor 
•Adds factories 
•Holds server-level maps 
•Load implicit objects (variables) 
•Type=com.ibm.xsp.library.Contributor 
•Extend XspContributor
37 
ResourceProvider 
•Adds browser resources 
•JavaScript 
•CSS 
•Images 
•Type=com.ibm.xsp.GlobalResourceProvider 
•Extend BundleResourceProvider
38 
Basic Plugin from XSP Starter Kit
39 
Rest Service using DAS 
•DAS – Domino Access Services 
•Create a plugin project 
•Add extension point to plugin.xml 
<plugin> <extension point="com.ibm.domino.das.service"> <serviceResources class="org.iconuk.servicesdemo.service.NabDetailsService" name="NabDetails" path="nabdetails" version="9.0.1"> </serviceResources> </extension> </plugin>
40 
Plugin.xml 
class="org.iconuk.servicesdemo.service.NabDetailsService“ 
Points to main service class 
name="NabDetails" 
Name of service is used in server document to know which service to load 
path="nabdetails" 
Path is the used to for the URL to access the service. Eg. http://hostname/api/nabdetails
41 
Service Class 
•Required for extension point 
•Extends com.ibm.domino.das.service.RestService 
•getClasses method used to access Classes for each service URL
42 
Resource class 
•One class per url 
api/nabdetails/me -> class CurrentUserDetailsResource 
api/nabdetails/paul -> class UserPaulDetailsResource 
•Used to identify which path uses the class 
@Path(CURRENTUSER_PATH) 
•Used to identify which http method uses class method 
@GET
43 
Enable on server 
•Load plugin on to server in same way as any other plugin 
•Open Server Document Internet Protocols -> Domino Web Engine 
•Add service name to Enabled DAS Services
44 
Components 
•Take a custom control and make it global 
•NotesIn9 64 by Tim Tripcony 
•#codefortim 
•Or code within Eclipse 
•Extensibility API 9.0.1
45 
Components 
•Component class DOMINO 
•.xsp-config to add properties DDE 
•Renderer class, if required DOMINO 
•Use getRendererType() to find an existing renderer 
•faces-config.xml to add renderer DOMINO 
•Load xsp-config and faces-config.xml in Library class
46 
Including Third Party Jars 
•Create a separate plugin 
•New > Plug-in from Existing JAR Archives 
•For additional jars 
•Import the jar 
•Add to Build Path 
•Ensure included in Binary Build on build.properties 
•Also blog post by John Dalsgaard
47 
Including Third Party Jars 
•Add as Required Plug-in to plugin.xml 
•Click on Properties and tick “Reexport this dependency” 
•Add to feature 
•Ensure “Unpack the plug-in archive after the installation” is ticked 
Otherwise DDE will not see the jars
48 
Demo Plugin 
•Add component for Separator 
•Allow properties for: 
•separatorType (New Line / Space) 
•count (integer, defaulting to 1) 
•Deploy org.apache.commons.lang3 
•Add utility method to convert any object to string detailing properties
49 
Links to Demos 
•https://github.com/paulswithers/pluginDemo 
•Demo database is in notes folder 
•https://bitbucket.org/johnmcooper/icon-uk- 2014-services-demo
50 
Thank You 
•Paul Withers 
•pwithers@intec.co.uk 
•http://www.intec.co.uk/blog 
•http://twitter.com/paulswithers 
•John Cooper 
•john@johnmcooper.co.uk 
•http://developmentblog.johnmcooper.co.uk 
•http://twitter.com/j_m_cooper

Contenu connexe

Tendances

Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
mfrancis
 
Java EE 6 Clustering with Glassfish 3.1
Java EE 6 Clustering with Glassfish 3.1 Java EE 6 Clustering with Glassfish 3.1
Java EE 6 Clustering with Glassfish 3.1
Shreedhar Ganapathy
 
GlassFish Server 3.1: Deploying your Java EE 6 Applications
GlassFish Server 3.1: Deploying your Java EE 6 ApplicationsGlassFish Server 3.1: Deploying your Java EE 6 Applications
GlassFish Server 3.1: Deploying your Java EE 6 Applications
Arun Gupta
 

Tendances (20)

Container Landscape in 2017
Container Landscape in 2017Container Landscape in 2017
Container Landscape in 2017
 
Modular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafModular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache Karaf
 
Oracle SOA suite and Coherence dehydration
Oracle SOA suite and  Coherence dehydrationOracle SOA suite and  Coherence dehydration
Oracle SOA suite and Coherence dehydration
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
 
Keynote Oracle Fusion Middleware Summit_2020
Keynote Oracle Fusion Middleware Summit_2020Keynote Oracle Fusion Middleware Summit_2020
Keynote Oracle Fusion Middleware Summit_2020
 
Weblogic 12c on docker
Weblogic 12c on dockerWeblogic 12c on docker
Weblogic 12c on docker
 
Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)
 
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
 
Polygot Java EE on the GraalVM
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVM
 
Domino on docker version 2
Domino on docker version 2Domino on docker version 2
Domino on docker version 2
 
Get Rapid Right-sized and Recent with the Liberty Repository
Get Rapid Right-sized and Recent with the Liberty RepositoryGet Rapid Right-sized and Recent with the Liberty Repository
Get Rapid Right-sized and Recent with the Liberty Repository
 
Boston 2011 OTN Developer Days - GlassFish
Boston 2011 OTN Developer Days - GlassFishBoston 2011 OTN Developer Days - GlassFish
Boston 2011 OTN Developer Days - GlassFish
 
JSF2
JSF2JSF2
JSF2
 
GlassFish 3.1 – Simplifying your Java EE 6 Development and Deployment @ JAX L...
GlassFish 3.1 – Simplifying your Java EE 6 Development and Deployment @ JAX L...GlassFish 3.1 – Simplifying your Java EE 6 Development and Deployment @ JAX L...
GlassFish 3.1 – Simplifying your Java EE 6 Development and Deployment @ JAX L...
 
Ow
OwOw
Ow
 
Automated infrastructure
Automated infrastructureAutomated infrastructure
Automated infrastructure
 
Java EE 6 Clustering with Glassfish 3.1
Java EE 6 Clustering with Glassfish 3.1 Java EE 6 Clustering with Glassfish 3.1
Java EE 6 Clustering with Glassfish 3.1
 
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014
 
GlassFish Server 3.1: Deploying your Java EE 6 Applications
GlassFish Server 3.1: Deploying your Java EE 6 ApplicationsGlassFish Server 3.1: Deploying your Java EE 6 Applications
GlassFish Server 3.1: Deploying your Java EE 6 Applications
 
SOA Suite 12c Customer implementation
SOA Suite 12c Customer implementationSOA Suite 12c Customer implementation
SOA Suite 12c Customer implementation
 

En vedette

En vedette (7)

OpenNTF Domino API - Overview Introduction
OpenNTF Domino API - Overview IntroductionOpenNTF Domino API - Overview Introduction
OpenNTF Domino API - Overview Introduction
 
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...
 
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...
 
Your App Deserves More – The Art of App Modernization
Your App Deserves More – The Art of App ModernizationYour App Deserves More – The Art of App Modernization
Your App Deserves More – The Art of App Modernization
 
GraphQL 101
GraphQL 101GraphQL 101
GraphQL 101
 
IBM Connect 2017: Refresh and Extend IBM Domino Applications
IBM Connect 2017: Refresh and Extend IBM Domino ApplicationsIBM Connect 2017: Refresh and Extend IBM Domino Applications
IBM Connect 2017: Refresh and Extend IBM Domino Applications
 

Similaire à From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Libraries (ICON UK 2014)

August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
Ulrich Krause
 

Similaire à From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Libraries (ICON UK 2014) (20)

Let's serve your data
Let's serve your dataLet's serve your data
Let's serve your data
 
Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.Servlets made easy. 
Write once and run everywhere.
Servlets made easy. 
Write once and run everywhere.
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 
DanNotes 2013: OpenNTF Domino API
DanNotes 2013: OpenNTF Domino APIDanNotes 2013: OpenNTF Domino API
DanNotes 2013: OpenNTF Domino API
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPages
 
Beyond Domino Designer
Beyond Domino DesignerBeyond Domino Designer
Beyond Domino Designer
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Apex world 2018 continuously delivering APEX
Apex world 2018 continuously delivering APEXApex world 2018 continuously delivering APEX
Apex world 2018 continuously delivering APEX
 
OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012
 
Symfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case studySymfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case study
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
 
Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
Docker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOpsDocker Concepts for Oracle/MySQL DBAs and DevOps
Docker Concepts for Oracle/MySQL DBAs and DevOps
 
FooConf23_Bringing the cloud back down to earth.pptx
FooConf23_Bringing the cloud back down to earth.pptxFooConf23_Bringing the cloud back down to earth.pptx
FooConf23_Bringing the cloud back down to earth.pptx
 
Building foundations
Building foundationsBuilding foundations
Building foundations
 

Plus de Paul Withers

Plus 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: 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
 
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
 
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
 
Social Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and DominoSocial Connections 2015 CrossWorlds and Domino
Social Connections 2015 CrossWorlds and Domino
 
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
 
Engage 2014 OpenNTF Domino API Slides
Engage 2014 OpenNTF Domino API SlidesEngage 2014 OpenNTF Domino API Slides
Engage 2014 OpenNTF Domino API Slides
 
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
 
BP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPages
BP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPagesBP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPages
BP206 It's Not Herculean: 12 Tasks Made Easier with IBM Domino XPages
 
Eureka Moment UKLUG
Eureka Moment UKLUGEureka Moment UKLUG
Eureka Moment UKLUG
 
Eureka moment
Eureka momentEureka moment
Eureka moment
 
DanNotes XPages Mobile Controls
DanNotes XPages Mobile ControlsDanNotes XPages Mobile Controls
DanNotes XPages Mobile Controls
 
Eureka moment
Eureka momentEureka moment
Eureka moment
 
BP210 XPages: Enter The Dojo
BP210 XPages: Enter The DojoBP210 XPages: Enter The Dojo
BP210 XPages: Enter The Dojo
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

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...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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?
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 

From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Libraries (ICON UK 2014)

  • 1. Presenter: Paul Withers Company: Intec Systems Ltd Presenter: John Cooper Company: JCB ICON UK 2014 From XPages Hero to OSGi Guru: Taking the Scary out of Building Extension Libraries
  • 2. 2 Paul Withers •XPages Developer since 2009 •IBM Champion •Author of XPages Extension Library •Developer XPages OpenLog Logger •Co-Developer of OpenNTF Domino API
  • 3. 3 John Cooper Began developing XPages from 8.5.0 Developed many XPage applications using java beans and custom components so decide to create OSGI Plugin to be able to deploy once New to blogging, contributed 1 project to Open NTF so far.
  • 4. 4 Agenda •Why •Development and Debugging Environment •XPages Starter Kit •Structure and Deployment
  • 5. 5 XPages Developer Roadmap •11 types of developer – Stephan Wissel •Three types of developer – Niklas Heidloff •Five tiers of developers – Greg Reeder Extension Library development should be the goal of XPages developers
  • 6. 6 Why? •Build Once, Use Anywhere (virtually!) •Easier to deploy new versions •Deploy for junior developers •Deploy third-party libraries •Apache POI etc •JDBC Drivers •More easily avoid Java security exceptions •Required for DOTS
  • 7. 7 Examples •XPages Extension Library •IBM SBT •XPages OpenLog Logger •OpenNTF Domino API •Bootstrap4Xpages •XPage Debug Toolbar •XPages Scaffolding •XPages Toolkit
  • 8. 8 JDBC Driver Plugin Wizard •Enhancement to RDBMS part of Ext Lib •Requires latest version of ExtLib •Allows a plugin to be created from one dialog for a JDBC driver •See 3:15 on video http://www.openntf.org/main.nsf/blog.xsp?permaLink=NHEF-9N7CKD
  • 9. 9 Agenda •Why •Development and Debugging Environment •XPages Starter Kit •Structure and Deployment
  • 10. 10 Development and Debugging Environment •Eclipse •XPages SDK •Debug Plugin •IBM Java Runtime •Local Domino Server recommended
  • 11. 11 Eclipse for RCP and RAP Developers •Latest release is Luna •Debug plugin does not support this? •Can have multiple versions installed
  • 12. 12 OpenNTF XPages SDK Project •Two downloads needed •Installation video from Niklas Heidloff
  • 13. 13 XPages SDK •Gives XPages JREs and Target Platforms •From 4:40 in video •Point Preferences to Domino and Notes installs •Ensure “Automatically create JRE” ticked •Tick relevant entry in Java > Installed JREs •Create and select entry under Plug-in Development > Target Platform
  • 14. 14 Debug Plugin •Allows you to point Domino server direct to projects in relevant workspace •From 7:44 in video •Point Preferences to Domino install •Configure Domino server for Java debugging, as for Java development •Run > Debug Configurations •Create Debug Configuration
  • 15. 15 OSGi Configuration •Create new OSGi Framework configuration – tells Domino to use Eclipse workspace •Set as Domino OSGi Framework •Set auto-start to false •Click Debug – creates pde.launch.ini •Issue “res task http” command •Obviously will cause problems on networked server!
  • 16. 16 New Plugins •For new plugins •Go to OSGi Framework configuration •Select the new plugin •Click Debug to update config •Issue “res task http” command •If plugin is changed •Issue “res task http” command
  • 17. 17 Java Runtime •Not necessary for most development •Needed to debug Extension Library •See blog post by Paul Withers •Point eclipse.ini to Domino javaw.exe •Ensures it uses IBM version of Java •Add before Xms •No spaces
  • 18. 18 Agenda •Why •Development and Debugging Environment •XSP Starter Kit •Structure and Deployment
  • 20. 20 XSP Starter Kit •Sample Plugin •Includes examples for all main classes •Components •Beans •SSJS – not straightforward •Listeners •and more
  • 21. 21 Agenda •Why •Development and Debugging Environment •XPages Starter Kit •Structure and Deployment
  • 22. 22 Structure •Plugin project •This is all that’s needed for OSGi framework configuration •Feature project loads one or more plugin •Update Site project points to one or more feature •Creates plugins and features jars •Export as General > File System
  • 23. 23 Update Site Project
  • 24. 24 Deployment to Server / DDE •Run from Eclipse using Domino Debug Plugin •Install to remote server as other Ext Libs •See Chapter 2 of XPages Extension Library pp28+ •Install to DDE as other Ext Libs
  • 25. 25 Deploy to DDE •Every change you make to the component re-install the update – Quite laborious for development •Add directly to DDE plugins •Best to create separate directory See blog post by John Cooper
  • 26. 26 Create new Directory •Navigate to framework directory inside the Notes Data Directory •Create a new plugin directory
  • 27. 27 Create a Link file •Inside your newly created text file add the following: path=C:/Program Files (x86)/IBM/Notes/framework/jmc-plugins
  • 28. 28 Update Platform.XML file •Change the transient attribute on the config tag to false •Replace all the instances of policy="MANAGED-ONLY" to policy="USER-EXCLUDE"
  • 29. 29 Export Plugin •Export plugin as a “Deployable Plugin and Fragment” •Put in newly created directory •Restart designer
  • 30. 30 Is It Working? •Check Help > Support > View Log and View Trace for errors / print statements
  • 31. 31 Is It Working?
  • 32. 32 Deployment to Developers / XPiNC •Add to Widget Catalog from Update Site database •See XPages Extension Library pp40+ •Best practice is using Desktop Policy, ensures updates automatically deployed
  • 33. 33 Plugin Structure •See Extensibility API Developers Guide •Activator is optional •Allows generic code to be run •Extend org.eclipse.core.runtime.Plugin
  • 34. 34 Extensions •Extensions load other Java classes •Extend com.ibm.commons.Extension •Use “tell http osgi pt -v com.ibm. commons.Extension” to see types and classes currently loaded
  • 35. 35 Library •Selected in Xsp Properties •Type=com.ibm.xsp.Library •Extend AbstractXspLibrary •Defines •Dependencies •Faces-Config files •Xsp-Config files
  • 36. 36 Contributor •Adds factories •Holds server-level maps •Load implicit objects (variables) •Type=com.ibm.xsp.library.Contributor •Extend XspContributor
  • 37. 37 ResourceProvider •Adds browser resources •JavaScript •CSS •Images •Type=com.ibm.xsp.GlobalResourceProvider •Extend BundleResourceProvider
  • 38. 38 Basic Plugin from XSP Starter Kit
  • 39. 39 Rest Service using DAS •DAS – Domino Access Services •Create a plugin project •Add extension point to plugin.xml <plugin> <extension point="com.ibm.domino.das.service"> <serviceResources class="org.iconuk.servicesdemo.service.NabDetailsService" name="NabDetails" path="nabdetails" version="9.0.1"> </serviceResources> </extension> </plugin>
  • 40. 40 Plugin.xml class="org.iconuk.servicesdemo.service.NabDetailsService“ Points to main service class name="NabDetails" Name of service is used in server document to know which service to load path="nabdetails" Path is the used to for the URL to access the service. Eg. http://hostname/api/nabdetails
  • 41. 41 Service Class •Required for extension point •Extends com.ibm.domino.das.service.RestService •getClasses method used to access Classes for each service URL
  • 42. 42 Resource class •One class per url api/nabdetails/me -> class CurrentUserDetailsResource api/nabdetails/paul -> class UserPaulDetailsResource •Used to identify which path uses the class @Path(CURRENTUSER_PATH) •Used to identify which http method uses class method @GET
  • 43. 43 Enable on server •Load plugin on to server in same way as any other plugin •Open Server Document Internet Protocols -> Domino Web Engine •Add service name to Enabled DAS Services
  • 44. 44 Components •Take a custom control and make it global •NotesIn9 64 by Tim Tripcony •#codefortim •Or code within Eclipse •Extensibility API 9.0.1
  • 45. 45 Components •Component class DOMINO •.xsp-config to add properties DDE •Renderer class, if required DOMINO •Use getRendererType() to find an existing renderer •faces-config.xml to add renderer DOMINO •Load xsp-config and faces-config.xml in Library class
  • 46. 46 Including Third Party Jars •Create a separate plugin •New > Plug-in from Existing JAR Archives •For additional jars •Import the jar •Add to Build Path •Ensure included in Binary Build on build.properties •Also blog post by John Dalsgaard
  • 47. 47 Including Third Party Jars •Add as Required Plug-in to plugin.xml •Click on Properties and tick “Reexport this dependency” •Add to feature •Ensure “Unpack the plug-in archive after the installation” is ticked Otherwise DDE will not see the jars
  • 48. 48 Demo Plugin •Add component for Separator •Allow properties for: •separatorType (New Line / Space) •count (integer, defaulting to 1) •Deploy org.apache.commons.lang3 •Add utility method to convert any object to string detailing properties
  • 49. 49 Links to Demos •https://github.com/paulswithers/pluginDemo •Demo database is in notes folder •https://bitbucket.org/johnmcooper/icon-uk- 2014-services-demo
  • 50. 50 Thank You •Paul Withers •pwithers@intec.co.uk •http://www.intec.co.uk/blog •http://twitter.com/paulswithers •John Cooper •john@johnmcooper.co.uk •http://developmentblog.johnmcooper.co.uk •http://twitter.com/j_m_cooper