Application Initialisation

Overview

The first time a FarCry application starts it initialises a complex set of global constants required for the framework to correctly function. You can force a FarCry application to re-initialise by attaching the URL parameter &updateapp=1

Order of Initialisation

FarCry globals get initialised in a specific order. This order is specifically designed to allow the developer to override the behaviour of this initialisation through the use of plugins and/or the specific FarCry project.

  1. project ./www/Application.cfm
  2. farcry:farcryinit custom tag replaces the standard cfapplication tag and orchestrates the initialisation
  3. ColdFusion application specific variables; session timeouts, etc
  4. Project specific pathing and database information; nominated as attributes of farcryinit
  5. project ./config/_serverSpecificVars.cfm for server specific variables
  6. plugins ./config/_serverSpecificVars.cfm in order of plugins attribute of farcryinit
  7. security model initialisation
  8. Project specific last minute changes ./config/_serverSpecificVarsAfterInit.cfm

farcry:farcryinit custom tag

Sample usage:

<cfimport taglib="/farcry/core/tags/farcry/" prefix="farcry" />
<farcry:farcryInit
  name="projectName"
  projectURL=""
  dsn="projectDsn"
  dbType="mysql"
  plugins="farcrycms" />

Attributes:

Name

Description

Required

Default Value

Sample Value

name

<cfapplication> attribute

YES

N/A

myProject

sessionmanagement

<cfapplication> attribute

NO

true

true

sessiontimeout

<cfapplication> attribute

NO

#createTimeSpan(0,0,20,0)#

#createTimeSpan(0,0,30,0)#

applicationtimeout

<cfapplication> attribute

NO

#createTimeSpan(0,0,20,0)#

#createTimeSpan(0,0,30,0)#

clientmanagement

<cfapplication> attribute

NO

false

true

clientstorage

<cfapplication> attribute

NO

registry

registry

loginstorage

<cfapplication> attribute

NO

cookie

cookie

scriptprotect

<cfapplication> attribute

NO

[empty string]

???

setclientcookies

<cfapplication> attribute

NO

true

true

setdomaincookies

<cfapplication> attribute

NO

true

true

dsn

datasource of project database

NO

#attributes.name#

myProjectDsn

dbtype

db type (mysql, etc.)

YES

N/A

mysql

dbowner

db owner, if any

NO

[empty string]

dbo.

projectDirectoryName

name of project directory within /projects/

NO

#attributes.name#

myProjDir

plugins

comma-separated list of plugins

NO

farcrycms

farcrycms,myplugin

projectURL

url to the project site

NO

[empty string]

???

bObjectBroker

enable/disable object broker

NO

true

true

ObjectBrokerMaxObjectsDefault

max records for object broker to cache

NO

100

1000

bUseMediaArchive

option to archive

NO

false

true