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

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
}
}
主站蜘蛛池模板: 奎屯市| 富裕县| 分宜县| 洮南市| 长子县| 万源市| 门源| 建德市| 浦北县| 房产| 铁岭县| 上高县| 宾川县| 元氏县| 乐安县| 仪征市| 高安市| 龙山县| 彩票| 和林格尔县| 自贡市| 沙湾县| 包头市| 淮北市| 长沙县| 冷水江市| 象州县| 普宁市| 赤水市| 大理市| 谢通门县| 兴海县| 泸州市| 新津县| 昌邑市| 奈曼旗| 夏河县| 闽侯县| 古浪县| 宿松县| 错那县|