> Thoughts on why that would be better or worse than this in the manager:
>
> public void addComent( int articleID, commentTO commentTO ) {
> commentDAO.save( articleID, commentTO );
> }
>
> In that case you don't need to call the articleDAO at all, nor is the
> article responsible for doing anything with the comment. And if you had
> the articleID as part of the commentTO you could actually just do:
>
> commentDAO.save( commentTO )
That model's great if you don't have a domain/business object layer...
i.e., you don't need to check business rules when things happen, or
the business rules are solely implemented as integrity constraints in
your database. The model I suggest is if you have a more complex set
of business logic... perhaps the Article-Comment example isn't very
well suited for my suggestions... you could very well implement a blog
system without business objects... just basic beans/TOs,
managers/Mach-II listeners, and DAOs/Gateways.
----------------------------------------------------------
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]