Simple Design Question
Simple Design Question
- Subject: Simple Design Question
- From: James Cicenia <email@hidden>
- Date: Mon, 23 Aug 2004 12:25:09 -0500
Hello -
I have indicators that show a state. They show red, yellow or green.
These indicators reference a sum of attributes.
As a simple example:
if (Budget - (spentToDate + estimateToComplete)) / 100 >= redThreshold)
then show the red indicator.... etc.,
My question is what is the best practice here? Do I run the calculation
every time? Some calculations require looping, etc. While not really
onerous they could build up over time. Does one store it as a "derived"
attribute in EOModeler (could be good for simple calcs), or does one
have it calculated and set in memory at application launch, login or at
actually changing of some data? Now I am using mySQL, so I don't know
about triggers or such.
I opted to review/change it at login and upon actual change of data.
Originally, I just.. gasp... copied and pasted my code. So here I am
re-factoring my code and said, hmmm, this code needs to be moved to the
Project EO and I thought I better ask the pros what they do. After all,
since the last time I asked I have moved all my queries into my EO and
that has worked great. Everything is now centralized appropriately.
Yours,
James Cicenia
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.