Develpreneur: Become a Better Developer and Entrepreneur
Cohesion or Coupling - Essential Architecture Decisions
17 Feb 2020
A critical design decision in the object-oriented world is whether to choose cohesion or coupling. These two approaches are not mutually exclusive. However, it is rare to see a mix of the two. Therefore, this decision in the architecture will profoundly impact the rest of the project. Big or Small, Cohesion or Coupling It helps to set the stage for this discussion. The decision comes down to either building your system with small components or large (more full-featured) ones. The result can range from microservices up to a monolithic class that stands alone. A single object option is a cohesive approach, while coupling uses smaller classes that work together. Pros and Cons Each of these approaches has pros and cons. Thus, we need to evaluate which option is better for our specific situation. While most solutions can be implemented using either method, some will only be useful if done with one of the options. In general, considerations like performance, quality, and maintainability will be impacted by this choice. Fast or Flexible, Not Both There are several nuances involved in each of these options. Nevertheless, the decision will often boil down to building a system that is fast or that is flexible. This situation is not an uncommon trade-off that needs to be decided on during the architecture (and design) phase. A cohesive solution will often perform faster and tighter. On the other hand, a coupling approach is more flexible at the cost of overhead and speed. Either of these two options can be implemented poorly. Thus, selecting one or the other does not guarantee a specific outcome. However, it is easier to stay simple and fast using cohesion. Likewise, the coupling approach tends to be easy to adjust and extend.
No persons identified in this episode.
This episode hasn't been transcribed yet
Help us prioritize this episode for transcription by upvoting it.
Popular episodes get transcribed faster
Other recent transcribed episodes
Transcribed and ready to explore now
3ª PARTE | 17 DIC 2025 | EL PARTIDAZO DE COPE
01 Jan 1970
El Partidazo de COPE
13:00H | 21 DIC 2025 | Fin de Semana
01 Jan 1970
Fin de Semana
12:00H | 21 DIC 2025 | Fin de Semana
01 Jan 1970
Fin de Semana
10:00H | 21 DIC 2025 | Fin de Semana
01 Jan 1970
Fin de Semana
13:00H | 20 DIC 2025 | Fin de Semana
01 Jan 1970
Fin de Semana
12:00H | 20 DIC 2025 | Fin de Semana
01 Jan 1970
Fin de Semana