17.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Design and data separation
• Create the data part on the Bluemix Domino instance
– create a blank database
or
– copy and existing database with data
• Setup ACL etc.
– Keep in mind the additional webusers you may have created before

18.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Setup local dev environment
• Separate data and design also on your local environment
• Find and modify ALL static references to „database“ on
every XPage, Custom Control and Code
– Document data sources
– View data sources

20.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
More flexible: use a custom bean
• Compute server and filepath dynamically
– for the local and the Bluemix environment
• Allows a different filename on the XPages NoSQL service (other
than „tododata.nsf“)
• Generic code for „database“ computation for document, view
and repeat data sources
• There is a snippet for you… 
– https://openntf.org/XSnippets.nsf/snippet.xsp?id=daobean-for-xsp-
on-bluemix

23.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
What the DDE Plugin does
• When running for the first time
– It will ask for a local folder
– It will create a copy (or replica) of the XSP part
– It will create a manifest.yml file
– It contacts the Bluemix XSP runtime and uploads the 2 files
• Afterwards
– It updates the local copy / replica
– It modifies the manifest.yml file
– It contacts the Bluemix XSP runtime and uploads the 2 files

24.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
What the DDE Plugin also does…
• It won‘t display error messages or log outputs during
deployment
– hard to troubleshoot
• Sometimes it may not work when running a second, third, …
time
– DDE restart will solve this problem

25.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
The CF command line
• CF = Cloud Foundry
• Download and install the command line
– https://github.com/cloudfoundry/cli/releases
– http://docs.cloudfoundry.org/devguide/cf-cli/
• You can create a batch file to accellerate deployment
• Verbose output of any action during deployment process
• Access to the XSP runtime file system (e.g. for reading system
logs)

27.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Benefits using the CF command line
• Full control of what‘s being done
• Understand how cloud deployment works
• Create new XSP runtimes and instances on the fly
• Deploy plugins and other resources

28.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Disadvantage using the CF command line
• You have to create the local NSF copy / replica manually
– beware of local encryption!
• You have to type in a console… 
– I recommend using CMDER command line replacement for Windows

30.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
The manifest.yml file
• The manifest.yml file is a simple text file (not even XML)
• It contains fundamental definitions for the runtime and the
service(s) used
• When using hybrid it contains credentials!
– do not commit the file to a repository!
• Domino Designer Plugin comes with a versatile editor for the
manifest.yml file

31.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
The manifest.yml editor
• Gives you the basic configuration for a single XSP runtime
application

33.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Did you know?
• The manifest.yml file can deploy more than one application to
the XSP runtime 
– APP_PRELOAD_DB: xsp1.nsf, xsp2.nsf, xsp3.nsf
• By setting values manually you can modify existing or create
new XSP runtimes, e.g.
– scaling instances and memory
– setting up new XSP runtimes and hosts

35.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Security considerations
• You have to manage at least two ACLs
– XSP Runtime (design part)
– XPages NoSQL service (data part)
• Design part
– manage Anonymous access only to force a login page
• Data part
– Manage ACL corresponding to the user ID and web users you may set
up in the XPages NoSQL service
– Other known ACL rules such as user roles apply here
– You can lock yourself out from that ACL – be careful, Full Access
Admin is NOT available to unlock!

36.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Locked out from data NSF?
• Deleting and re-creating the service has no effect, NSFs will
re-appear!
• You have to contact IBM support for unlocking or deleting
the NSF!
• Locked out from design NSF?
• remove the runtime and re-deploy – phew! 

38.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Imagine…
• to use your favorite extensions even on IBM Bluemix
• to enrich your application with genius software like the
OpenNTF Domino API or the XLogger
• You can do this!
+

39.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Using plugins: preparation
• Create a folder „shared-plugins“ in the local deployment
folder
• Download the plugin or extension, unzip it
• Locate the updatesite version of the plugin
• Copy the content of the plugins folder into the “shared-
plugins” folder (.jar-files)

44.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Grant restricted access of the JVM
• Like in on-premises environments you may want to enable full
access for the JVM when using e.g. Java reflections.
• Instead of setting the java.pol file you simply add this to the
manifest.yml
– APP_JAVA_POLICY_ALL_PERMISSION: ‘1’
• Keep in mind that this may be a security issue

45.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Verbose mode while deploying
• When using the CF command line the following added to the
manifest.yml file will deliver detailed messages during the
deployment
– APP_VERBOSE_STAGING: '1'

46.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Don‘t want to type?
• Use the editor to set those up 

47.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Missing view icons
• When using view icons in XPages view panels the icons are
missing
• They won‘t be displayed even if you use @ViewIconUrl SSJS
function
• However, you can add them manually 

48.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
View icons: lost but found
• Open the deployment folder of the XSP part
• Create the folder notesdata/domino
• Copy the folder <NotesData>/domino/icons to it
• The folder will be published to the XSP runtime
• The view icons will re-appear!

49.
XPages on IBM Bluemix: The Do‘s and Don‘ts
www.isbg.org 23.+24.05.2016 @LSBG
Q & A
Get in touch:
xpages.slack.com
#bluemix-dev