In my first post about the SBT I wrote about what it is and why you should use it. Today I am going to explain what you need to do in order to use the SBT in your projects. This little tutorial is based on IBM Domino, IBM Domino Designer (DDE) and Xpages.
So, first of all you need to download the SBT. Since it is an OpenNTF project it is quite obvious how to obtain it. Once you’ve downloaded it you can extract the zip File in an appropriate place on your disk. Have a look at the contents. You’ll find the following folder structure (based on sbtsdk-126.96.36.19940121-0336):
config -> A property file you could use to define your data sources e.g.
dbscripts -> SQL scripts to create token stores in a RDBMS
doc -> Social Business Toolkit source code documentation
redist -> Update sites to be deployed on the server, DDE
samples -> Sample environments to be deployed on different servers
scripts -> OAuth key creation scripts (see readme)
source -> Entire SBT source code
test -> Packages to test the SBT
tomcat -> Apache Tomcat server
The redist directory is what you are looking for. Here you find subdirectory called domino and within that 2 zip files. One is the SBT Playground and the other one is the SBT itself. You only need the Playground stuff if you decide to install the Playground.nsf on your server. The zip files contain the update sites that you need to install the packages. First of all you want to unpack both zips into a directory of you choice. I usually take the parent directory of the zips but it’s all up to you. Just make sure you remember where you put the stuff.
First we are going to install the packages on the Domino Server. You can decide between 2 options to do so.
1. Install via updatesite.nsf
If you have not already done so create a new updatesite.nsf as described in Jesper’s blog and add it to your Domino server’s notes.ini. Open the database and import the 2 packages that you have unpacked before. You have to select each „site.xml“ file. You have to restart the http task on your server in order to load the newly imported packages.
2. Install directly in server directory
On your Domino server go to your data directory and move to „/domino/workspace/applications/eclipse“. Copy both the features folder and plugins folder from your unpacked packages here so that the features and plugins are being copied into the features and plugins folders. Once you’ve done so you’ve got to restart your http task in order to load the packages.
Now that your Domino server is SBT ready you need to install the packages into your DDE. Open your DDE and select „File/Application/Install“ from your main menu. If you do not see the Install option follow the steps in this blog entry to enable the feature.
In the dialog that opens select „Search for new features to install“ and click „Next“. Click „Add Zip/Jar Location…“ and open the „SBT_download/redist/domino“ directory. Select the SBT zip file (not the unpacked SBT!) and give it a name or leave it as suggested and click OK. Repeat this for the Playground stuff. Clck Finish to start the installation process. Click through the wizard and accept all requests. You have to restart the client in order to conclude the entire process. The steps to install packages into the DDE is explained with screenshots in a slideshare presentation that deals with the Extension Library.
Now re-open the DDE and create a new database. Open the xsp properties and move to the „Page Generation“ tab. In the XPages Libraries section tick „com.ibm.xsp.extlib.library“ and „com.ibm.xsp.sbtsdk.library“. Save and close the xsp properties.
Congratulations! You are now all set up to start your first SBT project. In my next blog post I will explain how to set up the endpoints and how to access a simple service and show the data on an Xage. So stay tuned!