More on Fusebox at Fusebox 3 Development Methodology : Fusebox 3.0 [email protected] With...

23
More on Fusebox at www.halhelms.com Fusebox 3 Development Methodology : www.fusebox.org Fusebox 3.0 [email protected] With thanks to David Laing, Hal Helms, Nat Papovich, and others

Transcript of More on Fusebox at Fusebox 3 Development Methodology : Fusebox 3.0 [email protected] With...

Page 1: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Fusebox [email protected]

With thanks to David Laing, Hal Helms, Nat Papovich, and others

Page 2: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Agenda

• Quick revision of core fusebox concepts

• Fusebox 3 (FB3) by example – The colours app

• The core files – fbx_fusebox30_*.cfm

• The map – fbx_Circuits.cfm

• The fusebox – fbx_Switch.cfm

• The building blocks - fuses

• The documentation – FusedoX

• Nested settings – fbx_Settings.cfm

• Nested layout – fbx_Layout.cfm

fuse

fuse

fuse

fuse

fuse

fuse fuse

fuse

TheFusebox

fusefuse

fusefuse

fusefuse

fusefuse

fusefuse

fusefuse fusefuse

fusefuse

TheFusebox

Page 3: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

The Fusebox Philosophy

There are two ways of constructing a software design:

• One way is to make it so simple that there are obviously no deficiencies,

• and the other way is to make it so complicated that there are no obvious deficiencies.

The first method is far more difficult.

C.A.R. Hoare

Page 4: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Point-to-Point Routing

New York

Tampa

Page 5: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Hub-and-Spoke System

Tampa

New York

Chicago

Seattle

Los Angeles

Page 6: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Point-to-Point Programming

  

Page 7: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Fusebox Programming

 

Page 8: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Nested Fusebox Programming 

Page 9: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Fusebox Architecture

CircuitsFuseactions

Fuses

Page 10: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Fusebox 3

• Consolidation of ideas of FB2

• Standardised frozen core files

• Polished methods for most web apps

• Fusebox Conference #1, 20th Oct 2001

• Whitepaper (Conference in a box – www.halhelms.com)

• Newbies guide.

• The Fusebox structure

Page 11: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Fusebox : The Colours App

Page 12: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

FB3 core files : fbx_fusebox30_*.cfm

The application server for the fusebox framework

•Handles

•Environment variables

•Nesting

•Layout

• Different versions for different platforms.

• Standard, static – maintained by FBSteer.

• 2 modes : Fusebox.suppressErrors = true/false

Page 13: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

The core support files

• Application.cfm :

• index.cfm :

• fbx_savecontent.cfm

• sesConverter.cfm

• Prevents accessing fuses directly

• Decides which fusebox core to include

• Sets default fuseaction

• Emulates CF5 SaveContent

• index.cfm/fuseaction/cart.add/ID/653.htm

Page 14: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

The map file : fbx_Circuits.cfm

Provides a map to the location of

each circuit

• Each circuit has a unique name

• index.cfm?fuseaction=circuitName.fuseAction

• Fusebox.Circuit

• Fusebox.Circuits.<circuitname>

Page 15: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

The fusebox : fbx_Switch.cfm

• Just the <cfswitch> from FB2’s index.cfm

• Every circuit has one

• Switches on Fusebox.fuseaction

• Includes fuses to perform particular action

Page 16: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

The building blocks : Fuses

Official

• dsp_ : HTML display – coded by HTML coder

• act_ : CFML logic – coded by CF coder

• qry_ : DB interaction – coded by DBA (QuerySims)

Unofficial

• url_ : sometimes used for conditional redirections

• lay_ : prefix for layout files.

Page 17: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

The Documentation : FusedoX

• Officially adopted the XML Fusedocs spec

• Explains the “what” of the fuse

• What it does (<responsibilities></responsibilities)

• What it needs (<in></in>)

• What it produces (<out></out>)

• CF Studio VTML & help from www.fusebox.org

Page 18: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Circuit level settings : fbx_Settings.cfm

FB3 core traverses down nested tree, executing fbx_Settings.cfm as it goes

• Switch settings based on isHomeCircuit

• Good place for security logic, breadcrumbs etc

Page 19: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Nested Layout : fbx_Layout.cfm

• FB3 core traverses up the tree, wrapping each fbx_Layout.cfm around Fusebox.layout as it goes

• fbx_Layout.cfm a kind of switch, which can include different layouts in different circumstances

(ie, suppressLayout)

Page 20: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Referencing files

• Fuses in same directory – just <cfinclude template=“dsp_helloWorld.cfm”>

• Fuses in other circuits – <cfinclude template=“#Fusebox.rootPath#/circuitname/act_aFuse.cfm”>

• fuseactions of other circuits <cfmodule template=“#Fusebox.rootPath#index.cfm”

fuseaction=“circuit2.doStuff” suppressLayout=“true”>

HTML includes – all relative to home circuit – <img src=“#Fusebox.currentPath#/images/monkey.jpg”>

Page 21: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Limitations of FB3

• Does not support <CFFLUSH>

• Does not support <CFCONTENT>

Page 22: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

Summary

• Quick revision of core fusebox concepts

• Fusebox 3 (FB3) by example – The colours app

• The core files – fbx_fusebox30_*.cfm

• The map – fbx_Circuits.cfm

• The fusebox – fbx_Switch.cfm

• The building blocks - fuses

• The documentation – FusedoX

• Nested settings – fbx_Settings.cfm

• Nested layout – fbx_Layout.cfm

fuse

fuse

fuse

fuse

fuse

fuse fuse

fuse

TheFusebox

fusefuse

fusefuse

fusefuse

fusefuse

fusefuse

fusefuse fusefuse

fusefuse

TheFusebox

Page 23: More on Fusebox at  Fusebox 3 Development Methodology :  Fusebox 3.0 groffman@metarail.com With thanks to David Laing, Hal.

More on Fusebox at www.halhelms.com

Fusebox 3 Development Methodology : www.fusebox.org

The Fusebox Community

Websites• www.fusebox.org• www.bombasbee.com• www.meta-magic.com/cgi-bin/fusewiki

Mailing lists• [email protected][email protected][email protected][email protected][email protected]