G
Guest
Scenario:
In a commerce application, there is a Product class. Along with the Product
class there is a form (the text that goes in the labels of the input
controls) for inputting and updating existing instances of existing Product
objects. We'll call the second a ProductForm. Both would be data-driven.
I view these as 2 distinct classes. Product and ProductForm. Where Product
contains the business end and ProductForm contains the presentation end.
My coworker vehemently disagrees with me on this. He believes they should
be in the same class since they deal with one object, the Product. And he
has good arguments.
So, we figure perhaps hearing arguments from outside experts would shed some
light on the subject. Things that we are considering is readability,
maintainability, accessibility, and scalability.
In a commerce application, there is a Product class. Along with the Product
class there is a form (the text that goes in the labels of the input
controls) for inputting and updating existing instances of existing Product
objects. We'll call the second a ProductForm. Both would be data-driven.
I view these as 2 distinct classes. Product and ProductForm. Where Product
contains the business end and ProductForm contains the presentation end.
My coworker vehemently disagrees with me on this. He believes they should
be in the same class since they deal with one object, the Product. And he
has good arguments.
So, we figure perhaps hearing arguments from outside experts would shed some
light on the subject. Things that we are considering is readability,
maintainability, accessibility, and scalability.