On Tue, Jul 8, 2008 at 11:26 AM, Bryce Ewing <[EMAIL PROTECTED]> wrote:

> ...for this one it would be good to be able to
> change the resource type between stages as well (maybe using ordered child
> nodes to store the information rather than a multivalue property) e.g.
>   {
>       "pdf.pipeline" : {
>           "generatefo": {
>               "outputFormat":"xml",
>               "resourceType":"bar"
>           },
>           "serialize": {
>               "outputFormat":"pdf"
>           }
>       }
>   }
> would run /apps/foo/xml.ftl then /apps/bar/pdf.ftl (for example).

That looks nice but this is also easy to express with a pipeline
scripting language, for example:

  generate (outputFormat: xml, resourceType: bar)
  serialize (outputFormat: pdf)

And I think it's more inline with what we're doing currently -
pipelines would then be just another script engine, which IMHO makes
sense: like a script, a pipeline taks the current Resource as input,
processes it according to a specific execution language, and writes
the result to the client.

But the killer advantage of scripts vs. node structures, when it comes
to programming (and pipelines *are* programming in my opinion) is the
ease of editing: with scripts you need no tools other than curl or a
WebDAV client to work with Sling, whereas node types are much more
painful to edit, even with a good JCR explorer.

> ...More wondering what the thoughts are on the general idea of using the nodes
> in jcr rather than a scripting language for this purpose?...

Let's see what others think!

-Bertrand

Reply via email to