I agree with Doug. The photoArticle class extending the article class seems like the way to go.
On Wed, 12 Jan 2005 10:43:45 -0500, Doug Keen <[EMAIL PROTECTED]> wrote: > Can't you simply extend the Article class with a PhotoArticle class? > That seems like a nice, OO, polymorphic approach... you inherit all > the functionality of an article (including all the business logic > associated with Comments), and then create some specialized > functionality for photos. Or, you can apply the Decorator pattern, > and add a Photo decorator to the article instance. No functionality > has to be duplicated... just extended. > > Again, the manager approach seems procedural to me... extending the > functionality of the business object takes advantage of polymorphism. > > On Wed, 12 Jan 2005 15:27:24 +0000, Greg Stewart <[EMAIL PROTECTED]> wrote: > > Not to throw a spanner in the works, but since we are talking about a > > blog, what if you wanted to extend it, to be say a photo Blog. Photo > > blogs can also have comments, so by the current reasoning one would > > > > a) create a new object that handles photos similar to the articles > > object, meanwhile duplicating some functionality > > > > or > > > > b) change the way article functions to encompass photos and articles? > > > > Where as > > > > c) move it up it the chain as was discussed and let a manager object > > deal with this and having a set photo, article and comment objects > > > > To me makes more sense in this context, with a and b I would see > > myself constantly having to re-work things or add new objects to deal > > with new content types that can have comments (hence duplicating > > functionality). > > > > Usual disclaimer about possibly being way of track applies here... ;) > > > > Cheers > > Greg > > ---------------------------------------------------------- > > You are subscribed to cfcdev. To unsubscribe, send an email > > to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' > > in the message of the email. > > > > CFCDev is run by CFCZone (www.cfczone.org) and supported > > by Mindtool, Corporation (www.mindtool.com). > > > > An archive of the CFCDev list is available at > > www.mail-archive.com/[email protected] > > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email > to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' > in the message of the email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported > by Mindtool, Corporation (www.mindtool.com). > > An archive of the CFCDev list is available at > www.mail-archive.com/[email protected] > -- -------------- [EMAIL PROTECTED] http://blog.rawlinson.us I have 9 gmail invites,want one? ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
