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

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
}
}
主站蜘蛛池模板: 顺义区| 永泰县| 关岭| 湘西| 长治市| 剑川县| 临猗县| 望谟县| 平凉市| 内丘县| 宜君县| 安西县| 岢岚县| 普洱| 滦南县| 临汾市| 剑川县| 玛曲县| 任丘市| 佛教| 东台市| 合阳县| 南投市| 和林格尔县| 光泽县| 来安县| 涟源市| 垦利县| 鄂伦春自治旗| 青冈县| 子洲县| 章丘市| 浦东新区| 梅河口市| 同仁县| 郴州市| 连城县| 西峡县| 军事| 当涂县| 洛南县|