On 22/01/04 17:02, "Harry Klein" <[EMAIL PROTECTED]> wrote:

> We stored all of our constants as propertymanager properties (variables,
> udf, cached queries, ...).
> The properties are set in a InitPlugin.cfc - using the method
> configure().
> We read often used properties in the header views, and store them as a
> struct in request scope.
> I know - views should never read properties. Maybe we should change the
> plugin and save the request variable there.
> 
> Harry

The problem with that approach is that you cannot use such constant inside
BO. When you made the validation you have to reencode the whole functions
and you break encapsulation in view too.
For me colfdfusion authorize even in mach-ii the mix of OO stuff and
procedural stuff. 
I put every constant and functions in the application scope (a struct called
Application.constant and application.funclib).
I create an empty Listener with just a configure function.  In that way I
can read the mach-ii.xml file and use any of its property.
I place it in the first place in mach-ii.xml file, so that theses functions
will be available through the entire application (filter, plug-ins and also
view)

Lanfeust
 

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