Calvin

Depends, In most cases you can do any conditional logic before rendering
your page but obviously there are exceptions such as when the result of the
condition determines what html is being displayed (and not something else
such as if the user should be redirected or a session variable should be
updated etc.) Some frameworks allow you to determine the portions of a page
being rendered before the page is assembled allowing you to decide what
portions are shown before they are rendered. 


Just my 2pence

Kola

> -----Original Message-----
> From: Calvin Ward [mailto:[EMAIL PROTECTED]
> Sent: 31 January 2005 13:50
> To: CF-Talk
> Subject: RE: better way to code?
> 
> In light of this discussion, how about lots of cfif statements buried in
> html...?
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 31, 2005 8:46 AM
> To: CF-Talk
> Subject: RE: better way to code?
> 
> Johnny
> 
> Just to clarify, are you referring to lots of if statements in code in
> general or lots of if statements in a fusebox switch file? If you were
> referring to the latter then I would agree and say that in fusebox - you
> should not have the majority of your logic within the switch file..is that
> what you meant?
> 
> Kola
> 
> -----Original Message-----
> From: Michael T. Tangorre [mailto:[EMAIL PROTECTED]
> Sent: 29 January 2005 03:42
> To: CF-Talk
> Subject: RE: better way to code?
> 
> > From: Johnny Le [mailto:[EMAIL PROTECTED]
> > I shouldn't have given that specific example.  My reason for
> > bringing this whole issue up is that people say beginners'
> > code has a lot of CFIF statements.  I am using Fusebox now.
> > So it elimates a lot of CFIF statement already, but I still
> > feel that I have too many CFIF in my code.  I am just looking
> > for alternative, better, and more efficient methods to handle
> > all of those conditional statements.
> 
> Who says beginners code has a lot of cfif statements? Why are they bad if
> they are needed. I have worked on a lot of applications where a good
> number
> of if statements were needed all over the place... why is this bad? How
> does
> fusebox eliminate the need for conditional logic? Are you using FB4?
> FB4.1?... <if condition=""></if> = <cfif></cfif>???? Sometimes a
> case/switch
> structure is a better choice over cfif/cfelseif/cfelse/cfif; usually when
> there would be more than one (1) cfelseif, otherwise they perform the
> same.
> 
> Mike
> 
> 
> 
> 
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192318
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to