WEB front end quick calling system for managing numeralization city system
Technical field
The present invention relates to Web interaction technique field, particularly a kind of WEB front end quick calling system for managing numeralization city system.
Background technology
In the prior art, a lot of digital information management systems based on Web all adopt multi-work space form, have a lot of tab, and each tab is exactly an iframe page.And downward nested multilayer iframe also in these iframe pages.At work, often need on current page, call a certain ability on other pages, to finish the work, iframe service area content be not fixed to the high-speed traffic between each iframe page, and ability is each other called the problem of having brought.Particularly in managing numeralization city system, very many subsystems have been comprised, each subsystem is relatively independent, but at WEB front end, often need data communication between system and system, therefore, be necessary to design and a kind ofly can between WEB front end multilayer nest iframe, carry out the system of ability quick calling, to simplify, call complexity, the coupling between reduction system.
Summary of the invention
The object of the present invention is to provide a kind of WEB front end quick calling system for managing numeralization city system, this system configuration is simple, easy to use, calls speed fast.
For achieving the above object, technical scheme of the present invention is: a kind of WEB front end quick calling system for managing numeralization city system, comprise main interface, a plurality of iframe interface and can carry out with main interface and each iframe interface the bus control system of exchanges data, each iframe interface is registered respectively its ability having and is called accordingly the ability that ,Zhu interface, path has by each iframe interface of log-on message quick calling of storing in described bus control system in described bus control system.
Further, described bus control system comprises information storage module, Interface Control module and capability control module; Described information storage module is for storing interface information and the ability information that register at described bus control system at each iframe interface; Interface logon message or interface destruction message that described Interface Control module sends for receiving iframe interface, and in described information storage module, deposit or delete interface information in, to register in described bus control system or to destroy corresponding interface and call path; Ability logon message or ability destruction message that described capability control module sends for receiving iframe interface, and in described information storage module, deposit in or delete capability information, to register or to destroy corresponding ability and corresponding interface thereof in described bus control system; Described capability control module is also called message for receiving the ability of main interface transmission, and calls required ability from described bus control system.
Further, described information storage module comprises interface log-on message and these two data structures of ability log-on message; Interface registration information data structure adopts the interface information of Hash table storage registration, the unique identification title that the key value of interface log-on message Hash table is interface, value value is that interface phase is for the path list at main interface, to find the corresponding path of calling by interface; Ability registration information data structure adopts the ability information of Hash table storage registration, the unique identification title that the key value of ability log-on message Hash table is ability, and value value is interface list under ability, with handling capacity, finds corresponding interface.
Further, in the time will registering an iframe interface, described iframe interface sends interface logon message to bus control system, and corresponding interface information deposits in the registration information data structure of interface; In the time will destroying an iframe interface, described iframe interface sends interface to bus control system and destroys message, and corresponding interface information is deleted from the registration information data structure of interface.
The information of described interface logon message transmission comprises the path of calling at the unique identification title at interface and interface; The information of described interface destruction message transmissions comprises the unique identification title at interface.
Further, when an ability will be registered in an iframe interface, described iframe interface is to bus control system transmitting capacity logon message, and corresponding ability information deposits in ability registration information data structure; When an ability will be destroyed in an iframe interface, message is destroyed to bus control system transmitting capacity in described iframe interface, and corresponding ability information is deleted from ability registration information data structure; When an ability will be called in main interface, message is called to bus control system transmitting capacity in described main interface, bus control system is according to the title of the ability that will call, from ability registration information data structure, search corresponding interface, then according to the title at each interface finding, from the registration information data structure of interface, find the corresponding path of calling, call one by one the ability at each interface.
The information of described ability logon message transmission comprises the unique identification title of ability and the unique identification title at interface; The information of described ability destruction message transmissions comprises the unique identification title of ability; The information that described ability is called message transmissions comprises unique identification title and the relevant parameter of ability.
Compared to prior art, the invention has the beneficial effects as follows and designed bus control system as the passage of communicating by letter between each interface, each iframe interface can be carried out interface, ability, be called the registration in path on bus control system, thereby make other interfaces carry out easily and quickly calling of ability by bus control system, and without knowing the position at ability place and calling path, there is very strong practicality and wide application prospect.
Below in conjunction with drawings and the specific embodiments, the present invention is described in further detail.
Accompanying drawing explanation
Fig. 1 is the system configuration schematic diagram of the embodiment of the present invention.
Embodiment
The invention provides a kind of WEB front end quick calling system for managing numeralization city system, as shown in Figure 1, comprise main interface, a plurality of iframe interface and can carry out with main interface and each iframe interface the bus control system of exchanges data, bus control system is with javascript language compilation, each iframe interface is registered respectively its ability having and is called accordingly the ability that ,Zhu interface, path has by each iframe interface of log-on message quick calling of storing in described bus control system in described bus control system.
Described bus control system comprises information storage module, Interface Control module and capability control module:
1) information storage module
Described information storage module is for storing interface information and the ability information that register at described bus control system at each iframe interface.
Described information storage module comprises interface log-on message and these two data structures of ability log-on message; Interface registration information data structure adopts the interface information of Hash table storage registration, as shown in table 1 below, the unique identification title that the key value of interface log-on message Hash table is interface, value value is that interface phase is for the path list at main interface, to find the corresponding path of calling by interface.
Table 1 interface log-on message Hash table
For example: current interface name is called iframe_000, path with respect to main interface is iframe_0, iframe_00, iframe_000, representing has an iframe interface iframe_0 on main interface, there is an iframe interface iframe_00 the inside, iframe_0 interface, and the inside, iframe_00 interface also has an iframe interface iframe_000, and this is the path of calling of interface iframe_000.
Ability registration information data structure adopts the ability information of Hash table storage registration, as shown in table 2 below, the unique identification title that the key value of ability log-on message Hash table is ability, and value value is interface list under ability, with handling capacity, finds corresponding interface.
Table 2 ability log-on message Hash table
2) Interface Control module
Interface logon message or interface destruction message that described Interface Control module sends for receiving iframe interface, and in described information storage module, deposit or delete interface information in, to register in described bus control system or to destroy corresponding interface and call path.
In the time will registering an iframe interface, when loaded for the first time an iframe interface, described iframe interface sends interface logon message to bus control system, and corresponding interface information deposits in the registration information data structure of interface.
In the time will destroying an iframe interface, described iframe interface sends interface to bus control system and destroys message, and corresponding interface information is deleted from the registration information data structure of interface.
The information of described interface logon message transmission comprises the path of calling at the unique identification title at interface and interface; The information of described interface destruction message transmissions comprises the unique identification title at interface.
3) capability control module
Ability logon message or ability destruction message that described capability control module sends for receiving iframe interface, and in described information storage module, deposit in or delete capability information, to register or to destroy corresponding ability and corresponding interface thereof in described bus control system; Described capability control module is also called message for receiving the ability of main interface transmission, and calls required ability from described bus control system.
When an ability will be registered in an iframe interface, described iframe interface is to bus control system transmitting capacity logon message, and corresponding ability information deposits in ability registration information data structure;
When an ability will be destroyed in an iframe interface, message is destroyed to bus control system transmitting capacity in described iframe interface, and corresponding ability information is deleted from ability registration information data structure;
When an ability will be called in main interface, message is called to bus control system transmitting capacity in described main interface, bus control system is according to the title of the ability that will call, from ability registration information data structure, search corresponding interface, then according to the title at each interface finding, from the registration information data structure of interface, find the corresponding path of calling, call one by one the ability at each interface.
The information of described ability logon message transmission comprises the unique identification title of ability and the unique identification title at interface; The information of described ability destruction message transmissions comprises the unique identification title of ability; The information that described ability is called message transmissions comprises unique identification title and the relevant parameter of ability.
Be more than preferred embodiment of the present invention, all changes of doing according to technical solution of the present invention, when the function producing does not exceed the scope of technical solution of the present invention, all belong to protection scope of the present invention.