modika11
Programmer
- Jan 31, 2008
- 20
Hi All,
I was wondering if you could help me out a little. I have been on here before and i must admit i do find this architecture stuff confusing at times, unfortunantly i work alone and dont have people to bounce ideas off. Where i get confused is where to put things more than anything else.
Anyway, i am developing an application which is a online branding tool. I have two classes, the first is brand and is simply a reperesentation of a brand and a product which is a representation of a product. I have an association class (as this is a many to many relationship) called brandProduct which basically has 4 properties (BrandID, ProductID, Brand (reference to a brand object), product(reference to a product object)) It also contains two methods (Insert Associtation, Delete Associtation). My confusion now comes in. What do i do when i want to get a list products that are associated with a brand, do i simply add a getProductsByBrandID method to my products class or do i create a getAssociatedProductsByBrandID in my BrandProduct Class and use the references i have to expose some additional properties (for instance create a read only proprerties productName and productImageUrl which get their data from the product reference in the class (which is lazy loaded))
I know this may be simply to you guys, but sometimes i just cant seem to get my head round these things and think so deeply into it that my head hurts
Hope some ideas will come my way.
Rob
I was wondering if you could help me out a little. I have been on here before and i must admit i do find this architecture stuff confusing at times, unfortunantly i work alone and dont have people to bounce ideas off. Where i get confused is where to put things more than anything else.
Anyway, i am developing an application which is a online branding tool. I have two classes, the first is brand and is simply a reperesentation of a brand and a product which is a representation of a product. I have an association class (as this is a many to many relationship) called brandProduct which basically has 4 properties (BrandID, ProductID, Brand (reference to a brand object), product(reference to a product object)) It also contains two methods (Insert Associtation, Delete Associtation). My confusion now comes in. What do i do when i want to get a list products that are associated with a brand, do i simply add a getProductsByBrandID method to my products class or do i create a getAssociatedProductsByBrandID in my BrandProduct Class and use the references i have to expose some additional properties (for instance create a read only proprerties productName and productImageUrl which get their data from the product reference in the class (which is lazy loaded))
I know this may be simply to you guys, but sometimes i just cant seem to get my head round these things and think so deeply into it that my head hurts
Hope some ideas will come my way.
Rob