蔡瑞 彭文魁
摘要:为解决遥控器的多样性带来的界面开发问题,提出一种针对遥控器界面的通用描述方法,基于该描述方法的语法实现了界面自动生成引擎。实验表明,通过对不同应用系统的遥控界面进行描述产生遥控描述文件,并由界面自动生成引擎解析生成遥控界面,实现了遥控器界面的自动生成,提高遥控器界面的开发效率,减少开发和维护成本。
关键词:遥控器;XML;界面自动生成
中图分类号:TP391文献标识码:A文章编号:1009-3044(2012)15-3739-03
The Implementation of UI Auto-generate for Remote Controller Based on XML
CAI Rui1, PENG Wen-kui2
(1.Guangdong Vocational Institute of Public Administration, Guangzhou 510800, China; 2. Ericsson, Guangzhou 510000, China)
Abstract: To easy the way of developing user interface for various kinds of remote controller, design a common description method for the user interface of remote controller, implement the user interface auto-generate engine based on the description method. In experiment, using the description method to generate the description file for different applications, auto-generate engine analysis the files and generate the user interface for remote controller automatically, the efficiency of UI development is improved, and the cost spent on development and maintenance is reduced.
Key words: remote controller; XML; user interface auto-generate
随着网络的发展和智能手持设备的普及,越来越多的遥控器应用出现在手持设备上。不同的受控终端都有不同的遥控功能以及遥控器界面,因此,针对不同的受控终端,需要开发不同的遥控器程序,开发和维护成本较高。界面自动生成技术为解决上述问题提供了可行的方向,在不改变遥控器程序的设计和功能的前提下,实现对用户遥控界面构造的调整。
界面自动生成技术将用户界面依照协议语法转化为数据模型,根据协议语法的规则实现界面生成器,通过解析数据模型,界面生成器自动生成用户界面;遵循相同的协议语法,不同的用户界面可以转化为不同的数据模型实例,都可以由界面生成器解析生成用户界面。可以看出,协议语法是数据模型和界面生成器之间的桥梁。针对遥控器界面的特点,本文提出一种基于XML语言的遥控描述方法作为协议语法,并在J2ME平台上完成了界面自动生成引擎,从而实现遥控器界面自动生成。……