Tags "cohesion" Result

What is high cohesion and how to use it / make it?

I'm learning computer programming and at several places I've stumbled upon the concept of cohesion and I understand that it is desirable for a software to have "high cohesion" but what does it mean? I'm a Java, C and Python programmer learning C from the book C Primer which mentions cohesion without having it in the index, could you point me to

it1352 1 2020-07-19

Going bananas with loose coupling and dependency injection

With the latest additions to our dependency injection framework (annotations in spring), the marginal cost of creating DI-managed components seems to have hit some critical new threshold. While there previously was an overhead associated with spring (tons of XML and additional indirections), dependency injection seems to have started going where lo

it1352 0 2019-05-15

Cohesion and Decoupling

Can anyone tell me what are Cohesion and Decoupling? I found coupling but there is no Decoupling anywhere. I need to learn their meanings. Any help will be appreciated. Thanks for replying. Solution That article from Aaron is very good for understanding, also I'd recommend that you read manning publications Spring in Action book, they give very g

it1352 0 2019-05-22

Coupling and cohesion

I'm trying to boil down the concepts of coupling and cohesion to a concise definition. Can someone give me a short and understandable explanation (shorter than the definitions on Wikipedia here and here)? How do they interact? Thanks. Anybody have a good, short example? Solution Coupling Loose: You and the guy at the convenience store. You com

it1352 0 2019-05-08

Using Static method and variables - Good vs Bad

I am developing C# and asp.net web application. I have general class called utilities, I have lot of public and static variables in this public utilities class. Since this number is gradually increasing, I want to know is it good practice to store utilities methods and variable as public static. Example of my code public class utilities { p

it1352 1 2019-05-10

What can be alternative metrics to code coverage?

Code coverage is propably the most controversial code metric. Some say, you have to reach 80% code coverage, other say, it's superficial and does not say anything about your testing quality. (See Jon Limjap's good answer on "What is a reasonable code coverage % for unit tests (and why)?".) People tend to measure everything. They need comparisons,

it1352 0 2020-10-04

The Interface Segregation Principle

The Interface Segregation Principle (ISP) says that many client specific interfaces are better than one general purpose interface. Why is this important? Solution ISP states that: Clients should not be forced to depend on methods that they do not use. ISP relates to important characteristics - cohesion and coupling. Ideally your components

it1352 0 2019-05-15