韩仲明 李晓明 李俊杰



摘 要:近年来,可视化编程在许多非计算机领域得到广泛的应用,但基本上属于编程语句和结构的图形化表述。本文提出了一种基于组件的软件可视化编程方法,将图标与连线组成的图形映射为软件组件模块及其相互之间的数据交互,并基于该思想,对应用软件、组件、通讯等进行可视化建模;基于XML技术,设计了可视化程序的描述文档;基于Eclipse/GEF图形编辑框架,实现了可视化编程开发平台、组件的图形化管理等功能。最后,通过具体的测试用例,证明了所开发的可视化编程平台,以及该可视化方法具有较好的可行性和通用性。
关键词:组件;可视化编程;Eclipse/GEF;图形化
中图分类号:TP311.11 文献标识码:A
文章编号:2096-1472(2021)-09-02-06
Abstract: In recent years, visual programming has been widely used in many non-computer fields, but it is basically a graphical representation of programming sentences and structures. This paper proposes a component-based software visual programming method, which maps the graphics composed of icons and wires into software component modules and their mutual data interaction. Based on this idea, visual modeling of application software, components, and communications is performed, and description document of the visual program is designed based on XML(Extensible Markup Language)technology. Based on the Eclipse/GEF (Graphical Editing Framework), functions such as a visual programming development platform and graphical management of components are realized. Finally, through specific test cases, it is proved that the developed visual programming platform and the visualization method have good feasibility and versatility.
Keywords: components; visual programming; Eclipse/GEF; graphical
1 引言(Introduction)
可視化编程是一种所见即所得的程序描述方式,它将底层代码封装成更易理解和阅读的图形化方式,以直观的形式展示程序的功能。其主要的操作是鼠标拖放相应的编程单元,通过定义的管道连线各个单元,实现单元的数据通信,而不是依赖键盘进行程序指令的输入表达。相比于传统计算机编程语言学习难度大、程序后期维护困难[1]等特点,可视化编程使得领域开发人员只需关注领域内知识,而不需要掌握程序内部的程序细节。因此,可视化技术迅速发展,并逐渐推广到虚拟仪器[2]、建筑设计[3]、编程教育[4]、电力系统[5]等领域。
目前可视化编程应用较为广泛的有Sketchpad[6-7]、LabVIEW[8]、Microsoft Robotics Studio[9]、Simulink[10-11]等。这些可视化的开发工具为领域专家快速开发应用提供了一种便捷可靠的手段。……