On 8/21/05, robert burrell donkin <[EMAIL PROTECTED]> wrote: > On 8/19/05, Dennis Sosnoski <[EMAIL PROTECTED]> wrote: > > Dan Diephouse wrote:
<snip> > > > How do we map between them, even when there is very little correlation > > > betwen java and schema. Each one is pretty important I think. > > > > > > I see something a bit different then Dennis. (now where is my virtual > > > white board....) On the left pane I would see a structural > > > representation of the schema portions. In the middle is a place to > > > apply "actions" to a chunk of schema. On the right I would see a list > > > of actions. Actions would be "create object," "set property," or even > > > "run this piece of java code (via janino, groovy or the like)". > > +1 > > definitely a fourth generation feature :) > > this is similar to the achitecture used by the second (refactored) > betwixt engine. i suspect that JIBX also uses something similar > (though probably uses different terms). with beans, you reach a stage > where scripting becomes important. (betwixt doesn't do any of that but > the structure's there.) the problem is that for this to be useful > requires good tools. > > i didn't see the connection before but this needs to be a core > feature. IMHO this power would need to be pluggable so that a useful > core toolset (probably bean and field centric if we start from what > JIBX and betwixt have now) could be created quickly. > > > > Say I have a schema like so: > > > <xsd:complexType name="book"> > > > <xsd:sequence> > > > <xsd:element name="author" type="xsd:string"/> > > > <xsd:element name="title" type="xsd:string"/> > > > </xsd:sequence> > > > </xsd:complexType> > > > > > > I'd see this on the left (with the option to view the schema source) > > > + book > > > |- author > > > |- title > > > > > > When I selected book I would see the middle pane pop up with different > > > events like "on start of tag", "on end of tag", or on body. I'd be > > > able to drag in different actions from the right to certain events and > > > customize them. So on book I'd drag in "create object" and specify the > > > "Book" object. On the author element I'd want to do a set property. It > > > would also be intelligent enough create a mapping for a POJO > > > automatically if it can. > > > > I like that idea a lot! > > +1 interesting idea: start-from-schema but reusing start-from-java binding tools. we'd still want the kind of classic start-from-java builder outlined by dennis, though. one of the wrinkles is being able to recreate complex object graphs. the value to set on the property needs to wired up somehow. be harder to guess well than the start-from-java case, though. due to the complexity of the possible constructions available to schema writers, probably the user would need to specify most of the mappings manually. - robert
