Giacomo Pati wrote:
> This is what I have figured lately when talking with Stefano the other week. If
> you look at how many Generators we have you end up with only two important
> ones:
>
> FileGenerator
> ServerPagesGenerator
>
> All the other (DirectoryGenerator, RequestGenerator, ...) could be easily
> realized by using XSP. We have put all specific handling of various sources into
> the Source abstration. So each data source you'd like to access (file:,
> resource:, context:, cocoon:, ldap:, news:, imap:, pop:, xmldb:, etc.) could in
> fact be realized by a Source.
I'm beginning to get just a little bit confused. So far I have a couple
of Cocoon 2 applications that mostly use XSP with ESQL to query a
database. All is running well, but I don't really like the idea of
having pages that depend on the physical structure of the database.
Thus, I started exploring different alternatives and came up with the
idea of having a library of (possibly reusable) Java objects that
represent entities in the database (via EJB or some O-R mapping tool
like Castor or whatever).
The troubles come when I start thinking about how I might feed a (XML)
representation of those objects to Cocoon in order to represent them,
say on a web page. As far as I can see, these are the possible choices:
- call my objects from an XSP page, specifying element names in XSP and
use <xsp:expr>myObject.getSomeField()</xsp:expr> for the values
- like the above, but using a taglib for reusability
- write a Generator
- make my objects implement XMLizable and override toSAX
- write a Transformer
- write a Source (this I hadn't even figured until I read Giacomo's
mail)
I'm really overwhelmed by the spectrum of choices and some guidance
would really be helpful at this time :). What do you developers think?
Ugo
--
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]