You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stefan Wallner <st...@yahoo.com> on 2005/02/09 19:42:02 UTC

"Can this be done with Cocoon" question / database related

Hello,
I am hoping some of you can help answer my "can this
be done with Coccon" questions. I admit that these are
not very specific questions and may be difficult to
answer without more details, but any input/pointers
are welcome and I can always try to clarify things.
Details are below, thanks in advance! 

Stefan

---
The basics:
For some sort of tracking system I want the user
and/or (just as important) another piece of software
to be able to create summaries with multiple linked
detail entries, e.g.

- Summary 1: "Cocoon"
    * Detail 1: Checked out cocoon.apache.org
    * Detail 2: Posted to mailing list
    * Detail 3: Received feedback 
    * ...

- Summary 2:
    * bla bla



Summaries and details of course might have various
extra input/data fields.

---
What little I understand so far, high, high-level:
- Input
1) I create XML/XSLT files that define the input pages
for the user (web-based for now only), e.g. for a
summary input page and a detail input page
2) I set up the appropriate pipelines, mappings, etc.
that process these XML/XSLT files and store them
"somewhere"

- Output:
Pretty much the same thing, I assume.

---
What I would like to understand:
1) Data storage: Can the user input be stored in XML
files exclusively or do I need a database (SQL)? Which
tranformer (?) do I include in the pipeline to store
the data provided by the user?

2a) If I need to use SQL: Can the database schema be
created by Cocoon automatically for me and adapt to
changes in the definition of e.g. a detail (wishful
thinking)

2b) If I can use XML files: How can I link summaries
with their detailed entries?

3) For both - what are my search possiblities, e.g.
can I search by a date range and a certain title
keyword?

4) How would another software client connect to cocoon
to e.g. create a new issue?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: "Can this be done with Cocoon" question / database related

Posted by Adam Ratcliffe <ad...@prema.co.nz>.
Hi Stefan

Yes Cocoon can do these things, it's both flexible and extensible.

> What little I understand so far, high, high-level:
> - Input
> 1) I create XML/XSLT files that define the input pages
> for the user (web-based for now only), e.g. for a
> summary input page and a detail input page

Take a look at cforms, Cocoon's form framework, the forms can be generated from
form definitions you author. Cforms also takes care of validation and
data-binding.

> 2) I set up the appropriate pipelines, mappings, etc.
> that process these XML/XSLT files and store them
> "somewhere"

Yup

> What I would like to understand:
> 1) Data storage: Can the user input be stored in XML
> files exclusively or do I need a database (SQL)? Which
> tranformer (?) do I include in the pipeline to store
> the data provided by the user?

You could write the data to the filesystem but sooner or later you'll probably
want to put it in a database.

Generally you would extract user data in Cocoons 'flow' layer and process this
in business objects that access the database etc. There are some articles on the
Cocoon wiki, http://wiki.apache.org/cocoon/, that describe how to use OR mapping
frameworks with Cocoon for persistence.

Flow is described on the Cocoon website
http://cocoon.apache.org/2.1/userdocs/flow/index.html and demonstrated in the
Cocoon samples.

>
> 2a) If I need to use SQL: Can the database schema be
> created by Cocoon automatically for me and adapt to
> changes in the definition of e.g. a detail (wishful
> thinking)

If using Hibernate it can generate the DDL to create your schema from the
mapping files you write. Hibernate also provides a  schema update tool for
synchronizing the database schema with your persistent objects as you evolve
them.

>
> 2b) If I can use XML files: How can I link summaries
> with their detailed entries?
>
> 3) For both - what are my search possiblities, e.g.
> can I search by a date range and a certain title
> keyword?

I haven't needed to provide search capability in my Cocoon apps however there is
a Lucene 'block' in Cocoon's samples that demonstrates this kind of
functionality.

>
> 4) How would another software client connect to cocoon
> to e.g. create a new issue?

Cocoon supports SOAP services through Axis or you could define a REST-style
interface to do this.

If you haven't done so already I'd recommend downloading and installing Cocoon
and taking a look at the samples that come with the distribution, this will give
you a good idea of the possibilities it offers.

Cheers
Adam


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org