Posts

Showing posts from June, 2021

Building better serialization

Image
The "When in Rome, do as the Romans do" blog post series used serialization as an example of what happens when applying inappropriate coding patterns for some language. It demonstrated how field-based serialization does not fit well in Delphi, and how published-property-based serialization is more appropriate. But it also briefly covered some poor serialization practices, that are not language-specific. For instance, attribute-based configuration is widely used across various languages and serialization frameworks, and for the same reasons such a configuration style is a poor practice in Delphi, it is a poor practice in any other language. Knowing what constitutes a good serialization framework is important regardless of whether you are assessing an existing framework or building your own. While this article approaches serialization from a Delphi point of view, the listed principles are valid in—and can be applied to—any language. Configuration and attribute based seriali