Just wanted to ask you about the drawbacks (I mean memory or reponse time) of using an object with more than 300 properties in the .NET Framewok (C#).
I’m thinking to separate the properties in different classes, but my problem here is that the properties don’t have a big relation between them.
I’m not going to do any complexe calculation, I will just fill the properties of the instatiaded object and send him to another program, which is going to send him back.
What do you think
EDIT
I will have just one object while running my program.
Biggest drawback: readability.
A class with 300 attributes (I assume you mean properties, as .NET attributes have a specific technical meaning) is too large to read and understand. If, as you say,
the attributes don't have a big relation between them, you should look for how they should be decomposed into smaller classes of related items.Your description:
This seems to indicate a DTO (Data Transfer Object) that needs to go between systems – I would think that again, you should think about decomposing the object into several (so if related items change, you don’t have to change the whole interface).