D
Doogman
I have some questions about performance efficiency in C# on compact
framework in relation to Object design.
Lets say I am creating two classes, Car and Wheel.
Now, is it better performance to create a variable of WheelID in both
classes and use that ID as an index to wheel when needed? Or should I
create a Wheel object in Car?
I would think that it is much better design to go with option 2, but what
if I wanted to change all occurences of Wheel in all Cars? Would it not
be more efficient to change a particular WheelID that is referenced by
all cars than to parse all Cars for that particular Wheel and change each
and every occurence? That way on any retrieval of WheelID x, the change
would be reflected. Also, wouldn't this improve storage efficiency on
small devices?
Visually it is like Object Oriented Design versus a Database Relationship
design if you will. Indexing vs Objects.
Any and all input is appreciated and I hope you get what I am trying to
understand.
doogman
framework in relation to Object design.
Lets say I am creating two classes, Car and Wheel.
Now, is it better performance to create a variable of WheelID in both
classes and use that ID as an index to wheel when needed? Or should I
create a Wheel object in Car?
I would think that it is much better design to go with option 2, but what
if I wanted to change all occurences of Wheel in all Cars? Would it not
be more efficient to change a particular WheelID that is referenced by
all cars than to parse all Cars for that particular Wheel and change each
and every occurence? That way on any retrieval of WheelID x, the change
would be reflected. Also, wouldn't this improve storage efficiency on
small devices?
Visually it is like Object Oriented Design versus a Database Relationship
design if you will. Indexing vs Objects.
Any and all input is appreciated and I hope you get what I am trying to
understand.
doogman