sounds like you may be doing some extra work (not that i think that will
kill your server or anything).   what if you put the copies in their own
files?

ex:

<cfcase value="foo">
        <cfinclude template="sessionToLocal.cfm">
        <cfinclude template="processing.cfm">
        ...
        <cfinclude template="localToSession.cfm">
</cfcase>


mary-catherine


-----Original Message-----
From: Kay Smoljak [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 16, 2002 10:07 AM
To: [EMAIL PROTECTED]
Subject: session var overhead vs reusibility


Hi all,

Here's a philosophical question for you all :)

I have a batch credit card decryption/payment processing circuit. The
various stages all happen over a few fuseactions. I've tried to make
each fuse do just one thing as much as possible, it makes it easier to
debug. The payment data is stored in a session struct.  

I would judge the re-usability of these fuses as quite low. Perhaps they
could be recycled quite well. But this is a fairly specific system. 

At the beginning of each fuse that requires it, I copy the session
struct to the local scope, and back again at the end if required. Now
that I look at it (it's at the testing stage) there are a few places
where the two or more fuses which make up a fuseaction are each copying
the session struct to the local scope and then copying it back again
when they have finished, when in reality these actions only need to
happen once per fuseaction. Is it bad style to only copy them over in
the first fuse, and back in the last? It feels like it would be breaking
some kind of modularity rules. Or should I put the copy over/back into
the switch? Or (and I just thought of this while I was typing) should I
create a separate fuse to copy the struct over, and another to copy it
back, and resuse these? Maybe this could be done in a UDF? I guess what
I'm really trying to decide is, what's more important: minimizing the
cflock/session overhead, or maximizing the reusability of the fuses?

Any thoughts? Apart from "you're the only one who knows what's best for
your app, work it out yourself??"

Kay.

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