The goal is usually to make the fbx_switch file easy to follow. Sometimes it's easier to follow if you take a a section of related code and group it behind an act_ file. Sometimes it's easier to follow if you take the contents of an act_ file and put them directly in the fbx_switch. There are really no hard-and-fast rules. You just have to follow your instincts. If you have some specific code you'd like to post, that usually leads to a good discussion.
Patrick > -----Original Message----- > From: Patrick Quinn [mailto:[EMAIL PROTECTED]] > Sent: Monday, June 03, 2002 4:54 PM > To: [EMAIL PROTECTED] > Subject: Logic in switch vs. act_file include > > > Hello all. I'm taking a vote on an architecture issue. I'm > working on a > very large corporate app, and I very much emphasize the idea that the > switch should be a visual map of the application. > > So, what are some thoughts about having logic right in the > switch, vs. > separated into act_ files? For example, this: > > <cfcase value="1"> > <cfif attributes.formID IS NOT ""> > <cfscript> > attributes.thisVar = "Tom"; > attributes.thatVar = "Green"; > </cfscript> > </cfcase> > > Versus this: > > <cfcase value="1"> > <cfinclude template="act_setLocalVars.cfm"> > </cfcase> > > This is a simple example, of course. I'm more interested in > situations > of more complex processing, like setting locks, checking shared-scope > vars, etc. My preference is to have as much of that in the case as > possible. > > On the one hand, more separation into act_ files means smaller cases, > but more files and more including. On the other hand, more > logic in the > switch means a better map, and fewer files and less including, but > longer cases. > > Thoughts, warnings, experiences, philosophies? > > Best, > Patrick > > ==^================================================================ This email was sent to: [email protected] EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9 Or send an email to: [EMAIL PROTECTED] T O P I C A -- Register now to manage your mail! http://www.topica.com/partner/tag02/register ==^================================================================
