Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
From the author of

Object Vector

All fields—such as CustomerId and OrderDate—are internally stored in an object vector in EntityBase. The main reason for this isn't performance, but to let the EntityBase take care of standard tasks without the subclasses (Order and OrderLine, for example) having to think about it at all. One example is IsValid(). The EntityBase can check the fields and subcollections, the subcollections of the subcollections, and so on without the subclasses having to do anything explicitly on their own (except checking their specific rules, of course).

But as it turns out, this detail helps reduce serialization size a little bit because there is only one variable name for several fields instead of one for each field.

  • + Share This
  • 🔖 Save To Your Account