运行时类映射 - 在启动时还是首次使用? [英] Runtime class mapping - at startup or on first use?
问题描述
我需要将我的应用程序中的许多不同的类映射到负责将它们持久化到后端的类的特定实例。
这在概念上类似于实体框架创建它与 DbModelBuilder [ ^ ] class。
我应该在应用程序启动时映射所有类吗? (它们可以通过接口和属性标签识别)或者是否应该在首次使用特定类时进行映射?
(或两者都可配置?)
我尝试了什么:
问我邻居的宠物狗 - 他的回复在理智上没有说服力。
需要最终用户技术人员的意见: - )
如果它是一个UI类型的应用程序,这样做按需可能会影响用户认知,我会去'启动'路线 - 但如果它是一个服务类型的应用程序,我认为没有理由'首次使用'不够好
(你经常给我们很多东西,所以也许你的邻居的宠物狗可能是一个更好的选择 - 一个用于'创业'的低音,两个低音用于'按需',以及'无论'如果他咬你): - )
I have the need to map a number of different classes in my application to specific instances of a class that is in charge of persisting them to/from the back end.
This is conceptually similar to the way Entity Framework creates it's mappings with the DbModelBuilder [^] class.
Should I map all the classes at application startup? (They are identifiable by an interface and an attribute tag) or should the mapping occur when a particular class is first used?
(or both, configurable?)
What I have tried:
Asked my neighbour's pet dog - his reply was not intellectually convincing.
Need end-user technologists opinions :-)
If its a UI type application where doing this 'on-demand' may impact the user perception, I would go the 'startup' route - but if it's a service type application, I see no reason why 'on first use' wouldnt be good enough
(you havnt given us a lot to go on, so maybe your neighbour's pet dog might have been a better bet - one woof for 'startup', two woofs for 'on demand', and 'whatever' if he bites you) :-)
这篇关于运行时类映射 - 在启动时还是首次使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!