1Introduction

DForms is a technology that helps in creation of web based forms. It may be difficult at first to grasp what DForms is. The following chapters provide a short description of DForms features, comparison with other presentation technologies. Let's start with what DForms does and and doesn't.

1.1What DForms offers

1.2Type of issues DForms does not solve (and will not ever)

1.3Comparing with other form technologies

Without knowledge of the other technologies, it may be difficult to understand the essence DForms. Table 1 compares DForms with other popular presentation technologies.

Table 1: Comparison with other form technologies


DForms

XForms

JSP Tags

JSF

Client-side mode

?



Server-side mode

Presentation components

Form layout


?

Decomposition


Localization

Validation

Output markup


AJAX





MVC dependencies



MC

MC2

Platform neutrality



DForms is most similar to XForms and XUL. It has, however, several advantages. In comparison with XForms, it offers components to layout other components, supports form decomposition, and, in client-side mode, “runs” on existing clients. The major “functional” difference between DForms and XUL is IE support.

1.4Quick Start

In the simplest scenario you need only text editor and browser. Unzip the distribution and open one of the descriptors from the samples directory in your browser. DForms does not require installation of any server-side component. Recommended browser is Firefox (with security.fileuri.strict_origin_policy=false in Fx3 about:config).

Source 1 displays descriptor of a very simple form.

<?xml-stylesheet type="text/xsl" href="../descriptor.xsl"?>

<d:form namespace="ns1234" d:version="1.0"

xmlns:d="http://www.dforms.org/1.0">

<d:metadata>

<d:panel display-as="dforms-p-ybox">

<d:item display-as="dforms-e-text">

<d:ref select="/message"/>

</d:item>

</d:panel>

</d:metadata>

<d:data>

<message xmlns="http://my.custom.data">Hello world!</message>

</d:data>

</d:form>

Source 1: helloWorld.xml

The descriptor is a XML file with two main sections. Metadata section describes how the resulting form should look. Data section contains marshalled data. The xml-stylesheet processing instruction at the first line is responsible for transformation into XHTML result.

Source 2 displays the result.



Source 2: Hello World output.

2Architecture

Figure 1 displays DForms architecture. DForms consist of images, JavaScripts, CSS files, and


Figure 1: DForms Architecture


XSLT stylesheets, which do the descriptor transformation. A form developer typically creates form descriptor. The descriptor is a XML file with xml-stylesheet processing instruction pointing to the “root” XSLT stylesheet. The “root” stylesheet references all other stylesheets from the library of presentation components (render kit).

The transformation of the form descriptor into output is job of XSLT Engine. DForms supports two processing modes – client, and server side. In the server side mode, the transformation is performed on the server and client gets directly the resulting XHTML. In the client side mode, the client gets form descriptor and the transformation is performed by XSLT engine of the client.

Output XHTML references CSS files, images, and JavaScripts from render kit.

2.1Processing Modes

I theory, DForms can be used with any engine with XSLT 1.0 support. In practice, XSLT engines have bugs. DForms is tested on the following XSLT Engines:

2.2Developer Roles

Figure 2 displays developer roles.

2.2.1


Figure 2: Developer roles.


Form Designer

2.2.2RenderKitter