Fork me on GitHub

Fusebox

The Skeleton Application

The Fusebox skeleton application (available for download) is set of files to begin building your Fusebox application. It contains all the files necessary to run a fusebox application with the exception of the core files. The core files can be downloaded separately. The core files are a separate download to make it easier to upgrade your existing Fusebox 5+ applications.

The Directory Structure

The skeleton directory structure has certain directories that must be in any Fusebox 5+ application and cannot be renamed. The directories must also remain in the same relation to the other required directories (in other words, you can't move them around.) All the directories in the Skeleton application are required to be together with the exception of the following:

  • Controller
  • Model
  • views

These three files can be removed, renamed and moved.

The directory structure of the skeleton application is as follows:

Controller

A place holder for your Controller sub directories and circuit.xml files should you be using a MVC (Model/View/Controller) design pattern.

errortemplates

User modifiable Fusebox error templates. Shows up when a fusebox error is thrown.

lexicon

A series of sub directories containing lexicons for use in your circuit.xml file. A lexicon is a way of extending the fusebox xml grammar without adding more complexity to the core. In Fusebox 5 and up, all commands are actually created as lexicons. Lexicons that currently ship with the skeleton application, includes:
cf - contains xml grammar for commonly asked for ColdFusion verbs including: abort, switch and case, dump, trace, try and catch
ColdSpring
Reactor

model

A place holder for your Model sub directories, circuit.xml files and fuses containing business logic and queries should you be using the MVC design pattern

parsed

All parsed files that Fusebox generates goes into this directory. Make sure that Fusebox has writing rights to this directory.

plugins

Directory to place any Fusebox plugins your application might use.

views

A place holder for your View sub directories and circuit.xml files as well as display and layout fuses.

Top Level Files

The top level files are as follows:

Application.cfm
An Application.cfm for your application. However, if you are used to placing all your application specific code in here, don't, use fusebox.init instead.

fusebox.appinit.cfm

A file that holds code that only executes on the Fusebox Application's startup. fusebox.appinit.cfm should only be used in conjunction with a non-fusebox application by including the file in onApplicationStart in Application.cfc. If you are only coding a Fusebox 5+ application, you should use the call within to place application only information instead.

fusebox.init.cfm

Holds variables that need to be read upon each execution of the Fusebox. Global level variables that need to be executed more than just on the Fusebox Application's startup would be placed in this file.

fusebox.xml.cfm

The configuration file for your Fusebox Application. This file sets up your circuits, classes, parameters and plugins that make up and run your application.

index.cfm

This is the calling file of your fusebox application. All your calls to your fusebox application will run through this file.