So the component would have an init() function that would process all
calculations that have other calculations depend on them?

Since the real app has around 30 calculations (and growing!) with some
fairly complex relationships, this might create some unnecessary(?)
overhead.

Anyway, from what you say, it sounds like it's okay practice to dump them
all in one CFC and then just have the component call its own methods as
needed for each calculation - I think... :)

Cheers,

Sam 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Nando
Sent: Tuesday, November 09, 2004 10:18 AM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] CFC Cohesion

I'm pretty much a beginner myself, but as a general plan, i would do
calculation A on the init, store it in the variables scope, and then access
result A for functions B, C, D and E, if that makes sense. Store result B in
variables scope and use it for C, etc.

>From what you describe, it seems you just need to make sure that the 
>obj is
initialized to the point where it can handle any of those functions. It
doesn't seem to me like you'd need to make separate objects, necessarily, to
have this FinancialObj be cohesive, it does financial calculations.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Sam Clement
Sent: Tuesday, November 09, 2004 4:55 PM
To: [EMAIL PROTECTED]
Subject: [CFCDev] CFC Cohesion


I'm working on a small financial site that uses a lot of financial formulae
(duh).  I'm also an OO newbie and trying to get up to speed on the
methodology with this project (using machii).

Since a lot of the financial formulae are dependent upon each other, one of
the troubles I'm having is with the separation of the business logic into
small, 'do one thing well' type pieces.

For example, if there are 5 calculations that need to be made: A, B, C, D
and E:

A is a simple calculation on values stored in the db B uses A values to make
its calculation C uses A and B values, and the previous date's value of C
for its calculation Etc.

With this set up I'm having difficulty creating cohesive objects.  There
seems too much dependency between each calculation to really separate them.
Separating them into individual components just seems to create a string of
dependent objects.

Perhaps I should be creating "parent" objects that tie these smaller
calculation objects together?

Any advice appreciated.

Cheers,

Sam

________________________________

Sam Clement
ABOVE Studios
Boutique Design Solutions
<http://www.abovestudios.com/>
32 Clifford St - Belmont
Trinidad + Tobago - West Indies
T: (868) 621 5159
W: abovestudios.com <http://www.abovestudios.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
[EMAIL PROTECTED]



----------------------------------------------------------
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
[EMAIL PROTECTED]

----------------------------------------------------------
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 
[EMAIL PROTECTED]

Reply via email to