Which way do you prefer to initialize your components? Do you use
getters/setters on the below? Read from a file, etc?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Christian Cantrell
Sent: Thursday, January 15, 2004 6:25 PM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] How do you like your initialization?


On Thursday, January 15, 2004, at 02:14  PM, Bryan F. Hogan wrote:

> What initialization routine do you use? Do you use a properties file?
> Do
> you use getters/setters on the request scope, etc. Do you read a
> properties file within the CFC? Do you pass or store a location to a
> properties file?

I use a custom tag that I wrote called <mm:init> which only executes 
the code inside it the first time it is encountered:

<mm:init>
     // Initialization code here
</mm:init>

  The INIT tag goes in my Application.cfm file, and typically I try to 
just get away with setting application variables.  If I have a lot of 
configuration data, I will either put it in a database or an XML file 
which is typically retrieved/parsed inside the init tag in the 
Application.cfm file.

Christian


----------------------------------------------------------
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