Good Practice question

  • Thread starter Thread starter Stan SR
  • Start date Start date
S

Stan SR

Hi,

I m working on new asp.net project.
I will use n-layer architecture.
So my question is about the business object.

I have some little classes like category, collections, etc...
each of them has 2 or 3 properties.
So is it better to use only one class file that will include all these
little classes or use one class file for each class ?

Thanks for sharing your experience.
Stan
 
Generally speaking, code is more maintainable and easier for others to work
with when each class has its own file.
Peter
 
Ysgrifennodd Peter Bromberg [C# MVP]:
Generally speaking, code is more maintainable and easier for others to work
with when each class has its own file.
Peter
I agree


Peter
 
Ysgrifennodd Peter Bromberg [C# MVP]:> Generally speaking, code is more maintainable and easier for others to work
with when each class has its own file.
Peter

I agree

Peter

Version control is also a consideration. It is much more efficient
to have each object separate in the event of rolling back to specific
versions of maintainable classes and not having changes to one class
tied to another.

Joseph
 
I agree that "generally" it's better to have them in separate files.
However, for the sake of convenience I might make an exception in a case
where I'm fairly certain these classes are unlikely to grow.
 
Back
Top