>- see footer for list info -<
Thanks for that
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stephen Moretti
Sent: 14 September 2005 13:24
To: Coldfusion Development
Subject: Re: [CF-Dev] Fusebox 2
>- see footer for list info -<
Allan Cliff wrote:
>>- see footer for list info -<
>>
>>
>but the FB2 structure included
>
>app_globals.cfm
>app_local.cfm
>
>And maybe others I don't remember, also advice on naming conventions in
>FB2.
>
>If anyone has a document relating to it, then I would appreciate it.
>
>
app_globals.cfm is the file that you use to put any global variable
definitions in.
app_locals.cfm is the file that you use to put variable definitions in
for a circuit.
app_layout.cfm contains logic or maybe just straight html depending on
the complexity of the application. use cfsavecontent to save headers,
footers, navigation, content areas into variables as you go through your
fuseaction and then place them where the need to be on the page care of
the app_layout.cfm file.
Me and Taz have a tendance to use an app_server.cfm file where server
related definitions can be stashed.
dsp_ are display only files
qry_ are query only files
act_ are action files ie. they may do file writes, database
updates/inserts, calculations etc. etc.
I've also taken to using cfc_ and js_ for cfcs and javascript.
index.cfm file content at the top level and in circuits tends to look a
bit like this :
<!--- first check for dot notation --->
<cfif ListLen(Attributes.Fuseaction, '.' ) gt 1>
<!--- go to the correct folder --->
<cfset Request.NavSection = ListFirst(Attributes.Fuseaction,
'.')>
<cfset Attributes.Fuseaction = ListLast(Attributes.Fuseaction,
'.')>
<cfinclude template="#Request.NavSection#/index.cfm">
<cfelse>
<!--- no dot notation... fuseactions described here --->
<cfswitch expression="#Attributes.Fuseaction#">
<cfdefaultcase>
<cfinclude template="query/qry_getContent.cfm">
<cfinclude template="display/dsp_content.cfm">
</cfdefaultcase>
</cfswitch>
</cfif>
so that you can use fuseaction=circuitname.actionname to as many dots as
you like.
Circuits are just descrete functionality eg. orders handling or user
registration that live in a folder of their own, so that you can copy
and paste the functionality into another application with relative easy.
Fuses are the individual dsp_, qry_ and act_ files and fuseactions are
cases in a switch in your circuit that gather together the fuses.
Depending on how big the circuit is you may also want to put the dsp_,
qry_ and act_ files into display, query and action folders respectively.
Remember to name your files sensibly, so when you read the code it makes
sense in english. Simple example above - the default action is get the
content and display it. The default content to get may be defined in
app_globals.cfm.
Ummm thats about it....
Welcome to FB2 in 30seconds.... I've probably got my old FB2 CFUG
presentation kicking around somewhere... I'll have a look see if I still
have it and if its worthwhile sending you without me standing alongside
of it talking at you.
Regards
Stephen
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
>-<
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<