Bluemix and Designer Use Case 1 - Bluemix to Designer to Bluemix

XPages applications created on Bluemix can be imported from the Bluemix site and modified locally using Domino® Designer.

About this task

XPages applications created on Bluemix can be imported from the Bluemix site into your Designer client to make local modifications. You can then push (deploy) the newly modified version of your application back to Bluemix so that the original application stored on Bluemix will be replaced by the new version to reflect the changes that you made.

This process can be useful for making minor application user interface changes, making changes to existing forms and views, or adding code to the application created on Bluemix. You currently are not able to do these kinds of application modifications from the Bluemix site.

Start this procedure by first going to Bluemix and creating the provided XPages Web Starter application that gets you up and running with an XPages application in the cloud. The IBM® XPages Web Starter application is a boilerplate that you can use to develop XPages applications in Bluemix. The starter application combines the IBM® XPages for Bluemix runtime environment and the IBM® XPages NoSQL Database for Bluemix service to create a functional to-do application that works immediately after you create it. You can create, modify, and delete to-do tasks. The tasks are then saved to the back-end database.

Follow these steps to begin by creating your starter application:

Procedure

  1. Log in to Bluemix through the web user interface.
  2. Click CATALOG.
  3. Scroll to the end of the Catalog. In the Looking for more? section, click Bluemix Labs Catalog.
  4. Select the XPages Web Starter from the Boilerplates section of the Bluemix Labs Catalog, and click View More.
  5. Provide the application name, modify the host name if required, and click Create. After a short wait, your application starts.
  6. To see your application, enter this URL in a browser: http://<yourhost>.mybluemix.net

Customizing your Bluemix XPages Web Starter application in Designer

About this task

Now that you have gone and created your starter XPages application in Bluemix, you can import it locally to Designer to customize it as needed. Follow these steps accomplish that task:

Procedure

  1. Download the starter code compressed file.
    1. From your Bluemix dashboard, click your application.
    2. In the left navigation bar (where it reads "Back to Dashboard), click the up/down arrow icon to reveal a drop down list and select Start Coding.
    3. From the How do you want to start coding? section, select CF Command Line interface.
    4. Click Download Starter Code and save the starter code compressed file to a local directory.
    5. Open IBM® Domino® Designer.
  2. Switch to the user ID supplied by the XPages NoSQL Database service. The starter application uses both the IBM® XPages for Bluemix runtime environment and the IBM® XPages NoSQL Database for Bluemix service to create a functional application that works immediately after you create it.
    1. In the Services section of the Dashboard navigation bar, click on the instance of the XPages NoSQL Database service.
    2. Click Launch. The XPages NoSQL Database Service Dashboard opens in a new browser window and displays your credentials.
    3. Click the ID Download link to save your credentials locally. Make sure that you note the server and database name and location.
    4. In Designer, click File > Security > Switch ID. Browse for and select the downloaded ID. Click Open.
  3. Add your Bluemix credentials to Designer to use Designer's built-in Bluemix tools.
    1. Click File > Preferences. The Preferences window appears.
    2. In the navigation pane, click Domino Designer > IBM Bluemix.
    3. In the Bluemix Server section, enter the URL of the Bluemix server and your Bluemix credentials.
    4. Click Test connection to verify that Designer can connect to the Bluemix server.
    5. Click Apply and then click OK.
  4. Import your starter application to Domino® Designer.
    1. Click Tools > Import IBM Bluemix Starter Code. The Bluemix Starter Code Import Wizard opens.
    2. Click Browse, select the downloaded starter code zip file, and click Open. Click Next.
    3. Click Browse and create a new folder. This directory is used to deploy your application to Bluemix and must be empty. Click Next.
    4. Select the organization and space where you created the starter application on Bluemix and click Finish. The boilerplate NSF is imported to your Designer workspace and linked to the deployment directory that you specified in the Import wizard.
    5. Modify your application as needed.
    6. If you need to change the advanced Bluemix properties of the boilerplate application, click Application Configuration > IBM Bluemix Manifest from the Application Navigator. Do NOT makes changes here unless you are an advanced user. These advanced properties are stored in the manifest.yml file located in your designated deployment directory.

Redeploy (push) your Bluemix XPages Web Starter application back to Bluemix

About this task

Now that you have modified your starter XPages application in Domino® Designer, you can redeploy (push) it back to the Bluemix site so that the original application stored on Bluemix will be replaced by the new version with the changes that you made. Follow these steps accomplish that task:

Procedure

  1. Redeploy the application to Bluemix using the integrated Designer Bluemix tools.
    1. Save all of your changes to the application.
    2. Select the application root in the Applications Navigator panel and then click the Bluemix button in the menu toolbar.
    3. Select Deploy Application. Designer copies your modified application to the deployment directory, and the application is pushed to Bluemix. Your application stops, restages, and restarts on Bluemix. This process takes a few minutes to fully complete.
  2. Access your application on Bluemix.
    1. Right-click on the application in the Domino® Designer Application Navigator and select IBM Bluemix > Open in default system browser. Your application opens in a new browser window.
    2. When your application is deployed, you can use the other available services in Bluemix to make your application more powerful. Refer to the documentation on the Bluemix site for more information.