Aside from that being a really long message, it's also a reasonable idea, with one caveat. You shouldn't be rendering a UI-specific display (i.e. HTML), but rather a UI-neutral display (such as XML). Then you can use that XML to create your UI-specific display as needed. So your methods will return XML that you run through an XSL stylesheet to transform it to your HTML (or MXML, or WAP, or whatever).
cheers, barneyb On 6/20/05, Joe Ferraro <[EMAIL PROTECTED]> wrote: > > > > I was looking over the book on Holub on Patterns and I hit a section that > dealt with adding UI information within an object. I thought that this might > be a good idea for creating objects which contain data and can render a form > which allows that data to be viewed a traversed. An example of this would be > a productDisplay object. I've created an object which accepts parameters for > doing a search against our inventory system and has a method for generating > UI to display the data. The benefits I find in this are that the > productDisplay can exist in sort of a container for data and all the logic > in handling that data can be contained within allowing a page designer to > develop around this object without fearing manipulating or breaking to > productDisplay. The other benefit for this is that if the productDisplay > needed to show up on more than one view page I could do so without having to > worry about changing each page if the display itself needed to change. > > > > Here is some sample code from the site. It won't work standalone but it will > give you a good idea what I'm talking about. What are your thoughts on this? > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
