I've moved to using OOP about 8 months ago after 10 years of working with CF in a procedural manner. I have a pretty good understanding of how it works, but I always seem to struggle with composition and where in my model should the objects be created and stored. Hopefully someone can shed some light for me.
I have a simple User object that can have a single role. So I have one of the Object attributes as being of type Role. The Role object is simply a roleid, name, and permission level. The question I have is this, should I store this single relation within a relationship table in my DB or should the User table contain a roleID field? I know it is 6 of one, half dozen of another, but I wanted to see what other people are doing. Along those same lines, if I store the roleID in the user table, should my User object have both a Role and a roleID attribute (one being the object, the other being just the user field value)? Also, I am using a Service/Gateway/DAO/Bean model, should the composition be taking place in the Service layer or the Bean layer. I've been doing in the Service layer, but I am not sure if this is correct. My environment is Model-Glue/Coldspring if that helps. Thanks and sorry for the long-winded question. Dean ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310171 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

