Getting Started as XPages Developer

Introduction

The SDK comes with Java and JavaScript APIs to easily access IBM Connections and IBM SmartCloud for Social Business. Watch this video for a short overview of the SDK or watch this longer video to learn about the IBM Collaboration Solutions app dev strategy.


Watch a Video with a Sample App

Watch this video to see a sample partner community application.


Prepare your Environment

The following instructions assume that IBM Connections is used on IBM Greenhouse in combination with an on-premises IBM Domino server and local IBM Domino Designer.

Everyone can register free accounts to try IBM Connections on IBM Greenhouse. Developers can program against this environment using their accounts and basic authentication but no custom gadgets can be deployed.

The SDK needs to be installed on the on-premises IBM Domino server. Download the SDK and follow the instructions how to set it up.
Download the latest SDK

IBM Domino Designer can be downloaded for free and installed locally.


Code your first App

Create a new application and configure the ConnectionsBasicEndpoint to the Connections server.

  1. Click File -> New -> Application.
  2. Select a server, name the application, and click OK.
  3. Via the Package Explorer open Faces-config.xml.
  4. Click the source tab and replace the source content as follows.
    <faces-config>
    <!-- Connections -->
    <managed-bean>
      <managed-bean-name>connections</managed-bean-name>
      <managed-bean-class>com.ibm.sbt.services.endpoints.ConnectionsBasicEndpoint</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      <managed-property>
        <property-name>url</property-name>
        <value>https://greenhouse.lotus.com</value>
      </managed-property>
      <managed-property>
        <property-name>authenticationService</property-name>
        <value>communities/service/atom/communities/my</value>
      </managed-property>
    
      <!-- Trust the connection -->
      <managed-property>
        <property-name>forceTrustSSLCertificate
        </property-name>
        <value>true</value>
      </managed-property>
    </managed-bean>
    
    <!--AUTOGEN-START-BUILDER: Automatically generated by IBM Domino Designer. Do not modify.-->
    <!--AUTOGEN-END-BUILDER: End of automatically generated section-->
    </faces-config>
                  
  5. Via the Xsp Properties editor ensure that the application has both the extlib and sbtsdk libraries in its list of dependencies.

    xpageslibs Getting Started as XPages Developer

Consume the SDK from an XPages application by leveraging the server-side Java APIs.

  1. Click File -> New -> XPage.
  2. Name the XPage MySocialXPage and click OK.
  3. Copy the following content to the page:
    <?xml version="1.0" encoding="UTF-8"?>
    <xp:view xmlns:xp="http://www.ibm.com/xsp/core">
    Here is the list of public Communities:
    <xp:br></xp:br>
    <xp:repeat id="repeat1" rows="30" var="community">
      <xp:this.value><! [CDATA [#{javascript:var svc = new com.ibm.sbt.services.client.connections.communities.CommunityService()
    return svc.getPublicCommunities()
    }]]></xp:this.value>
      <xp:div>
        Name:
        <xp:text escape="true" id="computedField1"
          value="#{javascript:community.getTitle()}">
        </xp:text>
      </xp:div>
    </xp:repeat>
    </xp:view>
                  

Learn more

To find out what functionality the SDK provides read the Java API documentation. The partner community sample can be downloaded from OpenNTF. A second sample is the trouble ticket application can be downloaded as well. Watch the webinar to learn how to get started with the Social Business Toolkit SDK.