On 11/28/05, Stan Winchester <[EMAIL PROTECTED]> wrote:
> What is best practise for passing dsn variable to cfc?

It depends.

As you get more comfortable with OO, you'll feel less comfortable with
a CFC "reaching outside itself" for data.

What people often do with their data access CFCs is to pass the DSN
into the init() method and have the CFC remember it (in variables
scope - and assuming you save the CFC to application scope).

Then maybe you'd move to using an Inversion of Control container like
ColdSpring to handle the initialization and injection.

It's all down to what you feel comfortable with - as long as you keep
an eye on where you want to go.
--
Sean A Corfield -- http://corfield.org/
Got frameworks?

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225476
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to