Display Object Concepts

The following display objects are used in Commerce Server 2000:

AppFrameWork Object

DataFunctions Object

EuroDisplay Object

MessageManager Object

AppFrameWork Object

The AppFrameWork object is new in Commerce Server 2000, and replaces much of the functionality of the Page object, the latter of which will not be supported in future releases. The Page object must be created on every page; in contrast, the AppFrameWork object has better performance because it is created once in the Global.asa file and can be used on any page.

The majority of the methods for the AppFrameWork object have names that begin with Request. These methods apply locale-based data type conversion and data range checking to data retrieved from a browser request. There are two ways to send data from a browser to a server: Data can be appended to the request URL as a query string (for example, https://servername/mysite/default.asp?keyword=books) or it can be posted via forms. Performing these operations on user input ensures that the input data retrieved by an Active Server Pages (ASP) page can be inserted without error into the database storage for the site or passed to the Order Processing pipeline (OPP) in an OrderForm object without generating pipeline or page syntax errors.

Object Dependencies

Because the Request methods of the AppFrameWork and Page object rely on the DataFunctions object for method implementation, you must create the DataFunctions object before you create an AppFrameWork object or a Page object.

The following table shows the values returned by Request methods under different conditions.

Condition Method returns
The key/value pair is present on request and is valid. The key value returned from the URL query string or form-post variable.
The value returned is empty or Null (for example, the user did not type a value for a search key), or the value is of the wrong type. The default value (Null, or the value specified by the Default parameter).
The value returned is out of the specified range. Null.
The value returned is invalid according to the rules for the locale. Null.

DataFunctions Object

The DataFunctions object performs locale-based data type handling and value range checking on values that you submit to the database or that you pass in an OrderGroup object to the Order Processing pipeline (OPP).

The DataFunctions object is usually created in the Global.asa file. Use the Active Server Pages (ASP) Server object CreateObject method to create a DataFunctions object, as follows:

Set MSCSDataFunctions = Server.CreateObject("Commerce.DataFunctions")
' Initialize the object after instantiation
MSCSDataFunctions.Locale = dictConfig.i_SiteDefaultLocale

Also,  store the new object in the Application object in the Global.asa file, as follows:

Set Application("MSCSDataFunctions") = MSCSDataFunctions

The AppFrameWork and Page objects have a direct dependency on the DataFunctions object; the DataFunctions object must be created before an AppFrameWork object or a Page object is created.

EuroDisplay Object

The EuroDisplay object can be used to convert and format currencies. It was originally designed to handle use of the Euro currency, but it can be used for conversion between any two currencies. This object provides convenient currency conversion functionality.

MessageManager Object

The MessageManager object stores error messages in multiple languages that the Order Processing pipeline (OPP) components use to describe error conditions generated during OrderForm object processing.


All rights reserved.