I'd be more inclined to go with your suggestion Brian. 

I have pondered this scenario (looks like there are more than one
blog/mach-ii implementations in the pipeline), and that is when I
stumbled across Hal's article on the decorator pattern
(http://sys-con.com/story/?storyid=47450&DE=1) and it struck me that
like the coffee example he uses, a blog post could have "standard
options" (like say comments) as well as "flavoured syrups" (say
external links, images, related posts). This would have been my
favoured approach. Of course I could also be way off :)

Cheers
Greg

On Tue, 11 Jan 2005 09:16:48 -0500, Brian Kotek <[EMAIL PROTECTED]> wrote:
>  
>  
> 
> It seems to me like this is diluting the cohesion of the ArticleBO. Should
> it really also be dealing with comments? I'm thinking probably not. Is there
> a way you can handle this relationship in a higher level class, like in a
> BlogContentManager? I think it would mean having having an ArticleDAO and a
> CommentDAO though, and an ArticleGateway and CommentGateway, so it would
> mean more classes for the BlogContentManager to deal with. 
> 
>   
> 
> I'd be interested to hear what everyone else thinks as well.
>  
> 
>   
>  
> 
> -----Original Message-----
>  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of [EMAIL PROTECTED]
>  Sent: Tuesday, January 11, 2005 2:31 AM
>  To: [email protected]
>  Subject: [CFCDev] Newbie approach to Composite Entity pattern. 
> 
>   
>  
> 
> Hi, 
>  
> 
>   
>  
> 
> I've got a concept i need to bounce off others, its similiar in its approach
> to say "Articles" has many "Comments"  (ie Article has-a comment(s)). 
>  
> 
>   
>  
> 
> In my Approach (using the above basic example) i would create: 
>  
> 
>   
>  
> 
> ArticleBO (Composite Entity) 
>  
> 
>     - commentBO (Dependent Object1) 
>  
> 
>     - commentBO (Dependent Object2) 
>  
> 
> etc.. 
>  
> 
>   
>  
> 
>   
>  
> 
> Is it save to say that the ArticleBO has methods like: 
>  
> 
>   
>  
> 
> - setTitle(string) 
>  
> 
> - setBody(string) 
>  
> 
> - setPubDate(date) 
>  
> 
> - addComment(commentBO) 
>  
> 
> - removeComment(commentBO) 
>  
> 
> - findCommentByID(string) 
>  
> 
>   
>  
> 
> I guess what i'm trying to do is combine the efforts of a "Bean" and
> "Facade" into one object that my controller/container accesses. So in the
> event i add a comment to my article, i invoke addComment(), pass in a
> collection of arguments (or object) and it stores that information within
> itself. 
>  
> 
>   
>  
> 
> I then pass that ArticleBO to my DAO, which stores all the Article
> "information" into say "Articles Table" and comments into "Comments" table
> or however i wish to implement storage (ie could serialize the entire bean
> to a wddx packet or something) 
>  
> 
>   
>  
> 
> Is this a typical approach to objects that have many dependent objects. I
> read that "Composite Entity Bean" works like this (Or I may loose this in
> translation - probably the case). 
>  
> 
>   
>  
> 
>   
> 
> Regards, 
> 
> 
> -------------------------------------------------- 
> 
> Scott Barnes 
> 
> System Development Engineer 
> 
>   
> 
> Goro Nickel Project
>  Level 8, 201 Charlotte Street
>  Brisbane QLD 4000 
>  Email: [EMAIL PROTECTED] 
>  
> 
>   


-- 
e: greg.stewart(a)gmail.com
w: http://gregs.tcias.co.uk/
----------------------------------------------------------
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]

Reply via email to