-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Stephen Adams
Sent: Monday, June 12, 2006 7:46 AM
To: cfcdev
Subject: [CFCDev] accessing the service layer through a CFM

One thing I did notice in their example code was I can't seem to see where
they initialise the Bean CFC. In the service cfc the DAO cfc is created, but
I thought that the Bean cfc would be created as part of the service layer
initialisation, in the service cfc init method?

Beans are a bit different than the rest of the objects (services,
etc.) in that there are multiple instances of the bean, so the bean
wouldn't get created as part of the init method.  Bean instances are
created as needed.

Do you create the service layer, create the DAO object and the Bean object,
then populate the bean all within initialising the service layer cfc?

Most of the time you'd create the service layer, and in the service
layer's init method you'd create a DAO.  After that your app would
call the service layer which in turn would interact with the DAO in
order to deal with the CRUD methods for beans.

Let me know if you have any other questions or if that doesn't make sense.

Thanks,
Matt
--
Matt Woodward
[EMAIL PROTECTED]
http://www.mattwoodward.com


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to