Building CF Applications with Fusebox - PowerPoint PPT Presentation

About This Presentation
Title:

Building CF Applications with Fusebox

Description:

Write down these ideas into a loose Specification ... Use the Tight Specification to figure out all the sections of the application. ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 13
Provided by: joes171
Category:

less

Transcript and Presenter's Notes

Title: Building CF Applications with Fusebox


1
Building CF Applications with Fusebox
  • Steve Nelson
  • CTO, Zero-G Commerce, Inc.
  • member, Team Allaire
  • Chairman of Fusebox.org

2
A CF Programmers Dream World...
  • Imagine if.
  • you could work in a team of developers and have
    all the code look like it was written by single
    person.
  • you could understand the structure of your
    co-workers code in 5 minutes, without asking
    questions
  • you could concentrate on solving the problem
    instead of thinking about how to write the
    application

3
What is Fusebox?
  • A Structured application architecture for
    building ColdFusion applications
  • Created by the ColdFusion community for the
    ColdFusion community
  • The best part. Its free

4
Why use a Structured Architecture?
  • File based applications get messy, a structured
    architecture helps to clean this up.
  • Multiple person development
  • Instant documentation of your architecture
  • Solve the problem instead of the Applications
    Architecture

5
Before You Write Any Code
  • Talk to the client (or boss) about general ideas
  • Write down these ideas into a loose Specification
  • Create a tight specification from the loose
    specification, this means figure out all the
    sections of the application and all the actions
    required to do everything the client wants to do
  • Repeat this process until every action in the
    application is understood by everyone involved

6
Create the Directory Structures
  • Use the Tight Specification to figure out all the
    sections of the application.
  • Each section is given its own directory, each of
    these sections are known as Circuit
    Applications
  • Circuit Application - This is a section of the
    overall Home application example
    www.ebags.com/search

7
Create the Index.cfm Files
  • Every directory (Circuit application) has an
    index.cfm file
  • Index.cfm controls all the FuseActions of that
    circuit application
  • Is basically a single ltCFSWITCHgt statement with
    multiple ltCFCASEgt statements
  • Each CFCASE is a different FuseAction

8
Create the Fuseactions
  • A Fuseaction is made up of one or more .cfm files
  • Determine what types of files (display/action/quer
    y) are needed to create each Fuseaction
  • Create a CFCASE statement for each Fuseaction and
    CFINCLUDE each necessary file.

9
File Naming Convention (Fuses)
  • app_globals.cfm - Global variables, one per Home
    application
  • app_locals.cfm - Local variables, one per Circuit
    application
  • dsp_filename.cfm - Display files
  • act_filename.cfm - Action files
  • qry_filename.cfm - Query files

10
Create the Necessary Files (Fuses)
  • All links and forms in the display files should
    point to one of the index.cfm files in the
    application, not to the specific dsp or act files
  • All links and forms must specify which Fuseaction
    they point to
  • Use the attributes scope instead of form/url
    scope this allows you to call the index.cfm file
    as a custom tag (This is for advanced Fusebox
    techniques)

11
Putting it all Together
  • One Home application is made up of many smaller
    Circuits applications
  • One Circuit application is made up of a directory
    of files, it must contain an app_locals.cfm and
    index.cfm file plus other display/action/query
    files
  • One Index.cfm file is made up of one or more
    Fuseactions
  • One Fuseaction includes one or more
    display/action/query files plus any necessary
    CFML logic

12
Conclusion Why use Fusebox
  • Fusebox is most likely very similar to how you
    may already build an application, thus it will be
    easy to learn
  • It is a well thought out process, and will
    continue to be improved by the CF community
  • Itll save you time, which will save you money
  • Most importantly it will prevent hair loss.
Write a Comment
User Comments (0)
About PowerShow.com