CN115469864A - Application development device and method based on atomization packaging command - Google Patents
Application development device and method based on atomization packaging command Download PDFInfo
- Publication number
- CN115469864A CN115469864A CN202211011963.2A CN202211011963A CN115469864A CN 115469864 A CN115469864 A CN 115469864A CN 202211011963 A CN202211011963 A CN 202211011963A CN 115469864 A CN115469864 A CN 115469864A
- Authority
- CN
- China
- Prior art keywords
- command
- base class
- component
- definition
- creating
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/252—Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/36—Software reuse
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Stored Programmes (AREA)
Abstract
The invention relates to an application development device and method based on an atomization packaging command, belongs to the technical field of development frameworks, and solves the problems of high front-end coupling degree and poor expansibility and maintainability of the existing application development. The method comprises the following steps: the command definition base class in the command frame module is used for defining the expression form of the interface end control; the command implementation framework base class is used for defining a basic processing method of a command object; the command database is used for registering command objects; the command realization interaction base class in the command extension module inherits the command realization framework base class and is used for creating components interacted with the user in the command object, wherein the components comprise a view component, a right-click menu component and a property page component; the command realization module comprises a command object corresponding to each function; the command object comprises a command identifier, a command creation method and a command definition creation method; and the command object is bound with the interface end control through the command identifier. High cohesion low coupling for application development is achieved.
Description
Technical Field
The invention relates to the technical field of development frameworks, in particular to an application development device and method based on an atomization packaging command.
Background
With the development of computer development technology, in order to quickly convert user requirements into operable functions, application software is released on schedule, and how to quickly develop and iteratively upgrade the application software is a constantly concerned problem.
In the traditional single software development process, one function comprises front-end interface logic development, back-end service function development and front-end and back-end interactive development, and the code coupling is strong; developers need to know interface logic and business logic to realize a complete function, and the expandability and the reusability of codes are poor; and moreover, the problem of visual positioning is difficult to achieve when the abnormality occurs, modification of functions can cause modification of a plurality of files, the influence range is difficult to evaluate, and the difficulty of later maintenance is high.
The problem of strong coupling can be solved by using a command mode in a design mode, but the mode is more suitable for a CS framework, and the use in single software still encounters some problems: the interface is completely isolated from the function: the information such as button names, icons, prompts and the like displayed on the interface actually belong to one part of function provision, for example, a video playing function is developed, the icons and prompts displayed on the interface also belong to one part of the function, and the icons and the prompts need to be put on the interface end to be realized in the existing command mode, so that partial functions are separated; the personnel requirement is high: developers must have a good understanding of the command patterns or can easily revert to the way functions are implemented in the interface; difficulty in customizing functions: each command in the command mode is often independent, and cannot customize the existing function, for example, in the video playing function, a customized view operation or a right-click menu is required during video playing.
Disclosure of Invention
In view of the foregoing analysis, embodiments of the present invention provide an application development apparatus and method based on an atomization package command, so as to solve the problems of high front-end and back-end coupling degree, and poor expansibility and maintainability in the existing application development.
In one aspect, an embodiment of the present invention provides an application development apparatus based on an atomization package command, including:
the command framework module comprises a command definition base class, a command realization framework base class and a command database; the command definition base class is used for defining the expression form of the interface end control; the command implementation framework base class is used for defining a basic processing method of a command object; the command database is used for registering command objects;
the command extension module comprises a command realization interactive base class, the command realization interactive base class inherits a command realization framework base class and is used for creating a component interacted with a user in a command object;
a command implementation module including a command object corresponding to each function; the command object comprises a command identifier, a command creation method and a command definition creation method; the command creating method is used for creating a command object, and the command definition creating method is used for acquiring a command definition object; and the command object is bound with the interface end control through the command identifier.
Based on further improvement of the device, the command implementation interaction base class implements the event processing method of the command implementation framework base class, wherein the event processing method of each component is expanded according to the acquired event type, and a customized method is provided in the event processing method of each component;
and the command object carries out custom processing on each component event processing method through a rewriting customization method.
In a further improvement of the above apparatus, the command database is used for registering a command object, and includes: and respectively writing the command identification and the command definition creation method of the command object into two global variables by a macro or an interface method in a command database according to the transmitted command object and the command identification, and automatically loading the command object and the command definition object thereof when a program is started.
Based on the further improvement of the device, the command object inherits the command implementation framework base class or the command implementation interaction base class, and the method comprises the following steps: when the function corresponding to the command object does not need to interact with a user, the command object inherits a command implementation framework base class, and a command identifier is transmitted into a construction function of the command implementation framework base class; otherwise, the command object inherits the command to realize the interactive base class, and a command identifier, a filtering enumeration value and a right-click menu identification value are transmitted into a constructor of the command to realize the interactive base class.
Based on further improvement of the device, components interacted with the user are created in the command object, and the components comprise view components; when the view component is created in the command object, the structure function of the interactive base class is realized through the inherited command, a filter enumeration value is transmitted, and the obtained view object in the current window is screened according to the filter enumeration value.
Based on further improvement of the device, components interacted with the user are created in the command object, and the components comprise a right-click menu component; when the right-key menu component is created in the command object, the command object realizes the constructor of the interactive base class through the inherited command, the transmitted right-key menu identification value is true, the command is automatically called to realize the right-key menu component creation method in the interactive base class, and a default right-key menu list is obtained and comprises the command identification and the menu item name corresponding to the menu item.
Based on further improvement of the device, components for interacting with the user are created in the command object, wherein the components comprise a property page component; when the property page component is created in the command object, a property page component creating method for realizing the interaction base class by the command is called, and the input parameters comprise: and acquiring and analyzing the attribute page configuration file according to the attribute page configuration file path, and displaying the attribute page.
Based on the further improvement of the device, the property page configuration file is a file in an XML format, and comprises a control label corresponding to the interface end control, and the unique identifier in the control label is used for acquiring the control and setting the value of the control.
Based on the further improvement of the device, the command framework module further comprises a command component base class used for defining a component general method, wherein the call command in the activation component method realizes the activation method in the framework base class, the call command in the deactivation component activation method realizes the deactivation method in the framework base class, the event in the sending component event method is sent to the owner of the command object, and the event processing method of the owner of the command object is called.
On the other hand, the embodiment of the invention provides an application development method based on an atomization packaging command, which comprises the following steps:
creating a command definition base class according to the expression form of the interface end control; creating a command implementation framework base class based on a basic processing method of a command object;
the creation command realization interactive base class inherits the command realization framework base class and adds a creation method of a component interacted with a user;
creating a command object corresponding to each function, wherein the command object comprises a command identifier, a command creation method and a command definition creation method; the command creating method is used for acquiring the instantiated command object, and the command definition creating method is used for acquiring the instantiated command definition object;
and registering the command object in a command database, and binding the command object with the interface end control through the command identifier.
Compared with the prior art, the invention can realize at least one of the following beneficial effects:
1. each command is responsible for realizing all functions (service logic and interface information) required by the command, the interface end, the back-end processing framework and the command object are independent from each other, development is not influenced by each other, high cohesion and low coupling of application program development are realized, readability of codes is improved, positioning is simple after the functions are failed, influence of modifying contents is controllable, and maintainability of the codes is improved;
2. after the front-end interface finishes the interface layout, the control is bound with the command identifier, the control can automatically acquire an expression form from the command definition or call the command to execute a service function, the coupling degree of the command and the interface is low, and the readability and maintainability of the code are improved;
3. the method for providing reusability is provided by the interaction base class realized by the commands in the back-end command extension module, and the command object can realize the required function only by a simple configuration or rewriting method, so that the development efficiency is improved while the repeated work is reduced and developers pay more attention to the service requirement.
In the invention, the technical schemes can be combined with each other to realize more preferable combination schemes. Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
The drawings are only for purposes of illustrating particular embodiments and are not to be construed as limiting the invention, wherein like reference numerals are used to designate like parts throughout.
Fig. 1 is a schematic structural diagram of an application development device based on an atomization package command in embodiment 1 of the present invention.
Detailed Description
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate preferred embodiments of the invention and together with the description, serve to explain the principles of the invention and not to limit the scope of the invention.
Example 1
One embodiment of the present invention discloses an application development device based on an atomization package command, which is suitable for developing single software, as shown in fig. 1. The method comprises the following steps:
the command framework module comprises a command definition base class, a command realization framework base class and a command database; the command definition base class is used for defining the expression form of the interface end control; the command implementation framework base class is used for defining a basic processing method of a command object; the command database is used for registering command objects;
the command extension module comprises a command realization interactive base class, the command realization interactive base class inherits a command realization framework base class and is used for creating a component interacted with a user in a command object;
a command implementation module including a command object corresponding to each function; the command object comprises a command identifier, a command creation method and a command definition creation method; the command creating method is used for creating a command object, and the command definition creating method is used for acquiring a command definition object; and the command object is bound with the interface end control through the command identifier.
Next, each block will be described in detail:
(1) The command framework module is a basic bottom layer module, wherein the base class defines general attributes and method names, and no specific method is generally used for implementation.
(1) And the command definition base class is used for defining the expression form of the interface end control.
It should be noted that the interface end controls include menus, buttons, and various common controls, and the expressions include: the control name title, the control icon and the prompt information tooltips are respectively defined as basic attributes of the command definition base class.
In the prior art, the name and the icon of a control on a front-end interface are generally directly defined in an interface end code, the state of the control is judged and set by utilizing a front-end script code after acquiring back-end data, the function of the control is separated from the front end and the back end in the mode, and the front end and the back end are matched during development. In this embodiment, the front-end and back-end functions of each control in the front-end interface are bound to a Command identifier (CUID, command request ID) as a whole, when the front-end interface is displayed, a Command definition corresponding to a Command object is found through the CUID, and the basic information and the display state of the control are obtained according to the Command definition. In this case, the interface only needs to perform flow construction, such as layout of menus and buttons, and binding with the command identifier CUID, without performing other business logic processing. Therefore, the command and the interface are completely decoupled by adopting the mode, and the readability and maintainability of the code are improved.
(2) The command implementation framework base class is used for defining a basic processing method of a command object.
It should be noted that the parameters of the constructor for implementing the framework base class by the command are: a command identification; the basic processing method for realizing the framework base class by the command comprises the following steps: the activation method onActivate () is used to process an initialization operation before the command execution, such as initialization of a property page; the deactivation method onDeactivate () is used for commanding the on-site restoration when closing, such as the release of attribute page resources, the restoration of view control, and the like; the execution method oneexecute () is used to execute the business processing operation of the command; and the event processing method onHandleEvent (event) is used for carrying out business processing operation according to the acquired event.
It is noted that the basic processing method in the command implementation framework base class is generally a method name, and the implementation of the method is implemented by inheriting the subclass of the base class.
(3) And the command database is used for registering the command object.
It should be noted that, registering the command object in the command database includes: and respectively writing the command identification and the command definition creation method of the command object into two global variables by a macro or an interface method in a command database according to the transmitted command object and the command identification, and automatically loading the command object and the command definition object thereof when a program is started. When the program is closed, the global variable is automatically destroyed.
Furthermore, the registration through the macro is an automatic registration mode, and the registration is called in a development stage, so that the method is simple and convenient; the interface method is a dynamic registration mode, so that the dynamic registration and the registration cancellation are convenient during the running of the code, and the expansibility is high.
It should be noted that the method names of the command creation method createObject () and the command definition creation method createDefinition () of the command object are fixed, after the command object is registered in the command database, when the control is displayed on the interface end, the command is found according to the CUID, the createDefinition () method of the command is called, if the createDefinition () method cannot be found or the obtained command definition is null, the default command definition is used for displaying, and the whole process flow is not affected; when the control is clicked, finding a command according to the CUID, calling a createObject () method of the command, activating and executing the command, and if the createObject () method cannot be found, not executing any operation.
Preferably, the command database has commonly used command objects built therein, such as: the command of opening the file, the command of saving the file, the command of importing the file, the command of exporting the file, the command of hiding and the command of displaying are convenient for direct multiplexing, and the development speed is improved.
Further, the command framework module further comprises: (4) and the command component base class is used for defining a component general method.
It should be noted that the component refers to a component interacting with a user, and includes a view component, a right-click menu component, and a property page component, and the command component base class is a general method for providing a command pair component, and includes: activate component method activate (), deactivate component activate method deactivate () and send component event method sendEvent (event). The method comprises the steps of activating an invoking command in a component method to realize an activating method onActivate () in a framework base class, canceling the invoking command in the component activating method to realize a canceling activating method onDeactivate () in the framework base class, sending an event in a component event method to send the event to an owner of a command object, and calling an event processing method onHandleEvent (event) of the owner of the command object.
(2) And the command extension module inherits the base class in the command framework module to realize the universal method.
(1) And the command realization interaction base class inherits the command realization framework base class and is used for creating a component interacted with the user in the command object.
It should be noted that the parameters of the constructor for commanding the implementation of the interaction base class include: command identification CUID, filter enumeration value and right-click menu identification value; the command implementation interaction base class comprises: the method comprises a view component creating method, a right-click menu component creating method and a property page component creating method, and by the methods, corresponding components are created according to parameters transmitted by a command object.
Specifically, in the command realization interaction base class, a default calling view component creates a method createSelection (filter), a filter enumeration value filter in a constructor is used as a parameter of the method, and the obtained view object in the current window is screened according to the filter enumeration value in the method; judging a menu identification value needcommextmenu in the construction function, if the menu identification value needcontextmenu is true, calling a menu component creating method createconextmenu () to obtain a default menu list of the right-click menu, wherein the menu list comprises a command identification and a menu item name corresponding to the menu item; the property page component creation method createPropertyPage (widget title, widget configfilepath, initializedparameters, initializedtools) is called by the inherited command object, and parameters of the method include: the method comprises the steps of obtaining and analyzing an attribute page configuration file according to the attribute page configuration file path, and displaying an attribute page.
Further, the property page configuration file is a file in an XML format, and includes a control label corresponding to the interface end control, and the unique identifier in the control label is used for acquiring the control and setting the value of the control. The control tab includes: a text label control, an edit box control, a button control, a menu control, a drop-down box control, a multi-selection button control, a radio button control, a group control, and a sub-group control. Illustratively, < Item title = "controls" var = "control string"/>, where Item represents an edit box control, var represents a unique identification of the control, and title represents prompt information for the control.
And analyzing the attribute page configuration file into a file, such as a cpp file, for actually displaying the attribute page according to the mapping rule of the control label and the interface end control. Preferably, attributes are added to the control label for configuring the must filling and the validity check of the control input content or the automatic matching of the units, and when the configuration file is analyzed, the calling and the implementation of the corresponding method are added for checking the filling content of the attribute page.
The attribute page is dynamically generated through the attribute page configuration file, dynamic modification of the attribute page can be realized by modifying other attribute values in the control label without changing the control identification in the configuration file, a program does not need to be compiled again, and development efficiency and extension efficiency are improved.
In order to realize the personalized processing of each component, the command realization interaction base class realizes the event processing method of the command realization framework base class, wherein the event processing method of each component is expanded according to the acquired event type, and the method comprises the following steps: an attribute page updating event processing method, a view changing event processing method, a mouse moving event processing method, a left mouse click event processing method, a right mouse click event processing method, a mouse wheel event processing method, a keyboard click event processing method, a right menu display event processing method, and a right menu click event processing method.
Illustratively, in an event handling method onHandleEvent (event) commanding implementation of the interaction base class, the type of the event is identified, and if it is a property page update event PropertyPageEvent, a property page update event handling method handlePropertyPageEvent (event) method is called, and if it is a Right-Key Menu display event ContextMenuEvent, a Right-Key Menu display event handling method handleTextMeandMedleEvent is called. The event processing method of each component has default processing logic and provides a customization method, and after the command object inherits the command to realize the interactive base class, the customization method in the event processing method of the corresponding component can be rewritten according to the actual business requirement.
Preferably, (2) defining a command definition base class in the command extension module based on the command definition base class of the command framework module, wherein the command definition extension class is defined in the command extension module and inherits the command definition base class, and is used for adding display properties to the interface end control and controlling the display state.
Exemplarily, a method for obtaining a control state is added in the command definition extension class, and the presentation form of the interface-side control is controlled according to the obtained control state, such as a visible, enable, or checked state.
It should be noted that a command definition extension class may be extended in the command extension module, and a dedicated command definition extension class may also be defined for each control, for example, a command definition extension class preprocheckboxdinition that defines a check box, so that the command definition extension class corresponding to the control may be automatically invoked by identifying the type of the control at the front end.
Preferably, (3) based on the command component base class of the command framework module, a view component base class, a right-click menu component base class and a property page component base class are defined for each component in the command extension module, and the view component base class, the right-click menu component base class and the property page component base class all inherit the command component base class and are used for extending an activation component method, a cancellation component activation method and a sending component event method of each component.
(3) And the command realization module defines different command objects, each command object inherits the command frame module or the command expansion module and is bound with the interface end control through the command identifier to realize the specific service logic of the interface end control.
It should be noted that the command identifier CUID of each command object is globally unique, the type is unsigned int, and the command identifier is invalid when the CUID is 0. Preferably, according to the service requirement, CUIDs of different numerical ranges are set, and a method for identifying commands is added while the commands are subjected to block management.
The command object comprises a command creating method and a command definition creating method, wherein the two methods are static methods of the command object, the command creating method is used for creating the command object, and the command definition creating method is used for acquiring the command definition object.
Illustratively, the static CommandSample: { return new CommandSample (); and wherein CommandSample is the class name of the command object, and the instantiated command object is returned in the command creation method.
The command definition object obtained by the command definition creating method may be a type of a command definition base class in the command framework module, or may be a type of a command definition extension class in the command extension module. A command object can have a plurality of command definition objects, such as command objects bound to controls on a menu and bound to button controls, which are represented differently. Different command definition objects can be obtained according to the control types in the command definition creating method.
The command object inherits the command implementation framework base class or the command implementation interaction base class, and the method comprises the following steps: when the function corresponding to the command object does not need to interact with a user, the command object inherits a command implementation framework base class, and a command identifier is transmitted into a construction function of the command implementation framework base class; otherwise, the command object inherits the command to realize the interactive base class, and transmits a command identifier, a filter enumeration value and a right-click menu identification value into a constructor of the command realization interactive base class. From the incoming parameter values, a component is created.
Specifically, when the view component is created in the command object, the structure function of the interactive base class is realized through the inherited command, a filter enumeration value is transmitted, and the obtained view object in the current window is screened according to the filter enumeration value. When there are multiple filter enumeration values, concatenation is performed by the OR operator.
When the right-click menu component is created in the command object, the command object realizes the constructor of the interactive base class through the inherited command, the transmitted right-click menu identification value is true, the command is automatically called to realize the creation method of the right-click menu component in the interactive base class, and a default right-click menu list is obtained, wherein the default right-click menu list comprises a command identifier CUID corresponding to the menu item and the name of the menu item.
The customization method in the interactive base class is realized by rewriting the command in the command object, the custom processing is carried out on the event processing method of each component, a large amount of repeated work is avoided, and the extension is simple.
Illustratively, a command object realizes a customized right-key menu method custommincementMenu item in a handleConntextMenu event in an interactive base class by rewriting commands, and adds, modifies and deletes a default right-key menu list; and realizing a customized right-click menu onCustomItemClicked method in a right-click menu event processing method handleContextMenuClickEvent in the interactive base class by rewriting commands, and performing custom processing on click events of a right-click menu list.
When the property page component is created in the command object, calling a command to realize a property page component creation method of an interactive base class, wherein the transmitted parameters comprise: and acquiring and analyzing the attribute page configuration file according to the attribute page configuration file path, and displaying the attribute page.
After each command object is created and registered in the command database, the command object can be bound with the control in the front-end interface through the command identifier CUID. The embodiment does not limit the binding manner, the command identifier CUID may be directly written on the interface, or each control and the command identifier CUID associated therewith may be configured in the configuration file, and the page frame may analyze the configuration file to obtain the command object corresponding to the control. The subsequently found errors related to the command, even the errors displayed on the interface, are modified in the implementation code of the command object, and other files cannot be involved, so that the efficiency of problem location and modification is improved, and the checking time is shortened.
Compared with the prior art, in the application development device based on the atomization packaging command provided by the embodiment, each command is responsible for realizing all functions (business logic and interface information) required by the command, the interface end, the back-end processing framework and the command object are mutually independent and development is not influenced mutually, high cohesion and low coupling of application program development are realized, the readability of codes is improved, the positioning is simple after the function is failed, the influence of modifying the content is controllable, and the maintainability of the codes is improved; after the front-end interface finishes the interface layout, the control is bound with the command identifier, the control can automatically acquire an expression form from the command definition or call the command to execute a service function, the coupling degree of the command and the interface is low, and the readability and maintainability of the code are improved; the method for providing reusability is provided by the interaction base class realized by the commands in the back-end command extension module, and the command object can realize the required function only by a simple configuration or rewriting method, so that the development efficiency is improved while the repeated work is reduced and developers pay more attention to the service requirement.
Example 2
The invention further discloses an application development method based on the atomization packaging command, so that the application development device in the embodiment 1 is realized. The concrete implementation manner of each step of the method refers to the corresponding description in the embodiment 1. The method comprises the following steps:
creating a command definition base class according to the expression form of the interface end control; creating a command implementation framework base class based on a basic processing method of a command object;
the creation command realization interactive base class inherits the command realization framework base class and adds a creation method of a component interacted with a user;
creating a command object corresponding to each function, wherein the command object comprises a command identifier, a command creation method and a command definition creation method; the command creating method is used for acquiring the instantiated command object, and the command definition creating method is used for acquiring the instantiated command definition object;
and registering the command object in a command database, and binding the command object with the interface end control through the command identifier.
Since the relevant points of the application development method based on the atomic package command of the present embodiment and the application development apparatus based on the atomic package command can be referred to each other, the description is repeated here, and thus, the description is not repeated here. Since the principle of the embodiment of the method is the same as that of the embodiment of the device, the embodiment of the method also has the corresponding technical effect of the embodiment of the device.
Those skilled in the art will appreciate that all or part of the processes for implementing the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, for instructing the relevant hardware. The computer readable storage medium is a magnetic disk, an optical disk, a read-only memory or a random access memory, etc.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention.
Claims (10)
1. An application development device based on an atomization package command, comprising:
the command framework module comprises a command definition base class, a command realization framework base class and a command database; the command definition base class is used for defining the expression form of the interface end control; the command implementation framework base class is used for defining a basic processing method of a command object; the command database is used for registering a command object;
the command extension module comprises a command realization interactive base class, the command realization interactive base class inherits a command realization framework base class and is used for creating a component interacted with a user in a command object;
a command implementation module including a command object corresponding to each function; the command object comprises a command identifier, a command creation method and a command definition creation method; the command creating method is used for creating a command object, and the command definition creating method is used for acquiring a command definition object; and the command object is bound with the interface end control through the command identifier.
2. The apparatus for application development based on atomic package command as claimed in claim 1, wherein the command implementation interaction base class implements an event processing method of a command implementation framework base class, wherein each component event processing method is extended according to the obtained event type, and a customization method is provided in each component event processing method;
and the command object carries out custom processing on the event processing method of each component through a rewriting customization method.
3. The application development device based on the atomized package commands according to claim 1 or 2, wherein the command database is used for registering command objects, and comprises: and respectively writing the command identification and the command definition creation method of the command object into two global variables by a macro or an interface method in a command database according to the transmitted command object and the command identification, and automatically loading the command object and the command definition object thereof when a program is started.
4. The apparatus for application development based on atomization package command of claim 3, wherein the command object inherits the command implementation framework base class or the command implementation interaction base class, and comprises: when the function corresponding to the command object does not need to interact with a user, the command object inherits a command implementation framework base class, and a command identifier is transmitted into a construction function of the command implementation framework base class; otherwise, the command object inherits the command to realize the interactive base class, and transmits a command identifier, a filter enumeration value and a right-click menu identification value into a constructor of the command realization interactive base class.
5. The application development device based on the atomization package command is characterized in that components interacted with a user are created in a command object and comprise a view component; when the view component is created in the command object, the structure function of the interactive base class is realized through the inherited command, a filter enumeration value is transmitted, and the obtained view object in the current window is screened according to the filter enumeration value.
6. The application development device based on the atomization package command is characterized in that components interacting with a user are created in a command object and comprise a right-click menu component; when the right-key menu component is created in the command object, the command object realizes the constructor of the interactive base class through the inherited command, the transmitted right-key menu identification value is true, the command is automatically called to realize the right-key menu component creation method in the interactive base class, and a default right-key menu list is obtained and comprises the command identification and the menu item name corresponding to the menu item.
7. The apparatus for application development based on atomization package command of claim 4, wherein the component for interaction with user is created in command object, including property page component; when the property page component is created in the command object, a property page component creating method for realizing the interaction base class by the command is called, and the input parameters comprise: the method comprises the steps of obtaining and analyzing an attribute page configuration file according to an attribute page configuration file path, and displaying an attribute page.
8. The apparatus according to claim 7, wherein the property sheet configuration file is an XML-formatted file and includes a control tag corresponding to the interface-side control, and the unique identifier in the control tag is used to obtain the control and set the value of the control.
9. The apparatus for developing an application based on an atomized package command as set forth in claim 2, wherein the command framework module further includes a command component base class for defining a component general method, wherein the invoking command in the activating component method implements an activating method in the framework base class, the invoking command in the deactivating component activating method implements a deactivating method in the framework base class, the sending component event method sends the event to the owner of the command object, and the calling component event processing method of the owner of the command object.
10. An application development method based on an atomization packaging command is characterized by comprising the following steps:
creating a command definition base class according to the expression form of the interface end control; creating a command implementation framework base class based on a basic processing method of a command object;
the creation command realization interactive base class inherits the command realization framework base class and adds a creation method of a component interacted with a user;
creating a command object corresponding to each function, wherein the command object comprises a command identifier, a command creation method and a command definition creation method; the command creating method is used for acquiring instantiated command objects, and the command definition creating method is used for acquiring instantiated command definition objects;
and registering the command object in a command database, and binding the command object with the interface end control through the command identifier.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211011963.2A CN115469864A (en) | 2022-08-23 | 2022-08-23 | Application development device and method based on atomization packaging command |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211011963.2A CN115469864A (en) | 2022-08-23 | 2022-08-23 | Application development device and method based on atomization packaging command |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115469864A true CN115469864A (en) | 2022-12-13 |
Family
ID=84366794
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211011963.2A Pending CN115469864A (en) | 2022-08-23 | 2022-08-23 | Application development device and method based on atomization packaging command |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115469864A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116107669A (en) * | 2023-04-14 | 2023-05-12 | 北京大学 | Operator registration method, device and equipment of deep learning framework and storage medium |
-
2022
- 2022-08-23 CN CN202211011963.2A patent/CN115469864A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116107669A (en) * | 2023-04-14 | 2023-05-12 | 北京大学 | Operator registration method, device and equipment of deep learning framework and storage medium |
CN116107669B (en) * | 2023-04-14 | 2023-08-18 | 北京大学 | Operator registration method, device, equipment and storage medium of deep learning framework |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8370811B2 (en) | Modularizing and aspectizing graphical user interface directed test scripts | |
US6633888B1 (en) | Method and apparatus for visually creating and testing object oriented components | |
US7051316B2 (en) | Distributed computing component system with diagrammatic graphical representation of code with separate delineated display area by type | |
US6704743B1 (en) | Selective inheritance of object parameters in object-oriented computer environment | |
US9916134B2 (en) | Methods and systems for accessing distributed computing components through the internet | |
US7827527B1 (en) | System and method of application development | |
US7451432B2 (en) | Transformation of componentized and extensible workflow to a declarative format | |
US6429882B1 (en) | User interface component | |
US6810522B2 (en) | Method and system for associating parameters of containers and contained objects | |
JP4806240B2 (en) | Componentized and extensible workflow model | |
US7962892B2 (en) | Designtime services for multiple patterns | |
US8689174B2 (en) | Extensibility of pattern components | |
JP5049280B2 (en) | Extensible XML format and object model for localization data | |
Van der Hoek | Design-time product line architectures for any-time variability | |
US8479150B2 (en) | Compositional modeling of integrated systems using event-based legacy applications | |
US20060248112A1 (en) | Application description language | |
US20190243665A1 (en) | Application runtime configuration using design time artifacts | |
EP1582985B1 (en) | Test case inheritance controlled via attributes | |
US20050235258A1 (en) | Method, plug-in and program product for customizing java bean properties | |
US20120030612A1 (en) | Dynamic property attributes | |
US20130167050A1 (en) | Method and system for customizing a graphic user interface of a manufacturing execution system screen | |
Lhotka | Expert VB 2005 business objects | |
CN115469864A (en) | Application development device and method based on atomization packaging command | |
JP2004310279A (en) | Business processing system and construction support apparatus, business processing system program, business processing system construction support program | |
Tran et al. | Generating user interface from task, user and domain models |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |