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

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
}
}
主站蜘蛛池模板: 双江| 沙河市| 汾西县| 祁东县| 永丰县| 龙井市| 合水县| 上蔡县| 民丰县| 横山县| 新乡县| 长阳| 泰安市| 深州市| 浏阳市| 饶阳县| 山东省| 柯坪县| 隆林| 车致| 孙吴县| 德昌县| 阿尔山市| 巴彦淖尔市| 鱼台县| 安顺市| 和平县| 遵义市| 济阳县| 景谷| 施秉县| 四会市| 汨罗市| 桦南县| 历史| 时尚| 祥云县| 贵南县| 莒南县| 永和县| 广东省|