Summary of the invention
The invention provides a kind of method and device of management maintenance software program, to position the mistake in running software flexibly, quickly and easily, improve the management maintenance efficiency of software product, reduce maintenance workload.
For this reason, the invention provides following technical scheme:
A method for management maintenance software program, comprising:
Preset management interface framed structure, described management interface is used for administering and maintaining function of application module, comprises structural relation and parameter transfer method;
Utilize the Data Source in described management interface framed structure and institutional framework, write user interface, described user interface is for showing software program structure and operation information;
When writing software program, realize each interface in described management interface framework.
Preferably, described management interface framework comprises: fundamental objects and spare interface, and described fundamental objects comprises: node object, error handle object and information processing objects.
Preferably, described setting management interface framework comprises:
Hierarchical relationship between setting interface class;
Set up Message Transmission between interface class, message location, structure organization mechanism;
Set-up function spare interface.
Preferably, describedly utilize Data Source in described management interface framed structure and institutional framework, write user interface and comprise:
The class realizing described spare interface is shown with rectangle frame;
According to the hierarchical relationship between described interface class, be the mode of tree node by class loading different in program, and successively show downwards;
Show the particular location realizing throw exception in the class of described spare interface, occur mistake.
Preferably, described method also comprises:
In described rectangle frame spare interface described in Display Realization class in the member that defines and method.
Preferably, described displaying realizes throw exception in the class of described spare interface, occurs that the particular location of mistake comprises:
The particular location realizing throw exception in the class of spare interface, occur mistake is shown by particular color and/or font.
Preferably, described method also comprises:
When perceiving the clicking operation of user to the node in described user interface, the attribute information of each layer under successively showing described node.
A device for management maintenance software program, comprising:
Management interface Frame Design module, for presetting management interface framed structure, described management interface is used for administering and maintaining function of application module, comprises structural relation and parameter transfer method;
User interface generation module, for utilizing Data Source in described management interface framed structure and institutional framework, write user interface, described user interface is for showing software program structure and operation information;
Interface realization module, for when writing software program, realizes each interface in described management interface framework.
Preferably, described management interface Frame Design module comprises:
Structural relation setup unit, for setting the hierarchical relationship between interface class;
Set up unit, for setting up Message Transmission between interface class, message location, structure organization mechanism;
Spare interface setup unit, for set-up function spare interface.
Preferably, described user interface generation module, specifically for showing the class realizing described spare interface with rectangle frame; According to the hierarchical relationship between described interface class, be the mode of tree node by class loading different in program, and successively show downwards; Show the particular location realizing throw exception in the class of described spare interface, occur mistake.
Preferably, described device also comprises:
Display module, for when perceiving the clicking operation of user to the node in described user interface, the attribute information of each layer under successively showing described node.
The method of the management maintenance software program that the embodiment of the present invention provides and device, design management interface in advance can be utilized, these management interfaces are realized in code compiling procedure, thus make software program have mark in stage levels structure, can when making a mistake identification error type, and report out the information such as the position at place of making a mistake, Wrong localization and error reason easily, thus administering and maintaining software product can be realized easily, reduce the application efficiency brought because of software fault to reduce, to developer variation cause difficult in maintenance, liberate exploitation more, the later maintenance work of maintainer, and improve the customer satisfaction of software enterprise, the market image.
Embodiment
In order to the scheme making those skilled in the art person understand the embodiment of the present invention better, below in conjunction with drawings and embodiments, the embodiment of the present invention is described in further detail.
As shown in Figure 1, be the process flow diagram of the method for embodiment of the present invention management maintenance software program, comprise the following steps:
Step 101, presets management interface framed structure, and described management interface framework is used for administering and maintaining function of application module, comprises structural relation and parameter transfer method.
Described management interface framework comprises a series of hierarchical relationship, and inside story transmission, false judgment tissue message structure, and significant interface organizations at different levels.This management interface framework can identification processes structural relation easily, the incidence relation can made an appointment each other between distinct interface.Described incidence relation refer to program file succession, quote, the relation such as compound.Incidence relation in distinct program file, the attribute of same program file as variable name, constant numerical value etc. can by as described in management interface transmit.
As shown in Figure 2, be the schematic diagram of management interface framed structure in the embodiment of the present invention.
In this management interface framework, be provided with various fundamental objects and spare interface, as shown in Figure 2, fundamental objects has: node object, error handle object and information processing objects.
Step 102, utilizes the Data Source in described management interface framed structure and institutional framework, writes user interface, and described user interface is for showing software program structure and operation information.
Particularly, the comprehensive means such as shape, color, lines, text description can be utilized, the definition of imagery presentation program structural relation, internalist methodology, field and the information such as type of error, errors present, thus interface is opened up in vivid, lively, distinct.
Step 103, when writing software program, realizes each interface in described management interface framework.
That is, while writing normal procedure, introduce the management interface framework designed in step 101, while completing normal function, realize interface wherein, an interface is called during throw exception in such as program, can the finder position and reason etc. of makeing mistakes; For another example realize an interface, the hierarchical relationship etc. of class in program structure can be described.
It should be noted that, when exploitation distinct program, this set of core frame can be used and show interface, as long as achieve reserved interface, just can carry out the problem such as various information, mistake in graphic software platform, maintenance program.
The method of the management maintenance software program that the embodiment of the present invention provides, design management interface in advance can be utilized, these management interfaces are realized in code compiling procedure, thus make software program have mark in stage levels structure, can when making a mistake identification error type, and report out the information such as the position at place of making a mistake, Wrong localization and error reason easily, thus administering and maintaining software product can be realized easily, reduce the application efficiency brought because of software fault to reduce, to developer variation cause difficult in maintenance, liberate exploitation more, the later maintenance work of maintainer, and improve the customer satisfaction of software enterprise, the market image.
Mention above, in embodiments of the present invention, described management interface framework comprises a series of hierarchical relationship, is described in further details below to the foundation of management interface framework.
As shown in Figure 3, be management interface framework visioning procedure figure in the embodiment of the present invention, comprise the following steps:
Step 301, the hierarchical relationship between setting interface class.
It should be noted that, interface class is the abstract of the various node objects mentioned below, node object is realization and the instantiation of docking port class, each node object represents a module, can have the hierarchical relationship comprised between module, management interface framework is by the functional module of these node objects management application program.
In embodiments of the present invention, adopt tree structure between all kinds of in management interface framework, express father and son's inheritance of the class of infinite layering, determine to belong to which layer with the value of this variable of Level, such as Level=3, then illustrate that this interface class is in third layer in whole program time.In addition, need the incidence relation between parameter declaration interface class and definition top-level module as large functional node.
Step 302, sets up Message Transmission between interface class, message location, structure organization mechanism.
Comprise the incidence relation set up between node object and different node object, set up error handle object according to described incidence relation, set up information processing objects.
Step 303, set-up function spare interface.
The effect of described functional spare interface be enable to call this cover framework and the program realizing spare interface have that this framework completes as location of mistake, procedural details display, automatically safeguard, the function such as report an error automatically.
As shown in Figure 4, be the process flow diagram writing user interface in the embodiment of the present invention, comprise the following steps:
Step 401, shows the class realizing described spare interface with rectangle frame.
Design realizes graphic interface, shows the concrete class realizing spare interface, thus realizes graphic interface, wherein can demonstrate the specifying information such as member, method defined in class in rectangle frame with rectangle frame.
Step 402, according to the hierarchical relationship between described interface class, is the mode of tree node by class loading different in program, and successively shows downwards.
Step 403, shows the particular location realizing throw exception in the class of described spare interface, occur mistake.
Particularly, can color be used, the modes such as font, show the particular location realizing throw exception in the class of described spare interface, occur mistake.
If there is mistake in program, such as parameter assignment mistake, the various exceptions of emerged in operation etc., can identify out in user interface, intuitively for maintainer's Wrong localization position, to carry out quickly and easily checking, revising.Described emerged in operation is abnormal, refers to the run-time exception in object oriented language, such as occurs null pointer, numerical value crosses the border, internal memory spilling etc.Now, in graphical interfaces, can indicate the position of makeing mistakes by special color and/or icon etc. means, specifically which section program code has been made mistakes, the roughly reason of makeing mistakes be what etc.
It should be noted that, in actual applications, when perceiving the clicking operation of user to the node in described user interface, the attribute information of each layer under can also successively showing described node.Whether described attribute information comprises: class name, method name, attribute-name, running status, the information such as mistake, type of error.
In addition, in embodiments of the present invention, user interface also can provide automatic heavy duty, zero offset capability, and what main correction was carried out because some assemblies are made mistakes when registering or load reloading or re-registering, auto modification refers to that some program parameter is made mistakes, then automatically revise the operation of parameter etc.
The method of the management maintenance software program that the embodiment of the present invention provides, supports the management to program internal code structure, the automatic discovery of the problem such as mistake, exception, automatically report mechanism; Secondly on stream by actual source program with the management interface framework preset and show that interface combines, thus while realizing software concrete function, have and automatically safeguard code, the automatically function such as reporting errors, graphic software platform program operation information.
Utilize the method for the embodiment of the present invention to realize graphically managing to program code and safeguard there is following advantage:
(1) utilize that the method for the embodiment of the present invention is under development can not disturb actual development function, as long as additionally realize spare interface, actual functional capability overlaps enclosed structure with this can not produce any conflict.
(2) method of the embodiment of the present invention is utilized greatly can to facilitate the maintenance and management of later stage program, significant in the later maintenance that accounting is very large in software life-cycle.
(3) the good core frame of primary development and showing behind interface, can this nested structure of Reusability, and different procedural items can use this system same set of, as long as additionally realize spare interface, very convenient, practical.
Correspondingly, the embodiment of the present invention also provides a kind of device of management maintenance software program, as shown in Figure 5, is the structural representation of this device.
In this embodiment, described device comprises:
Management interface Frame Design module 501, for presetting management interface framed structure, described management interface is used for administering and maintaining function of application module, comprises structural relation and parameter transfer method;
User interface generation module 502, for utilizing Data Source in described management interface framed structure and institutional framework, write user interface, described user interface is for showing software program structure and operation information;
Interface realization module 503, for when writing software program, realizes each interface in described management interface framework.
Wherein, described management interface Frame Design module 501 comprises:
Structural relation setup unit, for setting the hierarchical relationship between interface class;
Set up unit, for setting up Message Transmission between interface class, message location, structure organization mechanism;
Spare interface setup unit, for set-up function spare interface.
Described user interface generation module 502, specifically for showing the class realizing described spare interface with rectangle frame; According to the hierarchical relationship between described interface class, be the mode of tree node by class loading different in program, and successively show downwards; Show the particular location realizing throw exception in the class of described spare interface, occur mistake.
The device of the management maintenance software program that the embodiment of the present invention provides, design management interface in advance can be utilized, these management interfaces are realized in code compiling procedure, thus make software program have mark in stage levels structure, can when making a mistake identification error type, and report out the information such as the position at place of making a mistake, Wrong localization and error reason easily, thus administering and maintaining software product can be realized easily, reduce the application efficiency brought because of software fault to reduce, to developer variation cause difficult in maintenance, liberate exploitation more, the later maintenance work of maintainer, and improve the customer satisfaction of software enterprise, the market image.
It should be noted that, in actual applications, in order to make the information of user's displaying interface abundanter, directly perceived, facilitate user to the maintenance of program, in the device of the embodiment of the present invention, also can comprise further: display module (not shown), for when perceiving the clicking operation of user to the node in described user interface, the attribute information of each layer under successively showing described node.Whether described attribute information can comprise: class name, method name, attribute-name, running status, the information such as mistake, type of error.
The device of the management maintenance software program that the embodiment of the present invention provides, supports the management to program internal code structure, the automatic discovery of the problem such as mistake, exception, automatically report mechanism; Secondly on stream by actual source program with the management interface framework preset and show that interface combines, thus while realizing software concrete function, have and automatically safeguard code, the automatically function such as reporting errors, graphic software platform program operation information.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for device embodiment, because it is substantially similar to embodiment of the method, so describe fairly simple, relevant part illustrates see the part of embodiment of the method.Device embodiment described above is only schematic, the wherein said module that illustrates as separating component and unit or can may not be and physically separate, parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of module wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.Those of ordinary skill in the art, when not paying creative work, are namely appreciated that and implement.
Being described in detail the embodiment of the present invention above, applying embodiment herein to invention has been elaboration, the explanation of above embodiment just understands method and apparatus of the present invention for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.