SDK Road Map
The Microsoft Commerce Server 2000 Software Development Kit (SDK) includes extensive samples and tools to help developers get started programming with Commerce Server. When installed, all of the files composing the Commerce Server 2000 SDK are in a folder called "SDK" under the "Microsoft Commerce Server" folder. This topic describes the structure and contents of the SDK folder.
Note
You must include the following components of the Platform SDK to build the samples in the Commerce Server 2000 SDK (choose at least these options on the Custom Installation screen of the Platform SDK installation program):
Configuration Options (all)
Build Environment
Base Services (all)
Component Services
COM
Data Access Services
OLE DB
SQL Server
Management Services
Microsoft Management Console
Minimum Build Tools
Networking and Directory Services
Active Directory Services Interface
Web Services
Microsoft Internet Explorer
Microsoft Internet Information Server
Win32 API
You may also want to install the following debugging tools at the same time:
Debugging Tools
WinDbg
OEM Support Tools
UserDump
For more information, see Debugging Tools.
In addition to installing the Platform SDK, you must also update your system include path to contain the Commerce Server 2000 SDK include folder, and update your Microsoft Visual C++ directory options to contain the Commerce Server 2000 SDK include folder.
Note that the installation of the Platform SDK should have added the path settings that it requires to the user INCLUDE and LIB environment variables:
INCLUDE: <Platform SDK folder>\Include
INCLUDE: <Platform SDK folder>\Include\ATL30
LIB: <Platform SDK folder>\Lib
To update your user INCLUDE environment variable
Right-click My Computer and select Properties.
In the System Properties dialog box, click the Advanced tab.
On the Advanced tab, click Environment Variables.
In the Environment Variables dialog box, select the variable INCLUDE from the User variables for <username> box, and then click Edit.
In the Edit User Variable dialog box, append the path to the Commerce Server 2000 SDK include directory to the value in the Variable Value box. For example:
C:\Program Files\Microsoft Commerce Server\SDK\Include\
Click OK three times to exit all three dialog boxes.
To update Microsoft Visual C++
Open Microsoft Visual C++.
On the Tools menu, click Options.
In the Options dialog box, select the Directories tab.
Verify that the Include files option in the Show directories for box is selected.
Click New, and then enter the path to the Commerce Server 2000 SDK include directory. For example:
C:\Program Files\Microsoft Commerce Server\SDK\Include
Click OK.
There are three top-level folders in the SDK folder, as follows:
Include Folder
Samples Folder
Tools Folder
Include Folder
The include folder contains numerous C++ header (.h extension) and Interface Definition Language (.idl extension) files that are of general use when using Commerce Server COM objects from C++, and examining the details of interface definition, respectively.
Many of the header files are referenced in the C++ version of the reference topic for the corresponding object.
Samples Folder
The Samples folder contains a number of different samples, divided into the following sub-folders:
Business Analytics Folder
Management Folder
Marketing Folder
Order Processing Folder
Privacy Folder
Sitelets Folder
SolutionSites Folder
Business Analytics Folder
The Business Analytics folder contains the following samples:
CreateSchemaObject.vbs
This sample demonstrates how to use the OLE DB Provider for Commerce Server to modify the Business Analytics System logical schema by adding a new class and class members, and associating it with an existing class.
This script is in the Scripts sub-folder.
To run the sample, modify the connection string on line 135 of the script to suit your environment, and uncomment the following lines:
140 'TestBindToCls cn, "visit" 'visit is valid in DW
142 'TestBindToMem cn , "visitNum"
145 'TestCreateClsMem strSQLConn, strURL
DumpFacts.vbs
This sample demonstrates how to use the OLE DB Provider for Commerce Server to read the Fact Tables in the Business Analytics System.
This script is in the Scripts sub-folder.
Analysis - New dynamic OLAP report script.sql
Analysis - New dynamic SQL report script.sql
Analysis - New static OLAP report script.sql
Analysis - New static SQL report script.sql
These sample SQL scripts demonstrate how to create new reports of various types in the Business Analytics System.
These SQL scripts are in the Scripts sub-folder.
Schema Tool
The files in this sample constitute a Microsoft Visual Basic project that provides a schema browser you can use to view Commerce Server Data Warehouse classes, class properties, data members, and class relationships as they are defined in the logical schema. This sample demonstrates how to use the OLE DB Provider for Commerce Server to access the logical schema of the Data Warehouse.
Management Folder
The Management folder contains the following samples:
BizDesk
The files in this sample provide a working code base from which to develop new Commerce Server Business Desk modules. This code base demonstrates how to use XML data-islands, and includes the use of the Business Desk HTML Components (HTCs) for creating a rich, Web-based user interface to allow for non-technical administration of your Commerce Server Web site. This sample provides you with an Edit page that demonstrates the use of edit page HTCs, a List page that demonstrates the use of the list page HTC, and a response page for handling requests from the Business Desk user interface.
For more information about building Business Desk modules, see Building Business Desk Modules.
BizDesk Installer
The files in this sample constitute the C++ source code for a Component Object Model (COM) object that provides a mechanism for automating the process of adding the configuration information for a new Business Desk module to an existing Business Desk installation. For more information about the interface that this object implements, see Automating Module Installation.
PuP Resource
The files in this sample constitute the Microsoft Visual Basic source code for a COM object that implements the IPuP interface. The implementation is essentially the same as that implemented by the GenericPuP object, and can be used to package a specified set of tables from a single SQL Server database. For more information about the IPuP interface and the GenericPuP object, see Site Packager Interface and Using the GenericPuP Object, respectively.
ResourceConfig
The files in this sample constitute the Microsoft Visual Basic source code that demonstrates how to add the configuration information for a custom resource with one configuration property to the tables of the Administration database. For more information about integrating a custom resource, see Integrating Custom Resources.
Site Status
The files in this sample constitute the C++ source code of a Microsoft Management Console (MMC) extension snap-in that extends the Commerce Server Manager interface and provides the ability to open and close the Commerce Server applications into which it is installed.
When installed as a site resource, this extension snap-in retrieves the name of the site it is installed in, and then retrieves the names of all the applications installed in the site. When you choose to close the site, it queries the Internet Information Services (IIS) Metabase on each Web server hosting the site, and sets the RedirectUrl key in the Metabase to redirect all incoming requests to a page that reports the site as closed.
To install the sample into an existing site, run the InstallSiteStatus.vbs script from the command line, passing in the name of the site. For example:
C:\>cscript InstallSiteStatus.vbs Retail
Widgets
The files in this sample constitute demonstration pages for the various HTML Components (HTCs) provided with the Business Desk Framework.
You can set an IIS virtual directory to the Widgets folder to see sample pages for all of the HTML Components (HTCs) used in Business Desk.
Marketing Folder
The Marketing folder contains the following samples:
dbscripts
The files in this sample provide SQL scripts that can be used to remove different categories of tables and related objects, as follows:
campaigns-drop.sql: Removes all tables and related objects for the Campaigns resource.
expression-store-drop.sql: Removes all tables and related objects for an Expression Store, which is normally in the same database as the Profile store.
listmanager-drop.sql: Removes all tables and related objects in a List Manager database, which is normally in the same database used by the Campaigns resource.
debug
The files in this sample provide a set of Active Server Pages (ASP) that you can include in your ASP files to dump the contents of a CSF cache and to trace the scoring logic applied for any given content request. The CSF Score Headlines sample demonstrates how to use these debugging utilities.
The ASP files in this directory are: DumpContentList.asp and TraceScores.asp.
Headlines
The files in this sample demonstrate how to extend the Targeting System using custom Content Selection Framework (CSF) Cache Loading and Scoring components. This sample shows how to target headlines to users of your site based on the age of the headline and what headlines have been seen the most. It demonstrates integration with the targeting system using both Microsoft Visual C++ and Microsoft Visual Basic.
Refer to the file Readme.txt for further instructions.
Order Processing Folder
The Order Processing folder contains the following sample:
MinMaxShip
The files in this sample are divided into three sub-folders: ATL, BizDesk, and VB. The ATL and VB folders contain files that constitute parallel implementations of the same pipeline component, known as the MinMaxShip component. The ATL folder contains the source code for an C++ Active Template Library (ATL) implementation, and the VB folder contains the source code for a Microsoft Visual Basic implementation.
The MinMaxShip pipeline component demonstrates how a new pipeline component can be added to the Order Processing pipeline, as well as demonstrating the new shipping architecture in Commerce Server.
The BizDesk folder provides a custom Commerce Server Business Desk module that allows the MinMaxShip sample to be quickly added to an existing Commerce Server Web site for use in the shipping stage of an Order Processing pipeline.
To run either implementation of the MinMaxShip sample, you must first install one of the Solution Sites that can be downloaded from https://www.microsoft.com/commerceserver/solutionsites. After you have installed one of these sites, go to the directory containing the Business Desk files, and do the following:
Copy the file MinMax_edit.asp from the MinMaxShip\BizDesk folder to the relevant Shipping folder. For example, C:\InetPub\wwwroot\RetailBizDesk\Shipping.
Copy the file shipping_methods.xml from the MinMaxShip\BizDesk folder to the Config folder. For example, C:\InetPub\wwwroot\RetailBizDesk\Config.
After the Shipping module in Business Desk is updated, you can use it to configure new shipment methods of type "MinMaxShip".
For more information about the MinMaxShip sample, see MinMaxShip Sample Pipeline Component.
Privacy Folder
The Privacy folder contains the following samples:
DeleteDetailedData.vbs
This sample demonstrates how to use the OLE DB Provider for Commerce Server to delete detailed data about a particular user from the Data Warehouse.
DisconnectDetailedData.vbs
This sample demonstrates how to use the OLE DB Provider for Commerce Server to disassociate detailed data about a particular user without deleting the data itself.
Sitelets Folder
Sitelets are small-scale Web sites that demonstrate the use of a particular Commerce Server feature in isolation from other features of Commerce Server. This allows you to more easily focus on the code required to implement that feature.
The Sitelets folder contains the following sitelets:
Ad
Demonstrates how to use the Profiling System in combination with the Targeting System to display targeted advertisements.
Auction
Demonstrates how to use the Auction object to implement Winning Bid auctions. It includes a custom Business Desk module designed for managing auctions.
Catalog
Demonstrates how to use the Product Catalog System to offer catalog browse and search functionality on your e-commerce site.
Discount
Demonstrates how to offer targeted discounts during order processing on your Web site.
Order
Demonstrates how to use Commerce Server to implement an order capture process on your Web site.
Passport
Demonstrates how to integrate Passport Single Sign-In (SSI) capability with the Profiling System. With this capability, you and your customers can benefit from the Passport SSI authentication service, while still being able to use the Profiling System for targeting users, managing user data, and so on.
Profile
Demonstrates how to use the Profiling System to register and authenticate users on your e-commerce site.
Each of the sitelet folders contains a Commerce Server Site Packager file (.pup extension) that can be unpacked to install the sitelet you want. Each folder also contains a "source" sub-folder containing the Web site files that are in the corresponding Commerce Server Site Packager file.
SolutionSites Folder
The SolutionSites folder contains the following file:
AppConsts.idl
Provides constants used by the Solution Sites.
Tools Folder
The Tools folder contains a number of different tools, divided into the following sub-folders:
ATL Pipe Wizard Folder
MembershipMigration Folder
Migration Folder
Registration Tool Folder
VB Pipe Wizard Folder
ATL Pipe Wizard Folder
The files in this folder constitute the source files of a tool that allows you to install a new wizard in your Microsoft Visual C++ 6.0 installation. This wizard automates the creation of Commerce Server pipeline components by creating the object definition and implementation files containing function prototypes for the interfaces required to implement a fully functional pipeline component.
In addition, this wizard creates a property page for your pipeline component. You can add controls to this property page through which users can set component properties.
You must build the ATL Pipeline Component Wizard before installing it.
For more information about using the ATL Pipeline Component Wizard, see Creating Pipeline Components Using the Active Template Library (ATL).
MembershipMigration Folder
The files in this folder constitute the source files of a tool that allows you to migrate user profiles from a Site Server 3.0 Membership Directory into a Commerce Server 2000 user Profile store.
For more information about migrating user profiles from Microsoft Site Server 3.0 Commerce Edition Web sites to Commerce Server 2000 Web sites, see Migrating the Membership Directory.
Migration Folder
The executable file in the Ad Server sub-folder is a tool that allows you to migrate campaigns from Site Server 3.0 Ad Server to the Commerce Server 2000 Content Selection Framework.
Run the tool on the command line, passing the following parameters:
1: /cs30:"Connection string to the Site Server 3.0 Commerce Edition AdServer database"
2: /cs2000:"Connection string to the Commerce Server 2000 Campaign database"
3: /exprstore:"Connection string to the Commerce Server 2000 Expression store database"
4: [/silent] (Note that this parameter is optional)
For example:
adservermigration.exe \
/cs30:"Provider=SQLOLEDB;Data Source=Commerce30servername;Initial Catalog=Commerce30DatabaseName;User ID=SA;Password=SQLpassword" \
/cs2000:"Provider=SQLOLEDB;Data Source=Commerce2000servername;Initial Catalog=MarketingSystemDatabaseName;User ID=SA;Password=SQLpassword" \
/exprstore:"Provider=SQLOLEDB;Data Source=Commerce2000servername;Initial Catalog=ExpressionStoreDatabaseName;User ID=SA;Password=SQLPassword"
Registration Tool Folder
The files in this folder constitute the source files of a tool that helps you register pipeline components for stage affinity. It allows you to register the pipeline component on the computer on which the tool is being run and it allows you to export the data to a registry script (.reg extension) for deployment to other servers.
For more information about the pipeline component registration tool, see Using the Pipeline Component Registration Tool.
VB Pipe Wizard Folder
The files in this folder constitute the source files of a tool that allows you to install a new wizard in your Microsoft Visual Basic 6.0 installation. This wizard automates the creation of Commerce Server pipeline components by creating the object definition and implementation files containing function prototypes for the interfaces required to implement a fully functional pipeline component.
In addition, this wizard creates a property page for your pipeline component. You can add controls to this property page through which users can set component properties.
You must build the Visual Basic Pipeline Component Wizard before installing it.
Once built, register the file PipelineCompWizard.dll. Registering this DLL will cause a new project item to be installed into your Visual Basic installation. Once you have registered the DLL, open Visual Basic and select New | Project. The VB Pipeline Component Wizard will be available in the list of available projects.
For more information about the Visual Basic Pipeline Component Wizard, see Creating Pipeline Components Using Visual Basic.