I would like to understand the difference between separation of concerns and loose coupling.
Is it true that coding by separation of concerns gives a loosely coupled code?
Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Coupling is about how much each component knows about other components.
Separation of concerns is about separating different aspects of functionality in different components. You can separate different aspects, but make components tight coupled (i.e. use concrete classes instead of abstractions).
UPDATE: cohesion shows how closely-related responsibilities of component. When you separate different concerns in different components, then responsibilities of component are strongly-related, thus you have high cohesion.