庞锐 吕达 陈科
摘要: 针对现代软件系统中模块协同工作的通信需求,提出了一个软件通信框架的完整实现方案。通过分析软件系统中对模块通信的要求,建立统一的事件模型,完成进程间、进程内通信框架设计,并利用Qt开发库完成通信框架的软件实现。使用该软件通信框架可以减少模块通信复杂度,缩短软件通信功能开发周期,提高软件可维护性,而且利于扩展和移植。
关键词: 模块通信; 事件模型; 软件框架; 面向对象; Qt
中图分类号:TP391文献标志码:A 文章编号:1006-8228(2012)11-16-03
Design and implementation of software communication framework based on uniform event model
Pang Rui, Lv Da, Chen Ke
(SINOPEC Geophysical Research Institute, Nanjing, Jiangsu 211103, China)
Abstract: Targeted on module communication requirement of modern software system, a solution to software communication framework is proposed. By analyzing communication requirement in module development, uniform event model is constructed, and software framework for module communication is designed. Finally, by using Qt, a communication framework is realized. Using the framework can reduce module complicacy and shorten development period of communication. Furthermore, software maintenance is improved, and software transplant benefits.
Key words: module communication; event model; software framework; object-oriented; Qt
0 引言
随着计算机技术的飞速发展,各类软件系统为了满足不断变化的用户需求,提供的功能越来越多,其软件规模日益庞大,实现复杂度也越来越高。在现代软件系统中,对复杂的业务需要进行层次划分,将业务功能相对模块化,模块具备高内聚低耦合的特性,通过模块间的协同工作来提供复杂的软件功能[1]。软件模块协同工作的基础是在模块间可以传递信息数据,根据业务划分不同,可以在一个进程中只包含一个模块,通过进程间模块通信协同工作,也可以在一个进程中包含多个模块,通过进程内模块通信协同工作。那么,建立一个高效统一的进程间、进程内事件通信机制,才能保证各个模块间可靠的协作关系,降低软件系统通信复杂度,提高开发效率。
1 软件模块的通信需求分析
面向不同的行业应用领域,软件模块的通信需求是不同的。在专家决策系统中,模块间需要借助通信对同一数据进行联动操作分析;……