Tuesday, 4 August 2015

IBM XPages on Bluemix: XPages NoSQL Database Part IV - Pushing existing XPages Applications to Bluemix (1)

In my previous blog post, IBM XPages on Bluemix: XPages NoSQL Database Part III - Connecting to the XPages NoSQL Database service from Domino Designer (2), I showed how to create a connection document in the local IBM Notes client for the service-provided Domino server. In this blog I will show the first part of pushing existing XPages applications to Bluemix, splitting the XPages Application in design and data.
Existing XPages applications typically contain both the application design and data in the form of documents. This does not suit the Bluemix model of separating the back-end data from the application design. To host these applications safely on Bluemix, the application must be split into two distinct parts: a runtime for the visual aspects of the application and a service to persist the data. Any data that is stored in the runtime is lost if it is restarted manually or for load-balancing purposes. Having a distinct runtime also allows the application to be scaled by increasing the number of instances.

Related Blog Posts:
IBM XPages on Bluemix: XPages NoSQL Database Part III - Connecting to the XPages NoSQL Database service from Domino Designer (2)
IBM XPages on Bluemix: XPages NoSQL Database Part II - Connecting to the XPages NoSQL Database service from Domino Designer (1)
IBM XPages on Bluemix: XPages NoSQL Database Part I - Create an XPages NoSQL Database service instance
IBM XPages on Bluemix: Deploy changes to the Bluemix environment via Domino Designer Part II
IBM XPages on Bluemix: Deploy changes to the Bluemix environment via Domino Designer
Customizing the XPages Web Starter Application on Bluemix - Start Coding
Creating XPages Applications with the IBM XPages Web Starter on Bluemix

To split an XPages Application into design and data the following steps can be followed.

1. Open Domino Designer and log in using your regular Notes ID.
2. Open the XPages application that you want to split.
In this example, I use a simple XPages application which I named Bluemix Application.


3. Split the XPages application in design and data.
Right-click on the application in the Applications Navigator and select Application - New Copy to create a duplicate of the application. Name one copy bluemix_design.nsf and the other copy bluemix_data.nsf


The XPages applications appear in the Applications Navigator.


4. Access Control List
Right-click on the design application in the Applications Navigator and select Application - Access Control. The Access Control dialog box opens.
Click Add to create a new user. Enter the name as the user name generated by the XPages NoSQL Database Service Dashboard, in this example j_oldenburger_gmail_com.


Select Designer from the Access drop-down menu and click OK.


Repeat these stepson the data application.

5. Bluemix User ID
Switch to the service-provided Notes ID by clicking File- Security - Switch ID.
Select the downloaded ID file and click Open. When prompted, enter the password that was generated by the XPages NoSQL Database Service Dashboard.
Double-click both applications in the Applications Navigator to reopen them.


6. Delete design elements
In the data application, delete all XPages, Custom Controls, .css files and images.
In the design application, delete all Forms and Views.

7. Sign the XPages applications
Right-click on the data application in the Applications Navigator and select Application - Sign Design. Click OK.


The XPages Application is now split into design and data. In the next post we will continue to work on the design application.

No comments:

Post a Comment