Home All Groups Group Topic Archive Search About

Many Classes Vs Many Methods in a single class

Author
11 Mar 2006 9:09 AM
James
Many classes vs Many methods in a single class, which is a better way to
structure applications?

Regards
James

Author
11 Mar 2006 9:46 AM
Jon Skeet [C# MVP]
James <arl***@hotmail.com> wrote:
> Many classes vs Many methods in a single class, which is a better way to
> structure applications?

Well, I generally favour small classes over large ones, but it really
depends on what you're doing. Sometimes a class just naturally ends up
large - and sometimes you end up with some very small ones which are
still perfect for the job.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Are all your drivers up to date? click for free checkup

Author
11 Mar 2006 10:10 AM
Michael Nemtsev
Hello James,

There is a wrong approach to assess the size based on numbers of methods/classes.
You need to assess it based on the logic, and don't mess all in one. Each
class needs to mean smth specific and be self described
with the names of class and methods.

I found small classes with small methods is the best approach, it gives you
decoupling of system, clear understanding and team development flexibility


J> Many classes vs Many methods in a single class, which is a better way
J> to structure applications?
J>
J> Regards
J> James
---
WBR,
Michael  Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Bookmark and Share