I have tried this before and have come up with two important points.

Don't use a bunch of

<cfif ...>
                Do processing...
<cfelseif ...>
                Do processing...
<cfelseif ...>
                Do processing...
<cfelseif ...>
                Do processing...
<cfelseif ...>
                Do processing...
</cfif>

Use

<cfswitch expression="...">
        <cfcase value="...">
                Do processing...
        </cfcase>
        <cfcase value="...">
                Do processing...
        </cfcase>
        <cfcase value="...">
                Do processing...
        </cfcase>
        <cfcase value="...">
                Do processing...
        </cfcase>
        <cfcase value="...">
                Do processing...
        </cfcase>
</cfswitch>

It's much much quicker.

Also, take a look at fusebox (it uses the idea of using one page to do all
the work as it's basis) at www.fusebox.org

Paul

> -----Original Message-----
> From: W Luke [mailto:[EMAIL PROTECTED]]
> Sent: 04 October 2000 14:11
> To: CF-Talk
> Subject: CFIF discussion
>
>
> Hi,
>
> I'm 5 weeks into Cold Fusion and have a question for the
> Experienced Masses.
>
> So far in my programming, I try to keep all the code in one file
> as much as
> possible.  For example, if I have a form that is used as part of a Query,
> then I'll obviously "post" that form' data to the same page,
> resulting in a
> number of <cfifs>.
>
> However, at what stage would you suggest that this isn't a good
> idea?  I've
> been doing a small sub-project today which is about 400 lines long, and by
> 17:00 will be considerably bigger.  Is this a case of "whatever suits you
> best?"
>
> I'd be interested to hear everyone's opinions.
>
> Will
>
>
>
> ------------------------------------------------------------------
> ------------
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
_talk or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.


------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to