Re: [morph-developer] recent changes
Brought to you by:
orangeherbert,
sgarlatm
|
From: Matt B. <gud...@ya...> - 2007-01-15 15:53:35
|
I'm replying to myself! :| --- Matt Benson <gud...@ya...> wrote: > Responses inline: > > --- Matt Sgarlata > <Mat...@wh...> wrote: > > Regarding the MultipleDestinationConverter, the > > final call in the class > > was probably supposed to be > > getContainerConverter().convert(destinationClass, > > *destinationObjects*, > > locale); I went ahead and made this change. This > > class was created > > because someone was challenging me that my > > interfaces only allowed 1 -> > > 1 object conversions as opposed to also allowing > one > > object to be broken > > into several smaller object or several smaller > > objects to be combined > > into 1 larger object. The idea here would be you > > had something like, > > say, a Person that you wanted to be converted into > a > > collection of > > smaller objects like PoliticalViews, BankAccount, > > Cars. Those 3 smaller > > objects would have to be returned as some type of > > collection, say as a > > List or an array of Object[]s. That was what the > > final call to > > getContainerConverter() was for. Really this is > > more of a hypothetical > > class to show that this type of thing was possible > > to my friend I was > > hoping would get involved in the project (didn't > > work). I don't > > anticipate anyone would actually use this class, > and > > I probably haven't > > even looked at it since the date it was first > > written. Perhaps we > > should just delete it? > > > No, I think it has a place. There's some Fowlerism > like "Assembly Pattern" or something that this > should > be an example of... Dozer explicitly mentions it in > their manual, so you're probably best off keeping it > for competitive reasons. We should just try to > document it better and provide examples. > Looked it up; it was an "Assembler" concept: http://www.martinfowler.com/eaaCatalog/dataTransferObject.html I still think we should support this. But since the class is in the copiers package, maybe we should rename it DisassemblerCopier or something? Then we can complement it with an AssemblerCopier that copies multiple source objects onto a single destination object... tell you what, if you don't like it, let me know. :) > Does this mean CombiningCopier was meant as the > opposite of MultipleDestinationConverter? > Ignore that question: I wasn't looking at anything, and just remembered the classname. ;) That would be the AssemblerCopier I mentioned above. Anyway, I have decided on this and Ben's issue that we really are in a stage where we're not that concerned with backwards compatibility where we think there's minimal impact, or that we are making a worthy change. This is because Morph's status in sf is still listed as "Beta." Some projects (e.g. iText) don't give a rat's ass about BC, anyway. :) -Matt ____________________________________________________________________________________ Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/features_spam.html |