CN105930181A - Runtime interface integration method based on plug-in mechanism - Google Patents
Runtime interface integration method based on plug-in mechanism Download PDFInfo
- Publication number
- CN105930181A CN105930181A CN201610223215.9A CN201610223215A CN105930181A CN 105930181 A CN105930181 A CN 105930181A CN 201610223215 A CN201610223215 A CN 201610223215A CN 105930181 A CN105930181 A CN 105930181A
- Authority
- CN
- China
- Prior art keywords
- interface
- plug
- unit
- interface element
- framework
- 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
- 238000000034 method Methods 0.000 title claims abstract description 23
- 230000007246 mechanism Effects 0.000 title claims abstract description 11
- 230000010354 integration Effects 0.000 title abstract description 5
- 238000013461 design Methods 0.000 claims abstract description 24
- 238000004891 communication Methods 0.000 claims description 5
- 230000002452 interceptive effect Effects 0.000 claims description 2
- 238000005516 engineering process Methods 0.000 abstract description 5
- 230000003068 static effect Effects 0.000 abstract description 5
- 230000007547 defect Effects 0.000 abstract description 2
- 238000013507 mapping Methods 0.000 abstract description 2
- 238000012545 processing Methods 0.000 abstract description 2
- 230000001360 synchronised effect Effects 0.000 abstract 1
- 230000006870 function Effects 0.000 description 23
- 238000007726 management method Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000011161 development Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000006378 damage Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000008034 disappearance Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a runtime interface integration method based on a plug-in mechanism, which aims to overcome the defects of static state, asynchronism, complex mapping and the like in the existing interface integration technology and comprises the following steps: the plug-in carries out self-description on the requirements of the main frame interface elements of the plug-in; the interface engine acquires the main frame interface element requirements provided by the plug-in, creates and places the main frame interface element requirements into the corresponding functional area, and simultaneously connects the interface element event with the processing function corresponding to the event in the plug-in. The invention breaks through the static and asynchronous interface integration concept in the traditional design, realizes the synchronous loading and unloading of the plug-in and the interface elements thereof through the role design of the interface engine, and enhances the tailorability, the transportability and the maintainability of the whole system.
Description
Technical field
Create when the present invention relates to the operation of plug-in interface element and dynamically place, being mainly concerned with the fields such as the interface integrated technology of plug-in type software system, Object-oriented Technique.
Background technology
Plug-in unit is can the program module of stand-alone development, it is possible to be dynamically inserted in system, it is possible to freely deleted and replace.Thus, plug-in type framework can improve concurrency and the development efficiency of software development, reduces and designs and develops difficulty, shortens the construction cycle.Existing NMS is with corresponding network for relying on, actual allocating according to all kinds of equipments sets up model one to one in software, and in the offering of communication network, running, it is achieved the network planning, network management and the network monitoring to model resource.For adapting to the requirement that the variation of interconnection of telecommunication network means, application demand diversification and network size maximize, NMS uses plug-in type software architecture to improve the durability of software, packaging effects and extensibility.In order to make between the mastery routine of software and difference in functionality plug-in unit can Seamless integration-, in addition to plug-in unit to be formulated can be provided, by the interface of mastery routine identification, plug-in unit, the interface serviced, also need to design dynamically, interface integrating method flexibly, to improve the loading efficiency of plug-in unit, to strengthen Consumer's Experience.
Interface is integrated to be referred to realize in the mastery routine of user software each is integrated the Interface Control of plug-in unit.For the plug-in architecture of the kinematic function storehouse form that NMS uses, the most primary interface integrated technology uses the mode that unified layout designs, one by one message map.This traditional development scheme just writes out main interface static state, complete when programming, even needs to design detailed submenu and maps for message.In view of NMS has, equipment is various, networking is complicated, allocate the features such as flexible, thus can only provide framework and each functional areas at main interface in the program design stage, and menu and interface for more details consider the most too much.And, from become each equipment of module, subnet, business plug-in unit provide function classification different, it is impossible to design at the beginning of just all interface elements are enumerated one by one, exhaustive." intelligent software interface dynamic generation method of a kind of network-oriented " (China Patent Publication No.: CN101699393) realizes the dynamic generation at interface by design interface display requirement description file.The method, based on C/S architecture design, is also applied for software frame based on plug-in unit, plug-in unit provide " interface self-described ".If but in huge NMS, used the method, then would need redesign all plug-in units and describe the dependence of file, loading sequence.Nonetheless, it is possible to extremely cause plug-in unit because of loading or describe the disappearance of file during running software, and then run-time error is caused.
Summary of the invention
The interface integrating method when present invention proposes a kind of operation based on Plugin Mechanism, the method aims to solve the problem that the defects such as static, asynchronous present in the integrated technology of existing interface and mapping complex.The present invention only need to design the framework at main interface and each functional areas in the design phase, and without considering the interface of more details that plug-in unit is relevant.Now, main interface can't see any interface element relevant to plug-in unit in appearance, do not see the major function of software yet.On the main interface of software, more interface element is provided by plug-in unit and completes corresponding function, is dynamically created with integrated when running software, and then forms complete main interface.
During in order to realize the operation at software main interface integrated, the present invention designs interface engine this " role " and completes dynamic creation and the placement of interface element, method particularly includes:
1) core realm scans plug-in unit and obtains card i/f, and after loading plug-in unit, notice this plug-in unit of interface engine is loaded;
2) interface engine obtains the main interface element demand that plug-in unit provides, and is created out;
3) interface engine obtains the control instance that core realm main interface function district uses, and the main interface element example created is placed in these functional areas;
4) interface engine realizes the interactive communication of plug-in unit and framework interface element.
Step 2) in, the interface element demand in plug-in unit, according to plug-in interface agreement, is expanded the interface element with uniform appearance pattern in main frame by interface engine, and the display content of this interface element and function all come from plug-in unit.The plug-in unit behavior by interface protocol control framework interface element in step 3), framework interface element is according to event protocol and plug-in unit communication.In the design, interface engine is responsible for establishment and the destruction of the interface element of all extensions, supports the plug and play of plug-in unit.
The main frame interface of software comprises various types of framework interface element, such as tradition menu, conventional tool bar, Ribbon menu, subnet navigation bar, automobile navigation hurdle, status bar, attribute column etc..The content of these framework interface elements by plug-in extension, thus may must have a set of mechanism for processing plug-in extension content in each framework interface element.It addition, main frame interface element also should support the extension of new type.Based on the consideration to these functional requirements, framework interface element is abstracted into a base class, and is designed to a manager.Framework interface element after abstract is respectively arranged with a set of internal readme agreement, and provides container to embed for plug-in content, and plug-in unit must comply with corresponding readme agreement to the description of interface element demand just can make framework interface element expand required content.
So, the interface logic of whole software is complete, clear in structure, and the content of certain framework interface element can be supported layout by multiple plug-in extensions, sort and be grouped, even can also be by the epideictic behaviour of plug-in unit control framework interface element.Framework interface element and plug-in unit can be compared to server and client, each server has a set of service agreement of oneself, and a server can be connected by multiple clients.First, when plug-in unit needs by the extension display of framework interface element, it is similar to visitor's user orientation server and initiates a connection request, client is by the information Tell server (display demand is told framework interface element with the protocol format that can be identified by plug-in unit) of oneself, (frame elements analysis protocol, is identified the content of plug-in unit, including resource icon etc. to this request of server process, then the display content of plug-in unit is expanded), the request (plug-in initialization is the most complete) of server customer in response.The mechanism of this request response, have respectively and synchronize and asynchronous realization: when synchronizing process refers to plug-in unit call request interface, the return value of interface directly represent response results (if plug-in unit send be one initialize display request, interface return time, plug-in content has been loaded);Asynchronous procedure is then to specify one to complete signal, and frame elements extension sends this time complete and completes signal, by the connection mechanism of signal Yu groove, then is processed this by plug-in unit and completes signal.
The method have the benefit that: for software system based on Plugin Mechanism, the design that breaks traditions static, the most asynchronous upper interface Integration Concept, by the character design of interface engine, it is achieved the main interface of software operationally integrated.Developer only need to concentrate one's energy the building and the division of functional areas of software architecture at the beginning of design, and the most careful, loaded down with trivial details interface element then transfers to plug-in unit oneself to design.In software running process, plug-in unit scanned, loading one by one, interface engine obtains the interface display demand that plug-in unit proposes therewith, and creates according to this description, places corresponding framework interface element, realizes the connection of interface element corresponding event event handling function corresponding with plug-in unit simultaneously.Framework interface element is supported layout, is sorted, is grouped, and the display accepting plug-in unit controls.The method implement when running software the synchronization of plug-in unit and interface element thereof load, unloading, it is achieved that software function can cutting, customizable, enhance the portability of whole system, maintainability, enhance the design original intention of Plugin Mechanism " plug and play ".
Accompanying drawing explanation
Fig. 1, the functional schematic of the present invention;
In figure, 1. inform plugin information, 2. notice plug-in unit load/unload, 3. expressive element interface configuration information, 4. configuration main interface element, the 5. connection of configuration signal, groove.
Detailed description of the invention
In software system based on Plugin Mechanism, the purpose of design interface engine is the plug and play realizing all kinds of plug-in unit, and its major function is to require to generate interface element according to display, and is placed into by interface element on the position that main frame interface is suitable.
For making the purpose of the present invention, technical scheme and advantage become apparent from clearly, now its detailed description of the invention is described in detail.
Software system based on the design, in running, often loads a plug-in unit, and the interface element just having this plug-in unit to specify is integrated on main interface;In like manner, if this plug-in unit is unloaded, the interface element relevant to this plug-in unit is hidden/discharges (seeing Fig. 1) in the case of software does not restarts automatically.
Plug-in unit core: major function is scanning plug-in unit, plug-in unit is carried out load/unload and notifies interface engine.
1) scanning plug-in unit: according to the path set, be read into one by one in internal memory by dynamic shared library all under this path (i.e. plug-in unit), creates plug-in object, and obtains card i/f.
2) card i/f is obtained: after reading in plug-in unit, obtain card i/f, including the interface of regulation in interface engine, plug-in unit core.If plug-in unit does not need the related content that interface engine realizes, then can not provide the interface that interface engine specifies.But the interface that plug-in unit core specifies must provide for and realizes, this dynamic shared library otherwise can be unloaded immediately, it is believed that it is not plug-in unit.
3) configuration plug-in: realize the configuration of plug-in unit dependence.Plug-in unit relies on and refers to when all functions of anterior plug-in only could all realize on the premise of relevant plug-in unit provides support.Therefore, before plug-in unit is loaded, in order to ensure the integrity of its function, correctness, it is necessary to ensure that the plug-in unit that it is relied on is loaded.Dependence between plug-in unit determines the initialization order of plug-in unit.
4) plug-in unit is initialized: call the initialization interface that plug-in unit provides, plug-in unit is carried out initial work, mainly includes initialization and plug-in unit internal signal, the connection etc. of groove of plug-in unit Back ground Information.
5) unloading plug-in unit: delete all information relevant with plug-in unit and content in software, including the deletion of operation layer, boundary layer and data Layer.
6) notification engine: loading and the unloading of plug-in unit are notified engine, in order to engine is able to carry out configuring accordingly and operating.
6) management engine: be responsible for the life cycle management of engine, it is achieved the establishment of engine and destruction.
Interface engine: major function is to be added in Domain Framework by each interface element, and realizes the connection of interface element corresponding event event handling function corresponding with plug-in unit.
1) framework interface element is added: framework interface element class is the abstract class by interface element classification, such as tradition menu, conventional tool bar, Ribbon menu, subnet navigation bar, status bar, attribute column etc..All of interface element has a common base class, it is simple to unified management.Loading interface element creates respective interface element class example exactly, and puts in list.
2) destroy framework interface element: release framework interface element class example, and be removed from the list.
3) card i/f is obtained: obtain the interface engine interface (plug-in unit not having interface operation demand does not provide interface engine interface) that plug-in unit provides.The content of interface engine interface mainly includes the information such as interface element description and icon.
4) the interface element demand of plug-in unit is identified: obtain the interface element demand described in plug-in unit, and put in lists.Putting into the interface element in list must be the type that interface engine is supported, if not in the list supported or the information that is given of interface element is not enough for the type specified, is taken as illegal interface element, does not put in lists.
5) plug-in interface element is created: that calls main interface creates function to create the interface element in interface element list.
6) plug-in interface element is laid: added in the main interface function district specified by the plug-in interface element of dynamic creation.
7) interface element signal groove configuration: the event handling function that event and the plug-in unit of interface element provide is attached or disconnects.
8) plug-in interface element is deleted: deleted from main interface by the interface element relevant to this plug-in unit.
Plug-in unit: different types of plug-in unit completes different functions, but the plug-in unit in the design all must provide for corresponding interface, in order to plug-in unit core and Domain Framework can correctly identify, configure and call.
1) plugin information is provided: provide the essential information of plug-in unit, including plug-in unit ID, title, packet, version, path, place, explanation, and the plug-in unit list etc. relied on.
2) plug-in unit is initialized: complete the initialization to plug-in unit used resource.Typically call when loading plug-in unit.
3) release resource: every resource that release plug-in unit takies, it is to avoid RAM leakage.Typically call when unloading plug-in unit.
4) configuration signal groove: the signal of this plug-in unit of informing business engine offer itself and groove, and need the signal connected.
5) configuration interface element: inform the configuration relevant with main interface that this plug-in unit of interface engine provides.
6) configuration Object table: inform the Object table needed for this plug-in unit of data engine, in order to data engine can create the tables of data of correspondence automatically in data medium.
Domain Framework: the most function of software is all provided by plug-in unit, Domain Framework mainly realizes main interface framework and basic service logic, and realizes providing enough carry support for plug-in unit, and can be with the interface of expanded function.
1) run startup interface: startup interface is usually login interface, just show main interface and perform other function after being used for user authentication and display program process, only user authentication success.
2) main interface configurations is obtained: tell interface engine by every configuration at main interface, the signal configuration etc. that the functional areas at the most main interface and main interface provide.
3) realize basic service logic: by the resource of business scope, flow process are analyzed, extract general character and form basic service class, and design corresponding management class is responsible for being managed its life cycle.Domain Framework can be considered as a platform, and plug-in unit completes various function on this platform, finally realizes complete software function.
Claims (5)
1. interface integrating method during an operation based on Plugin Mechanism, it is characterised in that: software only need to design framework and each functional areas at main interface in the design phase, and the framework interface element relevant to pin function is then provided requirement description by plug-in unit;During running software, these interface elements are dynamically created with integrated, ultimately form complete main interface.
Interface integrating method during operation the most according to claim 1, it is characterised in that: interface engine is responsible for the framework interface elements creating with destroying all extensions, it is achieved plug-in unit and interface element synchronization thereof load, unloading, support the plug and play of plug-in unit.
Interface integrating method during operation the most according to claim 1, it is characterized in that: the interface engine designed by claim 2 obtains the framework interface element demand that plug-in unit provides, in main frame, expand the interface element with uniform appearance pattern according to plug-in interface agreement, and created out;Interface engine obtains the control instance that main interface function district uses, and the main interface element example created is placed wherein.
Interface integrating method during operation the most according to claim 1, it is characterized in that: the interface engine designed by claim 2 connects the interactive communication of plug-in unit and framework interface element, the plug-in unit behavior by interface protocol control framework interface element, framework interface element is according to event protocol and plug-in unit communication.
Interface integrating method during operation the most according to claim 1, it is characterised in that: actually one " container " of the framework interface element designed by claim 2, both can embed for plug-in content, the framework interface element made new advances can be extended again;It is respectively arranged with a set of internal readme agreement, supports layout, sorts, is grouped, and the display accepting plug-in unit controls.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610223215.9A CN105930181A (en) | 2016-04-12 | 2016-04-12 | Runtime interface integration method based on plug-in mechanism |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610223215.9A CN105930181A (en) | 2016-04-12 | 2016-04-12 | Runtime interface integration method based on plug-in mechanism |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105930181A true CN105930181A (en) | 2016-09-07 |
Family
ID=56838021
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610223215.9A Pending CN105930181A (en) | 2016-04-12 | 2016-04-12 | Runtime interface integration method based on plug-in mechanism |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105930181A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109240758A (en) * | 2018-07-25 | 2019-01-18 | 武汉精测电子集团股份有限公司 | A kind of method and microkernel architecture for supporting card i/f synchronous asynchronous unified call |
CN110531981A (en) * | 2019-08-27 | 2019-12-03 | 珠海格力智能装备有限公司 | Visual software system and application method thereof |
CN114356468A (en) * | 2021-11-24 | 2022-04-15 | 上海欣兆阳信息科技有限公司 | User interface integration system and protocol-based user interface access mode in integration thereof |
EP4187377A4 (en) * | 2020-07-23 | 2024-01-17 | Hangzhou Hikvision Digital Technology Co., Ltd. | Application program interface display method and apparatus, and computer device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030097491A1 (en) * | 1998-12-11 | 2003-05-22 | A. Michael Burbidge | Applying operations to selected data of different types |
CN1641569A (en) * | 2004-01-06 | 2005-07-20 | 英业达股份有限公司 | Method for realizing Java small-application plug board function |
CN101162424A (en) * | 2006-10-13 | 2008-04-16 | 北京书生国际信息技术有限公司 | System and method for loading interface element |
CN104461600A (en) * | 2013-09-25 | 2015-03-25 | 天津书生软件技术有限公司 | System and method for loading interface elements |
-
2016
- 2016-04-12 CN CN201610223215.9A patent/CN105930181A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030097491A1 (en) * | 1998-12-11 | 2003-05-22 | A. Michael Burbidge | Applying operations to selected data of different types |
CN1641569A (en) * | 2004-01-06 | 2005-07-20 | 英业达股份有限公司 | Method for realizing Java small-application plug board function |
CN101162424A (en) * | 2006-10-13 | 2008-04-16 | 北京书生国际信息技术有限公司 | System and method for loading interface element |
CN104461600A (en) * | 2013-09-25 | 2015-03-25 | 天津书生软件技术有限公司 | System and method for loading interface elements |
Non-Patent Citations (1)
Title |
---|
丁姗姗: ""软件插件技术及其应用研究"", 《电脑学习》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109240758A (en) * | 2018-07-25 | 2019-01-18 | 武汉精测电子集团股份有限公司 | A kind of method and microkernel architecture for supporting card i/f synchronous asynchronous unified call |
CN109240758B (en) * | 2018-07-25 | 2021-10-29 | 武汉精测电子集团股份有限公司 | Method for supporting synchronous asynchronous unified call of plug-in interface and microkernel system |
CN110531981A (en) * | 2019-08-27 | 2019-12-03 | 珠海格力智能装备有限公司 | Visual software system and application method thereof |
EP4187377A4 (en) * | 2020-07-23 | 2024-01-17 | Hangzhou Hikvision Digital Technology Co., Ltd. | Application program interface display method and apparatus, and computer device |
CN114356468A (en) * | 2021-11-24 | 2022-04-15 | 上海欣兆阳信息科技有限公司 | User interface integration system and protocol-based user interface access mode in integration thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021017301A1 (en) | Management method and apparatus based on kubernetes cluster, and computer-readable storage medium | |
CN102789382B (en) | For the system and method that list generates and runs | |
CN112667362B (en) | Method and system for deploying Kubernetes virtual machine cluster on Kubernetes | |
CN115292026B (en) | Management method, device and equipment of container cluster and computer readable storage medium | |
JP5298764B2 (en) | Virtual system control program, method and apparatus | |
JP5298763B2 (en) | Virtual system control program, method and apparatus | |
CN107566165B (en) | Method and system for discovering and deploying available resources of power cloud data center | |
CN110262902B (en) | Information processing method and system, medium, and computing device | |
CN102164360B (en) | Method and system for configuring and loading network equipment | |
CN102193793B (en) | A kind of method and apparatus realizing software repeated usage | |
CN108376100A (en) | Container scheduling based on safety | |
CN105930181A (en) | Runtime interface integration method based on plug-in mechanism | |
CN105099739A (en) | Plug-in type software deployment method and apparatus, and application server | |
CN111796838B (en) | Automatic deployment method and device for MPP database | |
CN104360878A (en) | Method and device for deploying application software | |
CN105204936A (en) | Universal resident process management platform and method | |
CN115357198B (en) | Mounting method and device of storage volume, storage medium and electronic equipment | |
CN104318091A (en) | Moonlet ground testing method based on virtualization computer system | |
CN109189387A (en) | A kind of method and system of the GNSS data processing based on QT component | |
CN114912897A (en) | Workflow execution method, workflow arrangement method and electronic equipment | |
CN112564979B (en) | Execution method and device of construction task, computer equipment and storage medium | |
CN109271235A (en) | A kind of data-base cluster method for building up and device | |
CN113449031A (en) | Data synchronization management method and device and server | |
CN102652307B (en) | The method supported for the plug and play of computer architecture and system | |
CN108089968A (en) | A kind of method of host's machine monitoring virtual-machine data storehouse state |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160907 |