not only is it quicker to code, but its quicker to execute.

<cfif fileexists("#request.path#\#request.page#")>
    <cfinclude template="#request.page#">
</cfif>

runs faster than the cfswitch


----- Original Message -----
From: "Patrick McElhaney" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Friday, January 12, 2001 10:12 AM
Subject: RE: passing page name through url


> > At 09:25 1/12/01 -0500, you wrote:
> > >As I don my flame retardant suit and dunce hat,
> > >I can't help but wonder aloud, what is the point? :)
> >
> > you wouldn't have to add case statements all the time, every time you
> > add a fuseaction. It would just work after you drop the file in there.
> > I've thought about doing this, but wondered if there was security
> > concerns or other problems..
> >
> So it's basically a hack to break the fusebox model
> when it saves 30 seconds of coding? Doesn't that create
> an ugly hybrid that's impossible to maintain?
>
> If you insist on being this lazy, may I offer a
> suggestion that at least won't compromise security and
> butcher FB's beautiful interface?
>
> <cfswitch expression="#attributes.fuseaction#">
>   <cfcase value="aFuseAction">
>     <cfinclude template="act_dosomething.cfm">
>     <cfinclude template="dsp_showsomething.cfm">
>   </cfcase>
>   ...
>   <cfdefaultcase>
>     <cftry>
>       <cinclude template="FUS_#attributes.fuseaction#.cfm">
>     </cftry>
>   </cfdefaultcase>
> </cfswitch>
>
> This way you can actually add a new fuseaction by
> creating a file named FUS_newfuseactionname.CFM
>
> I can see how this technique can be used as an
> iterative step in development, especially when
> converting an existing app, but still wouldn't want to
> see it in a production enviorment.
>
> Patrick
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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