Title: Message
Kay,
 
Here's an example: I have this circuit structure:
 
Employee
    Hourly
    Salaried
    Contract
 
The three sub-circuits are all types of employees. Let's say I want to create a new Hourly employee. Creating one is very, very similar to creating a Salaried employee. One example of this would be that in the case of either an "H", "S" or "C" type employee, I have to add them to the Employee database, assign them to a department, other stuff like that.
 
Do I replicate code in all three types? Uggh, right? Why not abstract the common code to a parent called Employee? Then, if I want to create a new Salaried employee, I can do this:
 
<cfcase value="new">
  <cfmodule template="#Fusebox.rootPath##self#" fuseaction="Employee.new" />
  <cfinclude template ="dsp_NewSalariedEmployee.cfm" />
</cfcase>
 
I can also do it with FuseQ:
 
<cfcase value="new">
  <cfset SuperQ()>
  <cfset AddToQ( 'Salaried.getEmployeeInfo' )>
</cfcase>
 
SuperQ calls the same fuseaction request ("new") in the parent's directory. In OO land, the parent is called "super", hence the name SuperQ. SuperQ() is a bit faster and doesn't require explicit passing of variables. Immediate execution would allow for this:
 
<cfcase value="new">
  <cfset SuperQ()>
  <cfinclude template ="dsp_NewSalariedEmployee.cfm" />
</cfcase>
 
John and I worked on this, but couldn't get performance times below that of a cfmodule call. I'll have to look at Patrick's work to see if he cracked that particular nut. Patrick, am I understanding what you did correctly?
-----Original Message-----
From: Kay Smoljak [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 20, 2002 3:58 AM
To: [EMAIL PROTECTED]
Subject: RE: Like FuseQ, but with immediate execution - alpha testers please?

Hi guys,
 
I like all this talk of executing fuseactions, removing the need for cfmodule etc... but could someone please give me a *real world* example of where I would use this?
 
Kay.
Your "Stupid-Question-Asking" Steering Committee Member
 
 
-----Original Message-----
From: BORKMAN Lee [mailto:[EMAIL PROTECTED]]
Sent: Monday, 20 May 2002 3:38 PM
To: '[EMAIL PROTECTED]'
Subject: Like FuseQ, but with immediate execution - alpha testers please?

Now John's FuseQ is great, but wouldn't it be nice if you could just execute other fuseactions IMMEDIATELY, without the CFMODULE overhead, and without creating an entirely seperate variable space?

It turns out that we can finally do this.

The call looks something like this:

<cfcase value="main">
  <cfset RunAction("person.validate")>
  <cfif isValid>
    <cfinclude template="act_insertperson">
  </cfif>

  <cfset RunAction("stupid.yeehaa")>
</cfcase>


I believe that this will provide the same efficiency and power that FuseQ promises, while being a rather more intuitive to use.

I have my alpha prototype working now.  I am sure I can clean it up some more.  If anybody is interested in alpha-testing this with me, I'd love to hear from you.

Thanks very much,
LeeBB



IMPORTANT NOTICE:

This e-mail and any attachment to it is intended only to be read or used by the named addressee. It is confidential and may contain legally privileged information. No confidentiality or privilege is waived or lost by any mistaken transmission to you. If you receive this e-mail in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or use any part of this e-mail if you are not the intended recipient. The RTA is not responsible for any unauthorised alterations to this e-mail or attachment to it.

==^================================================================
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
==^================================================================

Reply via email to