This has turned into a really interesting post. My use cases are completely different but Kevan your design solution is making light bulbs flicker in my head :-)
I tend to keep throwing composition and Strategy patterns at things which is usually ok (even near to perfect sometimes) and much better than getting nailed into an inheritance hierarchy but there's so many patterns I'm not 'seeing' yet that address certain situations better than the ones I'm comfortable with. Yours is a classic example! Thanks Alan ________________________________________ From: [email protected] [EMAIL PROTECTED] On Behalf Of Kevan Stannard [EMAIL PROTECTED] Sent: 10 May 2008 23:19 To: [email protected] Subject: [CFCDEV] Re: Appropriate Use of Parent Object If you implement individual message components, you would probably wind up with some common code in each – this should be moved to a base CiscoIPPhoneMessage component rather than use an interface. Regards Kevan ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Kevan Stannard Sent: Sunday, 11 May 2008 7:01 AM To: [email protected] Subject: [CFCDEV] Re: Appropriate Use of Parent Object Hi Mike Yes, you would just call getMessageXML() and the builder would return the complete XML message. The XML tags would be output in the same sequence that they were added. If you introduce message specific components, they would be used to ensure the set of added tags were valid for that message. Specifically, a message specific component would also have a function getMessageXML() which would first validate that a title and the correct set of tags were added, then it would call the builder’s getMessageXML() and return it’s result. Also, if the message specific components were created, they would not be child components of the builder – they would be standalone components (if you are on CF8 they could all implement an interface – cfinterface). Regards Kevan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
