incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Kiessler <oliver.kiess...@gmail.com>
Subject Re: [jira] Updated: (GRFT-34) An initial code base for the mapping project.
Date Sat, 16 Jul 2005 18:00:17 GMT
hi,

> first of all thank you for the valuable feedback.
> What is the general feeling about this initial version?
> Are we heading in the right direction?

I think the initial version is a little too complex. I would prefer a
much simpler initial solution as christophe stated (simplified xml
mapping syntax).

I'd prefer something like this (it's just pseudo xml...):

<class name="my.app.Test" jcrNodeType="graffito:Test">
    <property name="myStringProperty" />
    <property name="myComplexObject"
jcrChildNodeType="graffito:myComplexObject" ... />
</class>

<class name="my.app.MyComplexObject" jcrNodeType="graffito:myComplexObject">
    <property name="myIntValue" jcrPropertyType="jcr:long" ... />

....

</class>

java class => jcr node
java class property (primitive and String) => jcr property
java class complex property (bean) => jcr child node with jcr properties
java class array property (primitive and String) => jcr multivalued property
java class array property (bean) => jcr child node with n jcr child nodes
java class collection property (bean) => jcr child node with n jcr child nodes

I think we should go for an "convention over configuration" approach.
Why specify that a java class property of type String maps to a jcr
string property (we can use reflection to find out property
types....)? You know what I mean? One should only add this information
if it's break the convention.

> If nobody completely disagrees with it, I would try to get a solution
> for the JAXB
> issue on the basis of a general consensus.

-1 for JAXB

+1 for Commons-beanutils or XmlBeans (they have just released a new version 2.0)

> If that is finished I would like to integrate the suggestions in the
> code base
> and commit it in a new branch.

+1

regards,
oliver

Mime
View raw message