We do stuff like this all the time. The trick is to have an underlying
metabase and use THAT to generate BOTH the Reactor and gui XMLs. If you're
an XML fan, use XSLT. Otherwise put the metadata in a db schema and write
generic scripts to generate XML based on described schema to table mapping.
That way as your XML schemas evolve you don't have to rewrite your code to
generate the XML files - just redescribe the mappings.

It's the start of very cool stuff when you start to do this. Then neither
the code nor the XML are the definitive representation of your application -
they're just transient element generated as part of the overall build
process with the underlying metabase being your definitive, DRY source of
all data.

Best Wishes,
Peter


On 12/13/06 11:38 AM, "Tom Chiverton" <[EMAIL PROTECTED]> wrote:

> On Wednesday 13 December 2006 15:32, Kevin Roche wrote:
>> I am interested in knowing what the list members think about this idea. I
>> have a suspicion that it might be the wrong thing to do but the alternative
>> would mean another XML file with almost exactly the same information in it.
> 
> Although I agree it would be useful to avoid duplication, you are mixing
> things across layers here (view and data).
> I'm not sure if this makes it a good idea or not, but it's certainly an abuse
> of an ORM to make it describe your GUI :-)
> 
> If you did want to do it though, formType isn't needed, is it ? Because the
> type information is already inside Reactor (get at-able with GetMetaData() on
> one of the TOs if nothing else) - you're view layer can translate from the
> required CF type to HTML control automagicaly.
> Does Reactor just ignore properties on field tags it doesn't understand ? It
> certainly should.
> 
> :thinks for a bit
> 
> My first thought was- "I think I'd stick it in a separate gui.xml and put up
> with the duplication. Your scaffolding can check that everything in gui.xml
> matches up with something in reactor.xml".
> Just gone back and added the bit about Reactor ignoring field tag attributes -
> assuming it does, why not keep your GUI meta data  with your DB meta data ?
> It's an XML file that happens to spit out Reactor stuff when used in one
> place and scaffolding when used in another - that sounds fairly cool too me
> if you are thinking of auto generating master/detail (etc) type drildown
> Fuseboxen (is that the right plural ?).
> 
> In that vain, it's not an abuse, it's reuse :-)
> To hell with mixing view and data layers - the definition of meta data is that
> it crosses over.





-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to