This article discusses Web Storage System Forms, focusing on the renderer, which is implemented as an ISAPI extension for Internet Information Server. This article looks at how to build Web-based applications using the rendering capabilities of Web Storage System Forms.
Introduction
With Microsoft Exchange 2000 and the release of Microsoft SharePoint Portal Server 2001 (formerly code-named "Tahoe"), Microsoft introduces the Web Storage System (WSS), which provides a new collaborative platform for Web-based development. The WSS can store all kinds of documents and data. It combines the aspects of a file system, database, and a Web server. Similar to the Windows file system, the WSS stores items in hierarchical folders. As a database, it responds to queries and supports standard data access. Finally, like a Web server, it furnishes a user interface in HTML via the standard Web protocols.
To make it easier to develop a user interface, the Web Storage System introduces Web Storage System Forms (WSS Forms), which provides a way to extend either existing or new Web-based forms. WSS Forms utilizes the WSS Forms Registry, which in turn provides custom-built applications with the ability to handle the rendering of an item or folder referenced in an HTTP request. This is accomplished through registration items.
Registration items connect form and view information with data stored in the Web Storage System. Registration items contain several properties (such as browser types, localization information, and version information) that help determine what HTML is returned to the client. A developer can add registration items that both override the default forms and handle custom data types defined in the WSS. For more information on the WSS Forms Registry, see the WSS Platform SDK (http://msdn.microsoft.com/wss).
When a client requests a piece of data from the WSS, it performs a search for a matching form registration. If a match is found, the WSS responds according to the properties of the registration entry. At this point it can either use the forms renderer, which takes an HTML page and data binds it, or can execute an Active Server Page (ASP). In the case of an ASP page, the functionality of the forms renderer can be accessed through a scriptable object model (WSS.Form). HTML forms are simple and easy to author. While ASP forms require writing code, they can also be more flexible. In this article, we'll look further into the renderer and creating HTML forms.
Requirements
Exchange 2000
While the release version of Exchange 2000 includes the WSS Forms Registry, it does not have support for the WSS forms renderer. The renderer technology is provided as an add-on to Exchange through the Exchange 2000 Technology Preview (http://msdn.microsoft.com/wss). The final release will be included in Exchange 2000 Service Pack 1. As with all prerelease code, we recommend that you not install the technology preview on a production Exchange Server.
SharePoint Portal Server
SharePoint Portal Server 2001 uses the same Web Storage System technology as Exchange 2000. SharePoint Portal Server supports both the WSS Forms Registry and WSS Forms. The examples provided apply both to Exchange 2000 and SharePoint Portal Server.
ISAPI Renderer Overview
With the Web Storage System, item data is separated from the user interface. This is somewhat different from the way in which data was bound in Exchange 5.5, where a piece of data was defined by a specific Outlook form. The WSS forms renderer provides an easy method of performing data binding (the process of connecting data in the store with HTML through the use of the WSS Forms Registry). Additionally, the renderer provides a method of creating and updating objects as well as the rendering of server-side views.
Renderer Execution and Architecture
To take advantage of the ISAPI renderer, the developer must use the WSS Forms Registry. An application programmer simply needs to create a form registration with the execute URL entry set to /exchweb/bin/exwform.dll. This is the relative path to the ISAPI DLL.
When a client requests an item stored in the Web Storage System, WSS searches the Forms Registry for a matching form registration item. When a match is found, it transfers the HTTP request to exwform.dll and provides it with a different query string containing the contents of the registration fields (FormUrl, DataUrl, RegUrl, ExecuteParameters, and Web Storage System FormsBrowserFlags). The renderer then begins to process the form.
When the ISAPI renderer instantiates, it uses the Web Storage System's OLE DB provider (ExOLEDB.Datasource) to read the HTML form specified in the FormUrl field, parsing the HTML for special tags and generating a list of all data bound fields. Next, the renderer makes a request for the required properties against the data item specified in the DataUrl. The DataUrl field contains the specific URL path to the item in the store being requested.
The values retrieved go through any necessary conversion need for display, such as formatting for numbers or time zone conversions. The retrieved values are then inserted into the HTML form according to the element to which each is data bound. In some cases, a value is inserted into a property on the element or it may be inserted after the element start tag. Table 1 describes the values used for various HTML elements.
Table 1. HTML element values
Element Rendering Information
Input Description: Use their value attribute set
HTML:
Rendered:
Select Description: Selects the option with a value matching the property value.
HTML:
Rendered:
Anchors Description: Use to set the anchor href attribute
HTML:
Rendered:
Img Description: Use to set the image src attribute
HTML:
Rendered:
SPAN Description: Use to set the text inside the span tag
HTML:
Rendered: PropValue
DIV Description: Use to set the text inside the div tag
HTML:
Web Storage System Forms: The Renderer
Rendered: and
The first relevant part of this form is the
PropValue
Depending on the form requirements, some additional requests are issued against the WSS. For views, the renderer performs a search for the set of properties in a folder needed to populate the view, and then generates an HTML table for the rendering. The type of view generated can vary according to the Web browser the client uses. Internet Information Server (IIS) inspects the HTTP useragent header and the browsecap.ini file to determine the client browser being used. The browsecap.ini file contains settings for the different browsers and versions. Within it, any browser with a setting of WebFormsBrowserFlags=NoViewRender won't be rendered on the server. By default, this flag is set for Microsoft Internet Explorer (IE) 5.0 and later, and Microsoft Outlook 10. The renderer also supports dynamically populating a select control based on items in a specified folder.
The renderer performs some additional processing on special elements, such as the
0 comments
Hide comments