Refactoring large data object

后端 未结 5 513
小蘑菇
小蘑菇 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:45

    One way you may be able to intelligently break up a large data class is to look at patterns of access by client classes. For example, if a set of classes only accesses fields 1-20 and another set of classes only accesses fields 25-30, maybe those groups of fields belong in separate classes.

提交回复
热议问题