Hey
Isn't there a Design Pattern who describes how to high cohesion?
I need some guidance on how and when my classes should be split up in more classes so i get some good high cohesioned classes.
Hey
Isn't there a Design Pattern who describes how to high cohesion?
I need some guidance on how and when my classes should be split up in more classes so i get some good high cohesioned classes.
I don't believe cohesion to be related to design patterns. The best way to determine when a class needs work in regards to cohesion is to use a tool to calculate complexity such as the cyclomatic complexity which as far as I know Visual Studio for example is capable of doing.
Maximising cohesion is one of the principles of good software design. Design patterns are derived from those principles. So a pattern like MVC may lead to a code base with a degree of cohesion (or at least a separation of concerns).
But High Cohesion is not a design pattern as such.