Good Practice question

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
 
G

Guest

Generally speaking, code is more maintainable and easier for others to work
with when each class has its own file.
Peter
 
P

Peter Bradley

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
 
J

Joseph Ferris

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
 
S

Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top