We're also using a two-tiered front end, with a restlet REST layer available 
externally through the servlet adapter, and an HTML presentation layer done 
with FreeMarker, which by design limits the amount of computation that can be 
done, thus encouraging better design of the REST layer.  

The glue for these two layers is done with a simple but custom XML format, one 
of whose components is an XML data pipeline based on existing work, but lately 
we've begun to look at XProc as a source of ideas.  XQL is used to transform 
data in most cases, though XSLT is available.

For our pages which don't use XForms, we use FreeMarker libraries to generate 
canonical XHTML form controls, and then a Java adapter which produces a flat 
(or depth two, in the case of repeated data) XML representation of names and 
values; most of our pipelines then use the restlet parameter expression 
language to transform the data into a URI for a REST GET or DELETE or use XQL 
to transform into XML data for a POST or PUT, whose results then populate the 
incoming data model for the resulting FreeMarker page, whose URI is also 
specified by the custom XML configuration file.  

In this way, both the REST layer operations and their definitions and the 
presentation layer are kept mostly free of the syntax restrictions of the data 
formats for HTML forms.

Leigh.

-----Original Message-----
From: John D. Mitchell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 08, 2008 8:51 AM
To: discuss@restlet.tigris.org
Subject: Re: XForm integration with the RestLet framework possible?

On Tuesday 2008.07.08, at 24:29 , Rémi Dewitte wrote:
[...]
> I don't know very well about OPS. I just like to let you know that I 
> have been able to integrate successfully (so far) Saxon and Restlet.
> I might publish it as an extension.
> Basically, Restlet does the handling of requests delegating processing 
> to xqueries. All the application logic and presentation logic is 
> written with xquery.

I'm done similarly with Mark Logic Server (MLS) (http://
marklogic.com/) as the backend in a couple of ways:
* Front-end handles networking, etc. and then uses HTTP to talk to MLS.
* Front-end handles networking, etc. and then talks to MLS via a custom 
protocol (akin to JDBC).

The first approach is great for basics while the second allows for all sorts of 
sophisticated interactions.

You can see this in action at http://markmail.org/

Hope this helps,
John

Reply via email to