cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject Re: Producers
Date Mon, 06 Dec 1999 22:06:49 GMT
> > I find Processors much more useful. A processor creates an XML document,
> > currently in the form of a DOM object, in response to an HTTP request
> > _and_ an XML document. That is to say, it takes in an XML document, and
> > returns an XML document (possibly the same one that came in with some
> > modifications). Only _one_ producer can act on a request but multiple
> > processors can act. Also, producers in general must be configured through
> > HTTP parameters, while processors can use the HTTP parameters _and_
> > the input XML document for configuration purposes.
> So why would you ever use producers instead of processors?

Because you have to have _some_ method of creating an XML document
initially, right? FileProducer works for most instances, but some people
want their initial XML file to come from a remote server (URLProducer),
some people want their initial XML file to come from a SQL query
(DatabaseProducer, though I still think this is better handled by
SQLProcessor ;)), some people want to have a more configurable mapping of
request->file than is offered by FileProducer (MapProducer), etc.

Gee... a more configurable mapping... that reminds me of the SiteMap that
we've been discussing. Stefano, are we ever going to get a critique of my
naive suggestion?

> > Take a look at the SQLProcessor code. It doesn't suck too badly and it's
> > fairly coherent. I've also got a MapProducer that uses a site map file to
> > determine which XML to read initially instead of using the standard
> > FileProducer mapping if you really want a Producer code example to play
> > with.
> Thanks.  I'm sure there will be more questions to come... i'll do work in
> return, though, i promise ;-)

Woohoo! Which parts of Turbine have you been working with? I might like to
flip my automagic SQL database editor code past you.

- donald

View raw message