Let's say I have a class Employee
with a huge amount of fields. And I have a lot of actions related to db with it like CRUD, filter etc.
In MVC pattern all of these stuff could be placed into one class of Model part. But again, what if I have a lot of fields and a lot of actions. How to properly split to classes the basic object staff (fields, basic methods: getters & setters, toString etc.) and the actions. Like Employee
and EmployeeActions
? Or any best approach? Need your experience)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…