CN101246424A - Menu automatic generation system and method for based on file - Google Patents
Menu automatic generation system and method for based on file Download PDFInfo
- Publication number
- CN101246424A CN101246424A CNA2008100654081A CN200810065408A CN101246424A CN 101246424 A CN101246424 A CN 101246424A CN A2008100654081 A CNA2008100654081 A CN A2008100654081A CN 200810065408 A CN200810065408 A CN 200810065408A CN 101246424 A CN101246424 A CN 101246424A
- Authority
- CN
- China
- Prior art keywords
- menu
- information
- interface
- file
- configuration
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- User Interface Of Digital Computer (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a menu automatic generation system and method based on document. The method parses configuration files and automatically generates interface menu of user via interface generation engine, realizes class unit via configuration which is automatically loaded and invoked by reflex mechanism. The program menu and interface generated in this way has good maintainability and expandability and provides event handling function of the interface menu so that the interface built in the mechanism can satisfy complicated consumer buyer wants and needs. The model design realizes partly separation of user interface and user logic traffic function, reduces the workload of the developers, and reduces the file modification collision caused by common work of a plurality of developers.
Description
Technical field
The present invention relates to a kind ofly under system framework, interface menu and function be by external file configuration and the technology that generates automatically, is mainly used in menu design, functional tree design, the design of message display window etc. in the teledata communication network management system.
Background technology
At present in communication system, make up one can manage, can run, analyzable network is very important, wherein network management system is the very important instrument of keeper to whole network management, by network management system can be easily to system be configured, management such as performance, safety.Network management system is along with its status of construction of network is more and more important.The fast development of network just requires network management system can adapt to the quick variation of network, to satisfy rapidly user's requirement.Wherein design, the exploitation to webmaster just proposes very high requirement.At first, webmaster will satisfy the requirement that the user constantly changes.Secondly webmaster is wanted smooth upgrade renewal constantly.Satisfy these conditions, what it was the most basic a bit will satisfy exactly: how to design the function menu that constantly satisfies customer requirements, and how these functions can carry out dynamic load and renewal easily.
Traditional as shown in Figure 1 interface menu functional development realization flow and principle schematic.Usually all be the demand of at first gathering the user, update routine designs relevant menu in program then, realizes function according to menu then.Require the developer must touch the code of total system, could revise on this basis.Such alter mode, will cause several bad consequences: be that renewal speed is slow on the one hand, the development amount is bigger, and efficient is low, on the other hand, system revises pretty troublesome, changes a bit and all will recompilate, and revises, test, issue, system update is very complicated.So the present this pattern of designing and developing exists the waste great amount of manpower and material resources, and code and the bad maintenance and expansion of function.
Summary of the invention
The present invention proposes a kind of menu automatic generation system and method based on file, the function that menu and this menu will be realized is configured and stores by configuration file, automatically generate interface menu by parsing, solved that the exploitation of menu and corresponding function lacks technical matterss such as dirigibility, extendability, inefficiency in the prior art configuration file.
The menu automatic generation system based on file that the present invention proposes comprises:
Machine interface generation engine is used for configuration file is resolved, and therefrom obtains interface configuration information; Generate menu and interface information, menu and interface assembly are monitored;
At least one realizes the class unit, is used for being loaded and calling at menu operation, to realize corresponding logic function.
Preferably, described realization class unit is loaded and calls by reflex mechanism in menu operation.
Preferably, the interface configuration information obtained from configuration file of described machine interface generation engine comprises at least a following information: menu information, tool bar information, function menu tree information and information display window information.
Preferably, described configuration file is the configuration file of xml form, and described realization class unit is loaded and calls by Java language class reflex mechanism.
The menu based on file that the present invention proposes generates method automatically, comprises the steps:
1) machine interface generation engine is resolved configuration file, generates menu and interface information;
2) operation information of reception interface menu, and load and call corresponding realization class unit, move this realization class unit to realize corresponding logic function.
Preferably, described step 1) specifically comprises following processing procedure:
11) element information in the configuration file is resolved, and carry out the layout of menu according to the order of configuration;
12), generate menu and interface information according to the configuration information that parses;
13) menu and interface assembly are monitored.
Preferably, the configuration information that parses in the described step 12) comprises at least a following information: menu information, tool bar information, function menu tree information and information display window information.
Preferably, be specially described step 2): load and call corresponding realization class unit by reflex mechanism.
Preferably, described resolved configuration file is the configuration file of xml form, and described realization class unit is loaded and calls by Java language class reflex mechanism.
The present invention resolves configuration file and produces the users' interfaces menu automatically by machine interface generation engine, realize the class unit by configuration simultaneously, automatically load and call by reflex mechanism, just there are good maintainability and extensibility in programs menu of Sheng Chenging and interface like this, the event handling function of interface menu is provided simultaneously, and complicated user's request can be satisfied in the interface that makes this mechanism construction come out.The realization of this modelling the part that realizes of user interface and user logic business function separates, minimizing developer's workload reduces that a plurality of developers work together and the file modification conflict that causes.
Description of drawings
Fig. 1 is a prior art interface menu functional development schematic diagram;
Fig. 2 is that menu automatic generation system of the present invention is realized schematic diagram;
Fig. 3 is that menu of the present invention generates method preferred embodiment realization flow figure automatically.
Embodiment
Menu automatic generation system and method that the present invention proposes have realized dirigibility and dilatancy in the present exploitation preferably, specify below in conjunction with accompanying drawing and enforcement use-case.
Fig. 2 is that system of the present invention realizes schematic diagram.The present invention is based on the menu automatic generation system of file, mainly comprise: the configuration file of store configuration information, the realization class unit of realization menu logic function, and the machine interface generation engine that generates interface menu.Wherein machine interface generation engine is in the core status of whole menu automatic generation system, will resolve the user profile class relevant with mapping on the one hand, will generate the menu of user's request on the other hand and monitor menu event, calls the realization class of configuration then.The configuration information that configuration file comprised mainly comprises: menu information, tool bar information, function menu tree information and information display window information.Wherein menu information comprises: pad name, menu level, the realization class of menu correspondence etc.; Tool bar information comprises: tool bar title, icon etc.; Function menu tree information comprises: the information such as class that tree node type, tree node title, tree node are realized.The system designer can revise or add function items such as menu, tool bar, functional tree menu, specifies then and realizes class.Concrete realization class unit can be distributed to different people and develop, and realizes the logic function of class unit realization menu by operation.Such exploitation allocation scheme has realized the weak coupling relation of system module.
Below pass through one based on the xml format configuration file, setup menu and corresponding function project implementation example illustrate specific implementation process of the present invention in network management system.Realization flow figure as shown in Figure 3 comprises following processing procedure:
1, a group system designer at first wants the analysis user demand, add which functional item.
Another group developer writes the realization class unit that is used to realize the menu logic function.
2, according to the XML file of the form system for writing and compiling menu correspondence of appointment.
2a, in the xml configuration file, at first determine father's menu, perhaps newly-built father's menu is set up a submenu then.
The constructor of the icon of 2b, the title (name that interface menu shows) of filling in pad name (also can think inner ID), menu demonstration, menu correspondence, the shortcut of menu, the corresponding component type that realizes of menu, machine interface generation engine, the class name (also can dispose is outside program or order) of realization.
3, start the interface menu automatic creation system.
4, during system start-up, machine interface generation engine can read and resolve the configuration file of xml form, according to the generation menu element in the xml file, with the configuration information layout in system interface.
5, interface engine loads the action listener of assembly such as menu, and the class name of these action listeners is exactly the realization class name of the correspondence described in the xml file.
6, when the trigger message of the realization class that receives this menu correspondence;
7, machine interface generation engine calls the realization class of this incident correspondence by the Java language reflex mechanism, realizes predefined logic realization function.
The Java language reflex mechanism provides a kind of method of dynamic link program assembly.It allows the object (according to the security restriction) of program creation and any class of control, need not hard coded target class in advance.These characteristics make reflection be specially adapted to create the storehouse of cooperating with object in very common mode.For example, reflection is used in the framework of database, xml or other foreign format through the lasting storage object of being everlasting.The Java reflection is very useful, and it makes class and data structure can dynamically retrieve relevant information by name, and allows these information of operation in running program.This characteristic of Java is very powerful, and is some other language commonly used, does not possess as C, C++, Fortran or Pascal etc.Use the inner reality of reflection meeting fuzzy program to want occurrence, reflex mechanism has been walked around the maintenance issues that the technology of source code is brought.
In sum, the mode of the automatic generation interface menu that the present invention proposes, by configuration file configuration-system function menu, and the method for the realization class of configuration menu action listener correspondence, the interface is generated has realized changing fast according to user's request, interface norm is configuration easily also, is convenient to safeguard and upgrade.By this method, can realize effectively that INTERFACE DESIGN separates the degree of coupling of code in the reduction program effectively with logic business.
Above content be in conjunction with concrete preferred implementation to further describing that the present invention did, can not assert that concrete enforcement of the present invention is confined to these explanations.For the general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, can also make some simple deduction or replace, all should be considered as belonging to protection scope of the present invention.
Claims (9)
1. the menu automatic generation system based on file is characterized in that, comprising:
Machine interface generation engine is used for configuration file is resolved, and therefrom obtains interface configuration information; Generate menu and interface information, menu and interface assembly are monitored;
At least one realizes the class unit, is used for being loaded and calling at menu operation, to realize corresponding logic function.
2. the menu automatic generation system based on file according to claim 1 is characterized in that, described realization class unit is loaded and calls by reflex mechanism in menu operation.
3. the menu automatic generation system based on file according to claim 1 and 2, it is characterized in that the interface configuration information that described machine interface generation engine obtains comprises at least a following information from configuration file: menu information, tool bar information, function menu tree information and information display window information.
4. the menu automatic generation system based on file according to claim 2 is characterized in that, described configuration file is the configuration file of xml form, and described realization class unit is loaded and calls by Java language class reflex mechanism.
5. the menu based on file generates method automatically, it is characterized in that, comprises the steps:
1) machine interface generation engine is resolved configuration file, generates menu and interface information;
2) operation information of reception interface menu, and load and call corresponding realization class unit, move this realization class unit to realize corresponding logic function.
6. the menu based on file according to claim 5 generates method automatically, it is characterized in that described step 1) specifically comprises following processing procedure:
11) element information in the configuration file is resolved, and carry out the layout of menu according to the order of configuration;
12), generate menu and interface information according to the configuration information that parses;
13) menu and interface assembly are monitored.
7. the menu based on file according to claim 6 generates method automatically, it is characterized in that the configuration information that parses in the described step 12) comprises at least a following information: menu information, tool bar information, function menu tree information and information display window information.
8. the menu in file according to claim 5 generates method automatically, it is characterized in that described step 2) in be specially: load and call corresponding realization class unit by reflex mechanism.
9. the menu in file according to claim 8 generates method automatically, it is characterized in that, described resolved configuration file is the configuration file of xml form, and described realization class unit is loaded and calls by Java language class reflex mechanism.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008100654081A CN101246424A (en) | 2008-02-22 | 2008-02-22 | Menu automatic generation system and method for based on file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008100654081A CN101246424A (en) | 2008-02-22 | 2008-02-22 | Menu automatic generation system and method for based on file |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101246424A true CN101246424A (en) | 2008-08-20 |
Family
ID=39946894
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2008100654081A Pending CN101246424A (en) | 2008-02-22 | 2008-02-22 | Menu automatic generation system and method for based on file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101246424A (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010043172A1 (en) * | 2008-10-17 | 2010-04-22 | 华为技术有限公司 | Method and device for service scheduling |
CN101833467A (en) * | 2010-05-14 | 2010-09-15 | 华为终端有限公司 | Method and equipment for adding menu items into Android menu |
CN101872282A (en) * | 2010-05-25 | 2010-10-27 | 中兴通讯股份有限公司 | User interface generating method and device and mobile terminal |
CN102033742A (en) * | 2009-09-29 | 2011-04-27 | 鸿富锦精密工业(深圳)有限公司 | Electronic device with user interface automatic generation function and method |
CN101408843B (en) * | 2008-11-18 | 2012-05-09 | 广东威创视讯科技股份有限公司 | Method and apparatus for generating program menu |
CN103116499A (en) * | 2013-03-11 | 2013-05-22 | 南京因泰莱电器股份有限公司 | Configuration method of menu |
CN103902256A (en) * | 2012-12-24 | 2014-07-02 | 航天信息股份有限公司 | Interface generating system and method |
CN104090749A (en) * | 2014-05-30 | 2014-10-08 | 爱培科科技开发(深圳)有限公司 | Processing method and system for updating and changing interface theme of WinCE product |
CN104503769A (en) * | 2015-01-07 | 2015-04-08 | 山东鲁能智能技术有限公司 | Character dot matrix liquid crystal interface implementation method based on XML (extensive markup language) configuration file |
CN105116734A (en) * | 2015-06-26 | 2015-12-02 | 青岛海信移动通信技术股份有限公司 | Control device and device for intelligent household electrical appliance and control terminal |
CN106406844A (en) * | 2015-08-03 | 2017-02-15 | 腾讯科技(深圳)有限公司 | A method and a device for realizing a communication interaction platform official account menu |
CN106557316A (en) * | 2016-10-28 | 2017-04-05 | 南京国电南自电网自动化有限公司 | Based on 61850 site protective relaying device menu modeling method |
CN105224353B (en) * | 2014-06-26 | 2018-11-06 | 北京北方华创微电子装备有限公司 | The method and system of dynamic load interface navigation |
CN114546113A (en) * | 2022-02-15 | 2022-05-27 | 深圳Tcl新技术有限公司 | Menu operation method and device, storage medium and electronic equipment |
CN114845173A (en) * | 2022-05-30 | 2022-08-02 | 杭州国芯科技股份有限公司 | Method for generating main menu of set top box |
-
2008
- 2008-02-22 CN CNA2008100654081A patent/CN101246424A/en active Pending
Cited By (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010043172A1 (en) * | 2008-10-17 | 2010-04-22 | 华为技术有限公司 | Method and device for service scheduling |
CN101408843B (en) * | 2008-11-18 | 2012-05-09 | 广东威创视讯科技股份有限公司 | Method and apparatus for generating program menu |
CN102033742A (en) * | 2009-09-29 | 2011-04-27 | 鸿富锦精密工业(深圳)有限公司 | Electronic device with user interface automatic generation function and method |
US9319508B2 (en) | 2010-05-14 | 2016-04-19 | Huawei Device Co., Ltd. | Method and device for adding menu item to android menu |
CN101833467A (en) * | 2010-05-14 | 2010-09-15 | 华为终端有限公司 | Method and equipment for adding menu items into Android menu |
CN101833467B (en) * | 2010-05-14 | 2013-12-04 | 华为终端有限公司 | Method and equipment for adding menu items into Android menu |
US9703454B2 (en) | 2010-05-14 | 2017-07-11 | Huawei Device Co., Ltd. | Method and device for adding menu item to ANDROID menu |
CN101872282A (en) * | 2010-05-25 | 2010-10-27 | 中兴通讯股份有限公司 | User interface generating method and device and mobile terminal |
CN103902256A (en) * | 2012-12-24 | 2014-07-02 | 航天信息股份有限公司 | Interface generating system and method |
CN103902256B (en) * | 2012-12-24 | 2017-05-10 | 航天信息股份有限公司 | Interface generating system and method |
CN103116499A (en) * | 2013-03-11 | 2013-05-22 | 南京因泰莱电器股份有限公司 | Configuration method of menu |
CN104090749B (en) * | 2014-05-30 | 2015-09-16 | 爱培科科技开发(深圳)有限公司 | A kind of WinCE Product Interface theme upgrades transform process method and system |
CN104090749A (en) * | 2014-05-30 | 2014-10-08 | 爱培科科技开发(深圳)有限公司 | Processing method and system for updating and changing interface theme of WinCE product |
CN105224353B (en) * | 2014-06-26 | 2018-11-06 | 北京北方华创微电子装备有限公司 | The method and system of dynamic load interface navigation |
CN104503769A (en) * | 2015-01-07 | 2015-04-08 | 山东鲁能智能技术有限公司 | Character dot matrix liquid crystal interface implementation method based on XML (extensive markup language) configuration file |
CN104503769B (en) * | 2015-01-07 | 2017-06-20 | 山东鲁能智能技术有限公司 | A kind of character pattern liquid crystal interface implementation method based on XML configuration file |
CN105116734A (en) * | 2015-06-26 | 2015-12-02 | 青岛海信移动通信技术股份有限公司 | Control device and device for intelligent household electrical appliance and control terminal |
CN106406844A (en) * | 2015-08-03 | 2017-02-15 | 腾讯科技(深圳)有限公司 | A method and a device for realizing a communication interaction platform official account menu |
CN106406844B (en) * | 2015-08-03 | 2020-12-01 | 腾讯科技(深圳)有限公司 | Method and device for realizing public number menu of communication interaction platform |
CN106557316A (en) * | 2016-10-28 | 2017-04-05 | 南京国电南自电网自动化有限公司 | Based on 61850 site protective relaying device menu modeling method |
CN106557316B (en) * | 2016-10-28 | 2019-11-12 | 南京国电南自电网自动化有限公司 | Based on 61850 site protective relaying device menu modeling method |
CN114546113A (en) * | 2022-02-15 | 2022-05-27 | 深圳Tcl新技术有限公司 | Menu operation method and device, storage medium and electronic equipment |
CN114845173A (en) * | 2022-05-30 | 2022-08-02 | 杭州国芯科技股份有限公司 | Method for generating main menu of set top box |
CN114845173B (en) * | 2022-05-30 | 2023-08-22 | 杭州国芯科技股份有限公司 | Main menu generation method of set top box |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101246424A (en) | Menu automatic generation system and method for based on file | |
CN102810057B (en) | A kind of method of log | |
CN102375731B (en) | Coding-free integrated application platform system | |
CN100435094C (en) | System and method for building mixed mode execution environment for component applications | |
US7359990B2 (en) | Editing files of remote systems using an integrated development environment | |
Hoheisel | User tools and languages for graph‐based Grid workflows | |
US7720953B2 (en) | System and method of data source detection | |
Röttger et al. | Cqml+: Enhancements to cqml | |
KR100959173B1 (en) | Component architecture | |
US20090070783A1 (en) | Condition-Based Event Filtering | |
US20050193361A1 (en) | System and method for presentation of wireless application data using repetitive UI layouts | |
CN103593192B (en) | A kind of algorithm integration based on SLURM scheduling and evaluating system and method | |
US8966442B2 (en) | Custom code innovation management | |
CN101256492A (en) | Software development method and system for executing model drive structure | |
US20080250071A1 (en) | Systems and methods for business applications | |
CN110362363B (en) | Method for realizing terminal application control based on runtime model | |
CN101266542A (en) | Method and device for loading component in container | |
CN103268226A (en) | Test script file generation method and device | |
CN110362301B (en) | Processing method for terminal application behavior reflection | |
US6658644B1 (en) | Services-based architecture for a telecommunications enterprise | |
US8862637B2 (en) | Generating data access operations based on a data model using a data services model | |
CN102946415A (en) | Implementation method and device for local application of mobile terminal | |
Volgyesi et al. | Component-based development of networked embedded applications | |
Wada et al. | Modeling turnpike frontend system: A model-driven development framework leveraging UML metamodeling and attribute-oriented programming | |
CN101661387B (en) | Menu dynamic loading method for management system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Open date: 20080820 |