다음을 통해 공유


Key Development Tasks

As a Commerce Server 2009 developer, there are a wide variety of development tasks in which you may participate. Generally, these tasks revolve around the overall goal of creating a ASP Web application that is engaged in some form of commerce, but need not be directly related to implementing the Web site with which your customers interact. This topic summarizes the various tasks that Commerce Server 2009 developer may undertake.

Building Commerce Server Web Applications

The core purpose of Commerce Server 2009 is to facilitate the creation of a certain category of Web application based on ASP.NET and running on top of Internet Information Services (IIS). Web applications in this category share certain features related to commerce. There are generally a large number of products of some type offered for sale, and the Web site provides a way to find those products within a product catalog. Users of the Web application are generally able create a collection, or shopping basket, of products that interest them, and to eventually complete the purchase of those products online.

Web applications such as these share many similar features, and yet they are unique. With regard to the features that are common to such Web applications, using Commerce Server 2009 to supply these features can greatly decrease your development time. The ways in which such Web applications are unique is left to Web developers like you, who are in a position to craft a Web application that satisfies the unique requirements of your business.

Customizing Commerce Server Business Logic

Commerce Server 2009 provides a wide variety of business logic and infrastructure that is generally common to commercial Web applications. For example, product catalogs, orders and checkout processing, marketing infrastructure, and so on. However, within these common features, you are likely to find yourself needing to customize the particular aspects of the features to suit your individual business needs. Such customizations fall into several categories, as follows.

Customizing Business Logic with Pipelines

Commerce Server 2009 uses a framework known as a "pipeline" to implement a variety of sequential processing tasks. For example, when a user decides to check out and complete a purchase, an order processing pipeline is used to complete a series of calculations that include the application of any relevant discounts, sub-totaling the order, adding the cost of tax and shipping, and so on. The pipeline framework is extensible in several ways, as summarized here.

For more information, see Developing with Core Systems Pipelines.

Modifying PCF File Configuration

Pipeline components are the objects that perform individual pieces of work within pipelines and pipeline objects are used to execute the series of pipeline components at run-time. Pipeline configuration files, with the extension .pcf, are what tie these two types of objects together by persisting the information about the stages in each pipeline and the pipeline components that are configured to run within those stages. You create and modify PCF files by using the Pipeline Editor, which provides a graphical representation of the stages and components that together define an individual pipeline. Editing pipelines is fundamental to creating a Web application with Commerce Server 2009 and will almost always be one of the required development tasks involved in creating such an application.

For more information, see Using the Pipeline Editor.

Developing Custom Pipeline Components

There may be circumstances in which the various pipeline components provided with Commerce Server 2009 do not perform one or more pipeline tasks your Web application requires, or do not perform those tasks in quite the manner that your Web application requires. When this occurs, you can develop a custom pipeline component that is designed specifically to meet your needs. Every pipeline component is required to support the IPipelineComponent interface, which allows it to be executed by a pipeline object. There are a number of other interfaces that are ultimately optional, but recommended, primarily so that your pipeline component can integrate smoothly into the Pipeline Editor.

For more information, see Building Pipeline Components and Pipeline Component Reference.

Integrating Third Party Payment Systems

Some pipeline components provide such specialized services that their development is better left to companies other than Microsoft that focus on those areas, credit card processing being a primary example. Several third party companies have developed pipeline components for Commerce Server 2009. You can acquire these components directly from these companies and use them in your pipeline development.

For more information, see https://go.microsoft.com/fwlink/?LinkId=65726.

Extending the Orders System Object Model

If you find that you need to extend the functionality of the Orders System, you can either derive a new class from an Orders class or you can add a new property to an Orders class by using the weakly-typed property indexer that each Orders class provides. Each method has its own advantages and disadvantages that you can evaluate with regard to your particular needs.

For more information, see Extending the Orders System.

Customizing the Other Commerce Server Core Systems

Unlike the Orders System, the other core systems within Commerce Server 2009, such as the Catalog System, the Inventory System, the Marketing System, and so on, cannot be extended through inheritance. Instead, in order to extend these core systems, you must use a technique known as "containment" or "building a facade".

For more information about extending these other Commerce Server 2009 systems, see the individual development sections for each of those systems:

Extending Web Services

All of the Commerce Server 2009 Web service objects use virtual methods so that their behavior can be overridden. If you consider that the various business management applications such as the Catalog Manager and the Marketing Manager, as well as the BizTalk adapters, communicate with Commerce Server 2009 through the Web services, customizing the Web services by deriving new Web service objects from them provides a comprehensive way to splice new functionality into existing aspects of Commerce Server 2009. You can build your own class that inherits from a Commerce Server 2009 Web service class and then change the .ASMX file for the Web service to reference your class.

One example of how this type of customization could be useful is replacing Authorization Manager authorization with a custom authorization scheme. First, you would need to disable authorization in the Web.config file for the Web service(s) you are modifying. Next, you would create a class that inherits from the corresponding Web service class for each Web service that you are modifying. Finally, you would implement a version of each method in each class that performs the custom authorization functionality and then calls its base class method to perform the remainder of the work.

Another example would be to add auditing to one or more Commerce Service Web services. In this case you would leave Authorization Manager authorization intact and then add the auditing functionality to each of the derived methods along with the a call to its base class method.

You can also add new methods to the Commerce Server 2009 Web services to enable new functionality.

For more information about the Commerce Server 2009 Web service classes, see the individual reference sections for each of those classes:

Integrating with Other Applications Using the BizTalk Adapters

One of the features in Commerce Server 2009 is the set of BizTalk adapters that you can use in conjunction with BizTalk Server 2006, and ultimately with another application beyond BizTalk Server. These other applications are typically line-of-business (LOB) applications such as a warehouse application (interacting, say, with the Inventory System) or a customer relationship management (CRM) application (interacting with the Profiles System).

The following four types of adapters are provided, which can be used to get data out of and into the corresponding Commerce Server 2009 system:

  • Orders adapter

  • Catalog adapter

  • Inventory adapter

  • Profiles adapter

Each of these adapters comprises two distinct types of functionality, known as a receive adapter and a send adapter. Receive adapters are used to export data from a Commerce Server 2009 system on a scheduled basis, and send adapters are used to import data into and query data from a Commerce Server 2009 system on an ad hoc basis, presumably driven by another application that is using BizTalk Server to communicate with Commerce Server 2009.

For more information, see Developing with the BizTalk Adapters.

Other Development Tasks

There are a number of other ways in which you can use the Commerce Server 2009s, derive new classes from Commerce Server 2009 classes, and otherwise extend the functionality of Commerce Server 2009. These include:

  • The various APIs provided by the different Commerce Server 2009 systems, including the Web service and agent APIs, provide open ended possibilities for creating custom tools and applications for manipulating Commerce Server 2009 data. For example, you could create a tool to perform bulk imports of catalog data.

  • These same APIs can be used to develop tools or applications that automate administrative tasks. For example, you could create a tool to assist with the process of staging your Web applications or that use the Admin objects to read and potentially change values in the Commerce Server 2009 Administration database.

  • How data is stored in the Data Warehouse has not changed with this version of Commerce Server 2009, nor have the ways in which you can customize the data imported into and stored by the Data Warehouse. On the other hand, reporting has changed significantly since the previous version of Commerce Server 2009 and is now provided directly by SQL Reporting Services, which provides numerous ways in which existing reports can be modified and new reports can be created.

  • You can use the Commerce Server 2009 Partner SDK to customize the business management applications, such as the Customer and Orders Manager, that are provided with Commerce Server 2009. If you work for a partner company, you might do this in order to redistribute the customized applications to your customers. On the other hand, if you are using Commerce Server 2009 to develop your own commercial Web application, you might use the Partner SDK to customize one or more of the business management applications to better suit the needs of your organization.

See Also

Other Resources

Before You Start Developing with Commerce Server