Well, the way I like to do it is to have all my business rules and
object collaboration logic in my business objects (e.g., Dealer).  The
manager objects really only implement the "use cases" and coordinate
communication between your business objects, TO's, DAO's, etc.  For
example, you're Dealer object could have the following public methods:

DealerTO getTO( ) // returns instance data of this Dealer as a TO
void setTO( DealerTO ) // sets instance data of this Dealer according
to input TO
void setKioskKey( numeric )
Sale sellMerchandise( Customer, SaleTermsTO ) // contains all business
rules and logic associated with selling merchandise

DealerManager might have public methods like:

void createDealer( DealerTO )
void updateDealer( DealerTO )
void executeSale( dealerID, customerID, SaleTermsTO)

The implementation of "executeSale" might look something like:
var dealer = DealerDAO.getDealer(dealerID);
var buyer = CustomerDAO.getCustomer(customerID);
var sale = dealer.sellMerchandise(buyer, saleTermsTO);
SaleDAO.createSale( sale.getTO() );

Again, this might not be the ideal way to do things in your situation,
but it seems to have worked in my world.  Does that help clarify
things?

On Thu, 6 Jan 2005 11:56:23 -0800, Ali Awan <[EMAIL PROTECTED]> wrote:
>  
>  
> 
> Thanks Doug, 
> 
> Actually I have a dealer object, but it does nothing. 
> 
> I guess I put my business logic in the Dealer Manager.  But this adds
> another layer.  Maybe I'm not thinking this through rightâ..  What would be
> the correct way to utilize the dealer object and then how would it interact
> with the TO? 
> 
> Thanks, 
> 
> Ali 
> 
> Doug Keen
>  Thu, 06 Jan 2005 11:42:11 -0800 Do you have a Dealer object that
> corresponds to your DealerTO object? In that case, you may want to update
> that key in the Dealer object,and then grab a new DealerTO from the updated
> Dealer object.  Thatway, you can keep any business rules associated with
> that specificupdate encapsulated within the Dealer business object.  
> 
>
----------------------------------------------------------
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