Data Manipulation in Business Desk

Commerce Server Business Desk is a data-driven application that serves as a management interface for data-driven Web sites. It provides an easy to use mechanism for examining and modifying the various items of data displayed as the content of the Web site pages viewed by Web site users. This data is usually stored in Microsoft SQL Server 2000 databases and the Active Directory directory, though it is possible for the data to exist in other types of databases.

Another important aspect of Business Desk is its reliance on Dynamic HTML (DHTML) and HTML Components (HTCs). These technologies allow for more interactivity within the Web browser itself than has been typical of Web applications, dramatically reducing the number of server roundtrips required to manipulate data in powerful ways. The data to be manipulated is delivered to the Web browser within the page itself; it is passed to the Web browser in a form known as an XML data-island.

An XML data-island is a well-formed segment of XML contained within an xml element and identified by the value associated with the id attribute of that element. The data itself is represented within the XML structure. The structure of the XML is limited only by the rules of XML syntax and the conventions adopted by the script code that is designed to access it. The data is accessed using the normal mechanisms of the Document Object Model (DOM). Such access occurs within the various HTCs that are part of the Business Desk Framework, and can also occur in client-side script on the Web page itself.

The purpose of this section is to describe the typical mechanisms employed by various Business Desk modules to allow Business Desk users to alter the Web site while minimizing the server roundtrips often associated with poor performance in Web applications. The basic steps required to provide this functionality are:

  1. ASP code on a Business Desk module Web page retrieves the data from the database, typically using Active Data Objects (ADO).

  2. ASP code on the page converts a Recordset object returned by ADO into an XML data-island using one of several framework routines.

  3. Microsoft Internet Explorer 5.5 downloads the page, which now contains the XML data-islands and elements with styles linking them to the corresponding HTCs. All the edit type HTCs with the exception of the ExpressionBuilder, ListEditor and DynamicTable include form elements that will automatically be posted with an enclosing form.

  4. The HTCs execute within Internet Explorer 5.5, using the included XML data-islands as the source of configuration information and the data to be displayed.

  5. The user makes changes to the data, eventually requesting that those changes be saved.

  6. The changes are posted back to a Business Desk module Web page using an HTML form. This page converts the posted changes into the appropriate ADO Recordset object format, and then uses ADO to update the database with those changes.

The remainder of this section consists of topics discussing each of these main aspects of data manipulation.

This section contains:

  • XML Data-Islands. Describes how XML data-islands on the ASP pages are used to pass data to the HTCs, and specifically describes the different ways in which XML data-islands can be created.

  • Data versus Meta-data. Describes the difference between data and meta-data in the context of Business Desk, and particularly in the context of the HTCs provided by the Business Desk Framework.

  • Retrieving Data. Describes typical mechanisms for accessing databases from server-side script.

  • Getting Data to the Client. Describes how the Recordset objects returned by ADO are converted to XML data-islands on the page being downloaded to the Web browser.

  • XML Data Merging. Describes how some XML data-islands can be merged for use in the more complex forms of the ListSheet HTC.

  • XMLHTTP Operations and Fetch Pages. Describes special mechanisms used by the ListSheet and TreeView HTCs for retrieving new data from the server without needing to be reloaded in the browser.

  • Data Validation. Describes the data validation techniques employed within both client-side and server-side scripts.

  • Saving Changes to Data. Describes how the data representing modified records is returned to the server and persisted back to the databases from which it originated.


All rights reserved.