views:

100

answers:

2

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.

+1  A: 

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.

Otávio Décio
as well as external static analysis tool (also good for other factors): CCCC
bua
+3  A: 

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.

APC