Unfortunately, my experience w/ CFCs has not been broad enough to give you definite answers. I can offer my thoughts below.
At 12:06 PM 7/13/2004, you wrote:
OK. I am not concerned so much about "number of lines" as I am about complexity. A lot of lines are added to my code due to switch blocks and comments. However, there are some functions that are quite complex. The specific CFC I am working with is a employee's timecards CFC (not an employee CFC). There are functions for retrieving the current timecard, going to the next, going to the previous, getting information out of the database, adding, updating, deleting, undoing, validation routines, rounding functions, many sub-functions for date calculations, plus many more. I suppose one way for me to break it down into a timecards CFC which contains an array of individual timecard CFCs. I guess my question is at what point do I start considering this?
I understand it is hard to get a full feel for the app from 1 paragraph of explanation.
Right now, I understand that you currently have all the employees Time Card information as part of the an employee object? Is that correct?
If so, moving all the time card functionality to a TimeCard component and adding an array of timecards to the employee CFC appears like a logical / reasonable approach.
How is a time card defined? By week? By Day? Perhaps it doesn't matter for the purpose of this conversation.
I am also concerned about the RAM usage. What is the impact on RAM usage of having a function inside of every instance of a CFC versus having a function inside of a single custom tag? For example, if I break down the CFC into a CFC representing the timecards array and a CFC representing each timecard, am I actually doing a disservice since the number of CFC instances, and the number methods repeated in RAM, will now be much greater?
The sense I am getting from the responses people have given is that CFCs are not scalable the same way a typical function library would be scalable. Is this the general feeling?
If you are storing CFCs in a session instance (because each user has different data) then I would say that they are less scalable than a function library. A function library, by definition, has no associated data with it and therefore you probably won't need to keep it session persistent.
In my development, I am using an approach similar to what you describe (I.E. Object 1 has an Array of object 2). I have not noticed any problems, but the app is not in production yet.
--
Jeffry Houser, Web Developer, Writer, Songwriter, Recording Engineer
<mailto:[EMAIL PROTECTED]>
--
AIM: Reboog711 | Phone: 1-203-379-0773
--
My Books: <http://www.instantcoldfusion.com>
Recording Music: <http://www.fcfstudios.com>
Original Energetic Acoustic Rock: <http://www.farcryfly.com>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
