Thanks for your reply Jaime

so am i correct in understanding that i should have a project class with 
methods such as add, remove, find etc... and properties such as name etc... and 
a test class with much the same methods and attributes, and a materials class, 
again with much the same attributes

then in order to create a collection of the objects so i can manipulate and 
query the collections i should use dao (and gateways)

is this what you mean?

apologies, i understand the basic principles of OO but this is the first time i 
am putting it into practise!!!

thanks again

>Start with just a pure object model.  Later you can pick it apart and patch
>up the bits that don't map real well to CF.
>
>So, Projects have Tests.  To me, that says that you have a Project class
>with an instance variable Tests.  Tests is a collection that has methods
>like add, remove, find etc.  The elements of the Tests collection are
>instances of the Test class.
>
>Instances of Test *may* have an instance variable Project, which points to
>the parent project - or may not.  The benefit is flexibility in navigating
>between objects, the downside is another reference you have to manage.  I
>tend to add these "back pointers" when and if I need them.
>
>Ditto for the tests->materials relationship.
>
>OK, so how do you do this in CF?  The biggest mismatches are:
>1) no built-in collection classes
>2) the need to avoid instantiating lots of objects
>
>The usual workaround is to build the "collection object" as a (or with a)
>DAO (see also Gateway) and return a CF query from any method that might
>return more than one item.  Within the DAO you can go crazy with naked SQL,
>or abstract the SQL with a framework, or both.
>
>Just keeping this brief for the moment, but ask for more detail and you
>shall receive.
>
>Jaime Metcher
>
>> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306031
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to