- A Step Toward Realism
- Overview
- New Architecture Code Examples
- The Usual Type of Client-Side Code
- A Couple of Tweaks that Help Performance
- Collapsed Objects
- Statuses in One Single Byte
- Object Vector
- NonSerialized()
- Using "Dumb" Collections
- Another Struggle with Guids
- Oops, Maintainability Must Be Lost!
- And a Few Tweaks Not Applied Yet
- A New Test Application
- Results of the Throughput Tests
- Conclusion
Object Vector
All fieldssuch as CustomerId and OrderDateare 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.