Refactoring large data object

后端 未结 5 514
小蘑菇
小蘑菇 2021-01-31 12:13

What are some common strategies for refactoring large \"state-only\" objects?

I am working on a specific soft-real-time decision support system which do

5条回答
  •  星月不相逢
    2021-01-31 12:44

    Actually this looks like a frequent problem that game developers face, bloated classes holding numerous variables and methods because of a deep inheritance tree etc.

    There's this blog post about how and why to select composition over inheritance, maybe it would help.

提交回复
热议问题