Page 2 of 2

Re: diverse product support

Posted: Mon Jan 11, 2010 11:12 am
by bradford.taylor
Use the ProductImpl(possibly extending it for Factory Number). To hold each product.

Model has an attribute in Product. I would use the existing attribute in ProductImpl.
Brand could be stored in Manufacturer in ProductImpl.
Factory Number -- I'm a little unclear as to how this is used. If factory number is unique to the Product; as in a toilet of a certain brand/model has the same factory number no matter what the color, then I would extend the ProductImpl to include that attribute. If factory number is unique for different colors then I would extend the SkuImpl to include it in that.
ProductDimisions is an embedded class by product to hold the dimensions of the product. That would be used for any product sizes.
water_per_second should be implemented as a Product Attribute since it is unique to one type of product.
style should be implemented as a Product Attribute for the same reason.

Extend SkuImpl to include a color attribute. Each unique color would have it's own Sku.

Price is handled in the given SkuImpl.
Color would be implemented by extending the SkuImpl and adding the attribute. I could also be implemented using a SKU Attribute but since nearly all your products have it I would go ahead and extend SkuImpl adding color.

The assumptions I am making is that factory number, water_per_second and style are unique to the product and not the Sku. If any are are not unique to the Product, as in difference Skus have different values, then I would use the same strategy applied to your Sku instead of the Product.

Let me know if you have any questions.

Re: diverse product support

Posted: Wed Jan 13, 2010 5:10 am
by Dennis
thank you for your support.
I'll try it out and get back to you