且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何实现"类版本" (使用不同版本的同一类的)

更新时间:2023-01-10 11:00:48

停止序列化对象。关系方式存储数据。序列化的目的是在短时间内,说喜欢跨线流;不是永久存储。

Stop serializing the object. Store the data relationally. Serialization is intended for short durations, say like streaming across the wire; not permanent storage.

而不是编码领域的进级的;这听起来像你可能需要更多的字典排序结构,可以动态地拉基于存储一年数据库配置值的字段的。然后建立基于这些值的动态UI。其每年创建一个新类和测试code似乎不可能维持昂贵的。

Instead of coding the fields into the class; it sounds like you might need more of dictionary sort of structure that can dynamically pull fields based on database configuration values stored by year. Then build a dynamic UI based on those values. Having to create a new class each year and test the code seems impossibly expensive to maintain.