RE: [CFCDev] Strange Errors with my first CFC

2004-11-09 Thread Ahn, Chang
I'm new to CF so this may be a dumb statement I thought the access attribute of cffunction would limit the way someone could execute the cfc. If you have RSS disabled, wouldn't that disable introspection? Isn't this enough or am I missing something? -Original Message- From:

[CFCDev] CFC Cohesion

2004-11-09 Thread Sam Clement
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

RE: [CFCDev] CFC Cohesion

2004-11-09 Thread Nando
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

Re: [CFCDev] CFC Cohesion

2004-11-09 Thread Patrick McElhaney
Maybe A, B, C, D, and E should each be a CFC? And you could have another CFC (let's call it DAO) that grabs values from the database. So A would would talk to DAO to get the values. A doesn't know anything about a database and DAO doesn't know anything about calculations. B would talk to A to

RE: [CFCDev] CFC Cohesion

2004-11-09 Thread Sam Clement
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

Re: [CFCDev] CFC Cohesion

2004-11-09 Thread Patrick McElhaney
This sounds like a spreadsheet. Are the formulas in spreadsheets now? Could they be? Could you work with the spreadsheets programatically, putting the input values in the appropriate cells and getting the output values out of the calculated cells? That way the formulas wouldn't be embedded in

RE: [CFCDev] CFC Cohesion

2004-11-09 Thread Wayne Graham
Someone can correct me if I'm wrong, but if you create a reference to the cfc object in memory with cfobject, or the createObject function, you can refer to the object without recreating the object, but run functions from within the object with very little overhead. If you'd like to see how one

RE: [CFCDev] CFC Cohesion

2004-11-09 Thread Sam Clement
Bingo. A lot of this is from a spreadsheet. Unfortunately, using the spreadsheet to power the app is not an option at the moment. The calculations are fairly standard financial calculations (as found in excel): Standard Deviation, Correlation Coefficient etc. Other than the interdependencies

RE: [CFCDev] CFC Cohesion

2004-11-09 Thread rbils
Sam, You may want to take a look over at CFLib.org. Many of those formulas are already written up as UDFs, which are essentially just CFC methods. It may save you some time... -Rob Sam Clement [EMAIL PROTECTED]@cfczone.org on 11/09/2004 10:49:10 AM Please respond to [EMAIL PROTECTED]

RE: [CFCDev] CFC Cohesion

2004-11-09 Thread Brent Nicholas
For the calculations that are repetitive, would a UDF be a good solution? Or does that move us away from the OO goal? BN Brent Nicholas - EclecticDetroit, LLC. http://www.EclecticDetroit.com 248.767.5516 [EMAIL PROTECTED] [EMAIL PROTECTED] On the other hand, you have different fingers. From:

Re: [CFCDev] SOT: UI needs to know business logic

2004-11-09 Thread Marlon Moyer
Barry, would you mind showing a snippet of your client-side logic that would deal with this XML? Thanks, On Tue, 9 Nov 2004 17:41:43 +1000, Barry Beattie [EMAIL PROTECTED] wrote: The UI doesn't contain any business logic, it'smerely acting on data that the business layer provides.

RE: [CFCDev] CFC Cohesion

2004-11-09 Thread Sam Clement
I've actually got the formulas up and running fine. It was fun getting them to work and not as complicated as all that (it's just transposing the arithmetic really - the brain work comes from the people who came up with the formulae!). Right now, I'm just trying to figure out the best way to

Re: [CFCDev] CFC Cohesion

2004-11-09 Thread Douglas Knudsen
Are these reports of data from a DB? Wouldn't it be better to just use the DB for all these then? Doug On Tue, 09 Nov 2004 11:54:02 -0500, Brent Nicholas [EMAIL PROTECTED] wrote: For the calculations that are repetitive, would a UDF be a good solution? Or does that move us away from the OO

Re: [CFCDev] CFC Cohesion

2004-11-09 Thread Thomas Chiverton
On Tuesday 09 Nov 2004 18:07 pm, Sam Clement wrote: seems like the best bet. I'm just wondering how to implement it so that it meets the above criteria. I'd suggest a com.abovestudios.clientName.util.A and .B etc. You can then create these into a shared scope (session) and use them easily in

RE: [CFCDev] CFC Cohesion

2004-11-09 Thread Sam Clement
Actually I do use the DB for standard deviation... But you're right, maybe I could use it for more calculations... In any case, I think I'll create a simple calculations CFC with separate functions for each calc. These functions can call each other as needed. The DAO can then be passed in to

[CFCDev] DAO Use cfdirectory cffile ?

2004-11-09 Thread Joe Ferraro
I was reading in Core J2EE Patterns that a DAOs methods be used for returning external persistent data to the client is not just exclusive to RDBMS. This makes sense, but I was wondering if a DAO should be used for accessing things like a directory structure with cfdirectory. Also could it

[CFCDev] Thread-safety

2004-11-09 Thread Murat Demirci
Does exclusive cflockings of the application scope prevent to access the scope from *everywhere*? Sample code: -- Application.cfm: cfif not structKeyExists(application, properties) or not structKeyExists(application, components) cflock scope=application timeout=20 type=exclusive

RE: [CFCDev] CFC Cohesion

2004-11-09 Thread Sam Clement
Yeah, I'm sold on OO. I've encountered too many setbacks doing things procedurally (even with trying to keep things modular). Mainly maintenance and extensibility issues. It's going to be a long road ahead, but I'm pretty sure it'll be worth it. Cheers, Sam -Original Message- From:

Re: [CFCDev] DAO Use cfdirectory cffile ?

2004-11-09 Thread Patrick McElhaney
I think it makes sense to have a single CFC that encapsulates access to the file system so that rather than having CFFILEs and CFDIRECTORYs throughout the code all file system related operations go through the CFC. To date, I've only seen that concept in practice once so I wouldn't call it a

RE: [CFCDev] DAO Use cfdirectory cffile ?

2004-11-09 Thread Nando
I think it depends ... on the application. I noticed that when i first began to move toward OO, my thinking was centered around what the code does. I've found i needed to shift my thinking a little to first ask myself what does the application do? In my mind, an object oriented design is centered

[CFCDev] How to define a property on a CFC

2004-11-09 Thread Daniel Short
Hi everyone, I'm trying to figure out how to set a property on a CFC and reference it on my calling page. In VBScript I can define as many properties as I'd like and reference them via objName.PropertyName. I'm assuming that's possible with local CFCs (I'm not intersted in web services at all on

RE: [CFCDev] How to define a property on a CFC

2004-11-09 Thread Nando
Ummm, what about a public getter? Or am i missing something? cffunction name=getMyProperty access=public returntype=string output=false cfreturn variables.getMyProperty / /cffunction cffunction name=setMyProperty access=public returntype=VOID output=false cfargument

RE: [CFCDev] How to define a property on a CFC

2004-11-09 Thread Nando
just to make it clear, in case my example isn't obvious, cfset myProperty = myObj.getMyProperty() / is on the calling page. -- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words