Cohesive Software Design – Observations

This week I have been explaining about cohesion using materials from Prag Pub Magazine and realized something ultra very simple. The definition of cohesion is “proximity should follow dependency” which make me see that cohesion(proximity) is function of dependency. So cohesion = f(dependency) and if we want to follow Single Responsibility Principle you can just iterate by every member in the class and if you can see some lack of dependency probably you should move the member in another class. I see that this is  a mechanical approach for class construction but sometimes helps.

Leave a Comment

Your email address will not be published. Required fields are marked *