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

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
}
}
主站蜘蛛池模板: 乐陵市| 建水县| 自贡市| 岑巩县| 永安市| 开原市| 商南县| 莒南县| 雷波县| 新巴尔虎左旗| 台中市| 台山市| 永德县| 三原县| 枣强县| 灌云县| 渝中区| 松桃| 钟祥市| 沐川县| 开平市| 资溪县| 南澳县| 德庆县| 郑州市| 贡山| 台中市| 普安县| 崇礼县| 扶余县| 万年县| 嘉定区| 安图县| 威海市| 沁源县| 贡觉县| 凌云县| 台南县| 蓬莱市| 柳林县| 理塘县|