官术网_书友最值得收藏!

Tight coupling

Most legacy software applications are known to be tightly coupled, with little or no flexibility and modularity. Tightly coupled software components lead to a rigid code base which can be difficult to modify, extend, and maintain. As most software applications evolve over time, big maintenance issues are created when components of applications are tightly coupled. This is due to the changes in requirements, user's business processes, and operations.

Third-party libraries and frameworks reduce development time and allow developers to concentrate on implementing users' business logic and requirements without having to waste valuable productive time reinventing the wheel through implementing common or mundane tasks. However, at times, developers tightly couple the applications with third-party libraries and frameworks, creating maintenance bottlenecks that require great efforts to fix when the need arises to replace a referenced library or framework.

The following code snippet shows an example of tight coupling with a third-party smpp library:

public void SendSMS()
{
SmppManager smppManager= new SmppManager();
smppManager.SendMessage("0802312345","Hello", "John");
}

public class SmppManager
{
private string sourceAddress;
private SmppClient smppClient;

public SmppManager()
{
smppClient = new SmppClient();
smppClient.Start();
}

public void SendMessage(string recipient, string message, string senderName)
{
// send message using referenced library
}
}
主站蜘蛛池模板: 永吉县| 嘉禾县| 贵港市| 三河市| 连山| 沐川县| 南江县| 建始县| 安远县| 东乌珠穆沁旗| 淮安市| 凌海市| 娱乐| 永昌县| 德化县| 三台县| 香港| 瓦房店市| 红桥区| 琼结县| 安多县| 尤溪县| 万山特区| 大同县| 遂平县| 汶川县| 林芝县| 清涧县| 马公市| 贵溪市| 宜黄县| 定陶县| 临高县| 保山市| 巫溪县| 灵丘县| 台东县| 观塘区| 阿合奇县| 城步| 策勒县|