Afternoon/Morning Chaps, Whats the 'correct' way to handle retrieving data from persistance when working in an OOP type methodology? I'll try and explain a little example of what i'm trying to achieve, as i'm not quite sure of how I should be utilizing my DAO's and Gateways.
I have a certain amount of statistical data stored in my database, and I want to pull this out and display it to the user, however, I also want to make the addition of some mathmatical calculations on the data before its provided to the user, and this will add a few additional columns of data, the idea would be to build the query into an array of structs along with the calculated math. This can then be returned to the user for presentation. Now, how should I be loading the data from the database into my cfc that does the calculations and returns them to the data, should i be requesting the gateway myself and passing it a bean which it then loads its results into, or should I have my stats.cfc call the gateway for me inside the getCalcStats() method? The idea would be to call as few functions as possible, and just have it return me a lovely set of mathified stats :-D I'm still new and a little vague to how I should be approaching this kind of thing, Thanks for any advice chaps, NOTE: First one with the correct answer wins a free pint of beer, warm or cold, whichever is you preferance :-D Rob ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 by AdobeĀ® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270953 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4