Sure!

On 6/14/05, Antonio Gallardo <[EMAIL PROTECTED]> wrote:
> Hi Maksim,
> 
> can you repost the proposal.html? See below what I got.
> 
> Best Regards,
> 
> Antonio Gallardo
>

CForms - XUL front-end project proposal

Problem overview

Cocoon CForms is a framework providing easy form-handling. It defines platform-independent form model and platform-dependent form template which are then rendered to target platform representation. Target platform can be any GUI toolkit. Currently only HTML is supported, some other platforms are in progress.

Mozilla XUL is XML-based powerful GUI toolkit running under Gecko Runtime (also there are other engines). It provides easy building of rich clients. XUL contains many predefined widgets as well as support for user-defined ones. The most prominent examples are Mozilla suite, FireFox and Thunderbird. XUL applications are completely cross-platform. The development of XUL-based applications is very similar to HTML, because both languages use DOM and _javascript_ for user interaction.

Adding XUL front-end to CForms will make it possible to build more interactive applications with Cocoon. Also this will help Cocoon community to get in touch with Mozilla community. These two facts will no doubt make Cocoon more popular.

Solution

Provide XUL rendering for CForms using existing CForms model by adding appropriate transformations, mostly XSL style sheets. The new XUL interface will interact with the CForms server model at least as well than current HTML implementation.

Implementation details

CForms framework currently provides sophisticated HTML support, XUL is similar to HTML, so CForms-XUL implementation is also similar. It does not affect server model, and deals mostly with Transformers.

The communication model is different from HTML approach. A HTML page is always (with exception to XMLHttpRequest) submitted to server, and then a new instance of page is returned to user. With XUL such behavior may look quite weird � when a program window closes, and then opens back again. So there should be another, AJAX-like approach.

When user first requests a page � initial rendering is performed in HTML-like way, except for XSLT, which will be rewritten anew to perform FD to XUL transformation, like <fd:field/> to <textbox/>, controls are populated with initial values.

When user requests some action, results of which should be displayed in the same form, data from the form is sent to the server, then form receives response and repopulates controls� values. This is done with RDF (Resource Description Framework, also a part of XUL) and involves an amount of _javascript_ code (the main scripting language in XUL) to pick appropriate values from server response, and to identify whether it is the same window, or a new one.

GUI pipeline

The pipeline remains the same as in HTML case (see http://cocoon.apache.org/2.1/userdocs/forms/index.html), except for the following.

  • The Form Template is a XUL file, forms tags are placed exactly the same way as in HTML.
  • The Template and I18n Transformers are most likely unaffected, because data they process is not related to any platform. Also Binding and Validation remain the same.
  • To perform final rendering, completely new XSL style sheets will be written. They will provide flexible transformation and styling, like forms-*-styling.xsl.
  • Output is serialized with regular XML serializer.
  • Data pipeline

    This one will deal only with bare data returned to the existing form by the server. It will share the data model with GUI pipeline, but will have another template transformer to produce form data without any unnecessary UI information. A regular XML serializer will be used.

    Reply via email to