Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
Ключевым звеном слабосвязной архитектуры является выделение центрального компонента— это вообще в некакие рамки не вкладываеться…
A routine like sin() is loosely coupled because everything it needs to know is passed in to it with one value representing an angle in degrees. A routine such as InitVars( var 1, var2, var3, ..., varN ) is more tightly coupled because, with all the variables it must pass, the calling module practically knows what is happening inside InitVars(). Two classes that depend on each other’s use of the same global data are even more tightly coupled.
[...]
A routine that takes one parameter is more loosely coupled to modules that call it than a routine that takes six parameters. A class with four welldefined public methods is more loosely coupled to modules that use it than a class that exposes 37 public methods.
[...]
In short, the more easily other modules can call a module, the more loosely coupled it is…
Каждую программу имеет смысл писать с учетом того, что некто будет сопровождать ее… Аксиома, не правда-ли?
Всегда присутствует сооблазн сесть и написать решение одним махом, из головы
Про абстрагирование, слабосвязную архитектуру и проектирование в целом