from my experience, you'd usually have a service layer CFC.  This service
layer would be responsible for everything in its domain, eg,
CustomerService.cfc would be responsible for creating a Customer instance
where Customer could be composite.  CustomerService.cfc would also expose
gateways and such thus its really a Customer API in a way.  This
CustomerService.cfc would inject the DSN when creating the DAO's and
Gateways needed.  Note that if Customer is composed of data and say a
instance of Address, CustomerService.cfc would work with address cfcs too
and you probably wouldn't need a AddressService.cfc.  I usually further put
a remote facade for Flex to talk to that is in short the full API exposed to
the Flex client only.

my $0.02

DK

On 4/25/07, Kyle Hayes <[EMAIL PROTECTED]> wrote:
>
> I will try to explain this the best I can. I am building an application
> using ColdFusion and Flex and I want to make sure that I am following good
> practice techniques.
>
> I have a root level COM folder which has various packages inside of it.
> Inside the com.hayes.myproject package contains the much of the Gateways,
> DAOs, and CF VOs for my application. I know that it is good practice to pass
> in the name of a datasource when you first initialize a Gateway or DAO. This
> would normally not be an issue in a 100% CF application.
>
> But how do I do that when I am working with Flex? Obviously there is no
> way to do it from the RemoteObject from my understanding.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:3943
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to