Installation guide

Execution of CFASSERT (and the assert() function) is controlled by the “Enable Asser-
tions” setting on the “Debug Settings” page of the BlueDragon Administration console.
After changing this setting, you must restart the server.
If the “Enable Assertions” option is checked, then
CFASSERT tags and assert() func-
tions are enabled, otherwise they are not and are simply ignored when encountered. This
means that assertions can be left in code placed into production, where the Admin setting
would be set to disable assertions. There is no cost to assertions existing in code when
they are disabled. Assertions are supported in all editions of BlueDragon.
4.5.2 CFBASE
CFBASE is a CFML tag introduced by BlueDragon that is primarily intended for use in
BlueDragon for J2EE Servers. The CFBASE tag can be used to create an absolute URL
that serves as the base for resolving relative URLs within a CFML page (such as in
IMG
tags). The absolute URL created by the
CFBASE tag includes the J2EE web application
context path. See the document
Deploying CFML on Application J2EE Servers for a detailed
discussion of
CFBASE.
4.5.3 CFCONSTRUCTOR
BlueDragon has added a feature to make creation of “constructor” logic in CFCs more
explicit with
CFCONSTRUCTOR. An example follows:
<cfcomponent>
<cfconstructor>
<cfset variables.foo = 1>
</cfconstructor>
<cffunction name=”somefunction”>
<cfreturn "test">
</cffunction>
</cfcomponent>
The semantics are similar to how a Java object works in that you use init() to explicitly
call the constructor. If you don't call it explicitly, it is implicitly called the first time you
use a method. As with Java objects, defining a constructor and a method named init is
not supported. (A method named
init is permissible in a CFC, to remain backward com-
patible with CFMX, unless you use
CFCONSTRUCTOR.)
If a component uses
CFCONSTRUCTOR, its code will be executed (constructed) either
implicitly upon first access or explicitly by invoking an
init method when invoking the
CFC.
CFCONSTRUCTOR creates a specially flagged init method. Components that simply
have
init methods without using CFCONSTRUCTOR do not get implicit construction.
Also, BlueDragon supports the implicit constructor notion offered by CFMX, where any
code inside a component that’s not within a
CFFUNCTION is also executed the first time
any method in a component is called.
For additional information on CFC method processing, see Section 6.5.
BlueDragon 6.1 CFML Compatibility and Reference Guide 24