Model Without a Cause

I once had the opportunity to work with an automobile manufacturing companyand they were trying to do a model for their system What they were trying to do was to track parts. So, they had a model that included different kinds of parts - metal parts, rubber parts - they had a whole taxonomy and they put it into a class hierarchy. So, MetalPart was a subclass of Part then they had AluminumPart as a subclass of MetalPart. When I asked what different behavior these different subclasses had, they said "They have different properties but they don't really have any different behavior." This is what I call a Model Without a Cause. A Model Without a Cause is a model but without any particular purpose. If there's no purpose to it and no behavior with it, then just model it in a very simple way. In this case, what we did is have a Dictionary associated with one class called Part and that Dictionary held properties of that Part. This was a much simpler design and got rid of all the hierarchies in the original design.

Download