Hello,
I'm using C#. I have a products class with fields like sku, name, description.... and methods like setSku, setDescription, setImages(products have an image attached). I was keeping these methods inside the Product class but because of the large amount of settings available to the client on how to set the sku and descriptions and images, the class was getting really, really large. There was a lot of code inside the class. So I was going to break up the large Product class into pieces like a ProductSku class, ProductDescription class...etc. The problem here is that there are some of the same fields that need to be accessed by all the classes. I starting calling the methods on those individual classes and passing in the same objects over and over again, but this didn't seem to be right. So now I decided to make one global(using Singleton pattern) CurrentProduct class that has the fields I need for all the other Product classes I created. My questions are does this sound right and what would you do?
The program I am working on just, on a basic level, takes products from one table from database1 and saves the products to a table on database2. However, the users have a lot of settings available to them for how they want the fields coming from database1 to look when they enter database2.
To Clarify: The set and get methods referenced above are not getter and setter methods. I use properties however I called them set because there is a lot of code that goes into formatting some of the fields prior to update. I understand the confusion and I apologize for not clarifying.