Hi John,

Well I'm one of those people doing it all wrong too.  Patrick example looks 
perfectly normal to me.  No issues with cacheing that I can see.

The idea of a fuseAction, to me, is that it performs one coherent action (a 
PUBLIC action, that is, one that a USER might like the app to do).  So a 
single fuseAction includes the necessary queries, then maybe some act_ 
fuses, then a display fuse, everything that's needed to perform the public 
action.

Your approach, with XFAs and multiple CASE blocks is mathematically more 
complex (one extra CASE block = 1 unit of structural complexity), and 
subjectively (me being the subject) a darned sight harder to read.  You seem 
to be heading for a single fuse per fuseaction, with XFAs to determine the 
flow.

XFAs are great.  I even understand them (I guess I'm patronising too 
sometimes).  They allow for great re-usability and centralisation of 
event/handler definition, BUT...

They should not be used as a substitute for good structured programming.

leeb.



>From: "John Quarto-vonTivadar" <[EMAIL PROTECTED]>

....
>
>Patrick that is a awful example! :)  You're using the your fusebox to
>substitute for proper query caching. !
>
>(also see below)
>
> >
> > <cfcase value="aDecentExample">
> >  <cfinclude template="qry_getAGoodReason.cfm">
> >  <cfinclude template="act_ConvinceJQvT.cfm"> <!--- uses
> > qry_getAGoodReason.cfm --->
> >  <cfinclude template="dsp_example.cfm"> <!--- also uses
> > qry_getAGoodReason.cfm --->
> > </cfcase>
> >
>
>it looks to me like you're doing two things with one fuse. you could have
>easily written this as
>
><cfcase value="convincePMcE">
>     <cfset XFA.onExit = "displayexample">
>     <cfinclude template="act_convincePMcE.cmf">
>     <!--- some people may choose to put another cfinclude to a "url_" file
>here; XFB lets the XFA's handle it --->
></cfcase>
>
><cfcase value="displayexample">
>     <cfinclude template="dsp_example.cfm">
></cfcase>
>
>one thing I'm noticing is that the folks who are pro "include it in the
>fusebox!" are also tending to be the ones not using XFA's.  is the
>correlation cause-and-effect? Are people not using XFA's because they're 
>not
>properly understood, or because they're consciously thinking that XFA's are
>sequentialy related to XFB jsut because of the lettering?
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to