Application program development method and device, equipment, medium and product
By generating and storing differential function codes, combining the implementation method and folder correspondence, the problem of low configuration efficiency of functional modules in Android application development is solved, and efficient application development is achieved.
Patent Information
- Application Number
- CN202411237775.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-20
AI Technical Summary
During Android application development, multiple applications may contain the same functional modules, resulting in inefficient configuration of functional modules.
By obtaining the description file, generating different function codes, storing them in general functional modules, and calling the target functional module according to the corresponding relationship between the implementation method and the folder, improving the configuration efficiency of the functional module.
Through one call, you can obtain the differential function codes corresponding to multiple differential objects, eliminating the process of finding differential function codes one by one, and improving the development efficiency of the application.
Smart Images

Figure CN119166108A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an application development method, device, equipment, medium and product. Background Art
[0002] Currently, in the process of Android application development, since multiple Android applications may contain the same functions, such as order processing function, map positioning function, information query function, etc., the function can be encapsulated into a reusable functional module, and this reusable functional module can be configured into different applications so that multiple Android applications have this function.
[0003] Based on the above description, how to improve the configuration efficiency of functional modules becomes a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of this, embodiments of the present invention provide an application development method, apparatus, device, medium and product to improve the configuration efficiency of functional modules.
[0005] In a first aspect, an embodiment of the present invention provides an application development method, comprising:
[0006] Acquire a description file, wherein the description file describes difference information between multiple preset implementations of a target function and a universal implementation, wherein the universal implementation is implemented by a pre-developed universal function module, wherein the implementation of the target function includes at least one difference object, wherein the difference object includes implementation logic and / or display style of the target function, and wherein the difference information corresponds to the difference object between the multiple preset implementations and the universal implementation;
[0007] For any one of the plurality of preset implementations, generating a difference function code corresponding to the difference object according to the description file;
[0008] The difference function code is stored in a folder corresponding to any one of the preset implementation modes in the general function module;
[0009] Adding the difference function codes corresponding to the different preset implementation modes to the common function module to obtain the target function module;
[0010] In response to the test of the target type of application, according to the correspondence between the implementation method and the folder, the difference function code in the folder corresponding to the target preset implementation method in the target function module is called to determine whether the application is developed. The application includes the target function module and other function modules corresponding to the target type, and the target function in the application has a target preset implementation method.
[0011] In a second aspect, an embodiment of the present invention provides an application development system, the system comprising a development module, a configuration module and a calling module;
[0012] The development module is used to obtain a description file, wherein the description file describes difference information between multiple preset implementations of a target function and a universal implementation, wherein the universal implementation is implemented by a pre-developed universal function module, wherein the implementation of the target function includes at least one difference object, wherein the difference object includes the implementation logic and / or display style of the target function, and wherein the difference information corresponds to the difference object between the multiple preset implementations and the universal implementation; for any one of the multiple preset implementations, generating a difference function code corresponding to the difference object according to the description file; storing the difference function code in a folder corresponding to the any one of the preset implementations in the universal function module; and adding the difference function codes corresponding to different preset implementations to the universal function module to obtain a target function module;
[0013] The configuration module is used to configure the corresponding relationship between the implementation mode and the folder;
[0014] The calling module is used to respond to the test of the target type of application, and according to the correspondence between the implementation method and the folder, call the difference function code in the folder corresponding to the target preset implementation method in the target function module to determine whether the application is developed. The target type of application includes the target function module and other function modules corresponding to the target type, and the target function in the application has a target preset implementation method.
[0015] In a third aspect, an embodiment of the present invention provides an application development device, including:
[0016] an acquisition module, configured to acquire a description file, wherein the description file describes difference information between multiple preset implementations of a target function and a universal implementation, wherein the universal implementation is implemented by a pre-developed universal function module, wherein the implementation of the target function includes at least one difference object, wherein the difference object includes implementation logic and / or display style of the target function, and wherein the difference information corresponds to the difference object between the multiple preset implementations and the universal implementation;
[0017] A generating module, configured to generate, for any one of the plurality of preset implementation modes, a difference function code corresponding to the difference object according to the description file;
[0018] A storage module, used for storing the difference function code in a folder corresponding to any one of the preset implementation modes in the common function module;
[0019] An adding module, used for adding the difference function codes corresponding to the different preset implementation modes to the general function module to obtain a target function module;
[0020] A calling module is used to respond to the test of the target type of application, and according to the correspondence between the implementation method and the folder, call the difference function code in the folder corresponding to the target preset implementation method in the target function module to determine whether the application is developed. The application includes the target function module and other function modules corresponding to the target type, and the target function in the application has a target preset implementation method.
[0021] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the application development method in the first aspect. The electronic device may also include a communication interface for communicating with other devices or communication systems.
[0022] In a fifth aspect, an embodiment of the present invention provides a non-temporary machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor can at least implement the application development method as described in the first aspect above.
[0023] In a sixth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor can implement the application development method as described in the first aspect above.
[0024] In the application development method provided by the embodiment of the present invention, for any one of the multiple preset implementations, a difference function code corresponding to the difference object is generated according to the obtained description file. The description file describes the difference information between the multiple preset implementations of the target function and the general implementation, the general implementation is implemented by a pre-developed general function module, the implementation of the target function includes at least one difference object, the difference object includes the implementation logic and / or display style of the target function, and the difference information corresponds to the difference object between the multiple preset implementations and the general implementation.
[0025] Then, the difference function code is stored in a folder corresponding to any preset implementation method in the general function module, and the difference function codes corresponding to different preset implementation methods are added to the general function module to obtain the target function module. Finally, in response to the test of the target type of application, according to the correspondence between the implementation method and the folder, the difference function code in the folder corresponding to the target preset implementation method in the target function module is called to determine whether the application is developed, the application includes the target function module and other function modules corresponding to the target type, and the target function in the application has the target preset implementation method.
[0026] It can be seen that the difference function codes corresponding to different preset implementation methods generated according to the description file are all added to the general function module to obtain the target function module. Since different preset implementation methods correspond to different folders, and the folder corresponding to any preset implementation method often includes difference function codes corresponding to multiple difference objects, therefore, in the test phase of application development, the scheme can directly call the difference function code in the folder corresponding to the target preset implementation method in the target function module according to the correspondence between the implementation method and the folder, that is, the difference function code corresponding to multiple difference objects in a folder can be obtained through one call, eliminating the process of searching for the difference function codes corresponding to multiple difference objects in turn according to the number of difference objects, thereby improving the configuration efficiency of the function module and further improving the development efficiency of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 A flowchart of an application development method provided by an embodiment of the present invention;
[0029] Figure 2 A flowchart of another application development method provided by an embodiment of the present invention;
[0030] Figure 3 A schematic diagram of the working process of the application development method provided by an embodiment of the present invention;
[0031] Figure 4 A schematic diagram of the structure of an application development system provided by an embodiment of the present invention;
[0032] Figure 5 A schematic diagram of the structure of an application development device provided by an embodiment of the present invention;
[0033] Figure 6 For Figure 5 A schematic diagram of the structure of an electronic device corresponding to the application development device provided in the illustrated embodiment. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the situation of including at least one.
[0036] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0037] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to identifying", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is identified" may be interpreted as "when determining" or "in response to determining" or "when identifying (stated condition or event)" or "in response to identifying (stated condition or event)", depending on the context.
[0038] It should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.
[0039] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0040] Before describing in detail the application development methods provided by the following embodiments of the present invention, the related concepts involved in the following embodiments may also be explained:
[0041] Interface is a core concept in object-oriented programming (OOP), which is used to specify communication protocols and behavior specifications between objects or classes.
[0042] An abstract class can be seen as a further abstraction of a group of classes with common behaviors and attributes. It defines a set of abstract methods in common behaviors, which are implemented by subclasses that inherit the abstract class.
[0043] Implementation class: refers to the class that actually implements the methods defined in the interface or abstract class, which provides the specific implementation of the methods defined in the interface or abstract class.
[0044] Before describing in detail the application development method provided by each embodiment of the present invention, an application scenario of application development may also be schematically described:
[0045] As described in the background technology, in the process of developing Android applications, the target function can be encapsulated into a reusable function module, which can be called a general function module. Then, this general function module can be configured into different applications so that multiple applications have the target function. Among them, the target function can include any one of the order processing function, map positioning function, information query function, etc.
[0046] However, in practice, since the universal function module itself needs to be updated, and multiple applications and the universal function module may have different interface layouts, title texts, and theme styles, the process of configuring the universal function module to different applications is often complicated, which affects the configuration efficiency of the universal function module. In order to improve the above problems, the application development method provided by the following embodiments of the present invention can be used.
[0047] Based on the above description, some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.
[0048] Figure 1 Flowchart of an application development method provided by an embodiment of the present invention. The application development method provided by an embodiment of the present invention can be executed by a development platform. It is understandable that the development platform can be implemented as software, or a combination of software and hardware. Figure 1 As shown, the method comprises the following steps:
[0049] S101, obtaining a description file, where the description file describes difference information between multiple preset implementations of a target function and a general implementation.
[0050] S102: for any one of the plurality of preset implementation modes, generate a difference function code corresponding to the difference object according to the description file.
[0051] In practice, when multiple applications want to achieve the same target function, one application can correspond to a preset implementation method of the target function. Among them, any preset implementation method includes at least one difference object. The difference object may specifically include the implementation logic and / or display style of the target function. Among them, the implementation logic of the target function includes the record data of the user's operation behavior when using the target function, such as the user clicking any button at any time point, etc. The display style includes at least one of the above-mentioned objects such as interface layout, title text, theme style, etc.
[0052] Based on this difference object, developers can write difference information corresponding to the difference objects in multiple preset implementations and the general implementation. For any of the multiple preset implementations, the development platform can obtain a description file describing the difference information, and generate a difference function code corresponding to the difference object according to the description file. The difference function code can describe the difference implementation process of the difference object.
[0053] For example, assuming that the preset implementation includes setting the theme style to blue, and the general implementation includes setting the theme style to pink, then the difference object between the preset implementation and the general implementation is the theme style, and correspondingly, the difference function code describes the difference implementation process of the theme style, that is, the implementation process of setting the theme style to blue.
[0054] S103, storing the difference function codes in a folder corresponding to any preset implementation method in the general function module.
[0055] S104, adding the difference function codes corresponding to the different preset implementation modes to the common function module to obtain the target function module.
[0056] Then, the development platform can obtain the difference function codes corresponding to each of the multiple preset implementations, and store the difference function codes in the general function module. The general function module includes multiple folders corresponding to the multiple preset implementations. That is, the difference function code corresponding to any preset implementation is stored in the folder corresponding to any preset implementation in the general function module.
[0057] Afterwards, the development platform can add the difference function codes corresponding to the different preset implementation methods to the general function module to obtain the target function module. Among them, the target function module can be understood as the encapsulation result of the code corresponding to the target function, which can be used to support different applications to achieve the same target function.
[0058] S105, in response to the test of the target type of application, based on the correspondence between the implementation and the folder, the difference function code in the folder corresponding to the target preset implementation in the target function module is called to determine whether the application is developed.
[0059] Based on the target function module obtained in step S104, the development platform can encapsulate the target function module and other function modules corresponding to the target type to obtain an application of the target type. Among them, other function modules can be understood as the encapsulation result of the code corresponding to other functions implemented by this application. Optionally, other function modules may include a user identity management function module, an interactive function module, and the like.
[0060] After obtaining the target type of application, the development platform can further test the target type of application to determine whether the application is developed. Specifically, in response to the test of the target type of application, the development platform can call the difference function code in the folder corresponding to the target preset implementation method in the target function module according to the correspondence between the implementation method and the folder, and execute the difference function code to determine the running status of the application.
[0061] If the running state of the application is determined to be not running normally, it can be determined that the application has not been developed, that is, the application cannot provide the target function. If the running state of the application is determined to be running normally, it can be determined that the application has been developed, that is, the application can also provide the target function.
[0062] In this embodiment, for any one of the multiple preset implementations, a difference function code corresponding to the difference object is generated according to the obtained description file. Then, the difference function code is stored in a folder corresponding to any preset implementation in the general function module, and the difference function codes corresponding to different preset implementations are added to the general function module to obtain the target function module. Finally, in response to the test of the target type of application, according to the correspondence between the implementation and the folder, the difference function code in the folder corresponding to the target preset implementation in the target function module is called to determine whether the application is developed.
[0063] It can be seen that the difference function codes corresponding to different preset implementation methods generated according to the description file are all added to the general function module to obtain the target function module. Since different preset implementation methods correspond to different folders, and the folder corresponding to any preset implementation method often includes difference function codes corresponding to multiple difference objects, therefore, in the test phase of application development, the scheme can directly call the difference function code in the folder corresponding to the target preset implementation method in the target function module according to the correspondence between the implementation method and the folder, that is, the difference function code corresponding to multiple difference objects in a folder can be obtained through one call, eliminating the process of searching for the difference function codes corresponding to multiple difference objects in turn according to the number of difference objects, thereby improving the configuration efficiency of the function module and further improving the development efficiency of the application.
[0064] In practice, in order to improve the readability of the code, the development platform can encapsulate the difference information between the multiple preset implementations of the target function and the general implementation into the definition information of the interface or abstract class. Then the development platform can generate the difference function code corresponding to the interface or abstract class according to the definition information of the interface or abstract class. Among them, the difference function code can make the target function have any one of the preset implementation methods.
[0065] For example, assuming that the difference information includes the title text colors of the preset implementation and the general implementation, a set of methods related to the title text colors can be defined using an interface, such as red for the first-level title and yellow for the second-level title. That is, the title text colors of different levels can be obtained through this interface, but the specific implementation methods of the title text colors of different levels are unknown.
[0066] Optionally, an abstract class including at least one abstract method may be used to define the title text color. Different abstract methods may represent different levels of title text colors. In addition, at least one subclass may be defined in the abstract class, and the at least one subclass may be used to implement at least one abstract method in the abstract class to provide specific colors corresponding to title texts at each level.
[0067] In this embodiment, since the definition information of the interface or abstract class is more readable, by encapsulating the difference information between the multiple preset implementations of the target function and the general implementation into the definition information of the interface or abstract class, the readability of the code corresponding to the difference information can be improved, that is, the readability of the description file can be improved. Furthermore, the readability of the generated difference function code can also be improved.
[0068] In order to better manage the difference function codes in the folders corresponding to different preset implementations in the general function module, the development platform can optionally first obtain the folders corresponding to the multiple preset implementations in the general function module. Among them, one preset implementation corresponds to one folder, one folder includes at least one difference object, one difference object can correspond to a segment of difference function code, that is, one folder can include multiple segments of difference function code.
[0069] Since the difference function codes corresponding to the same difference object are essentially the same, that is, they are all used to describe the difference implementation process of the same difference object, the development platform can unify the identification of the difference function codes corresponding to the same difference object in different folders to obtain updated folders.
[0070] After obtaining the updated folder with a unified identifier, the development platform can respond to the test of the target type of application and call the difference function code in the folder corresponding to the target preset implementation method in the target function module according to the correspondence between the implementation method and the updated folder to determine whether the application is developed. The calling process of the difference function code can be seen in the above Figure 1 The description of step S105 in the illustrated embodiment will not be repeated here.
[0071] The difference function code can be understood as the code for realizing the target function in the implementation class corresponding to any preset implementation method. For the identification of the unified difference function code, specifically, the development platform can add the same suffix to the name of the implementation class corresponding to the difference function code corresponding to the same difference object in different folders to obtain a unified identification.
[0072] In the present embodiment, by unifying the identifiers of the difference function codes corresponding to the same difference objects in the folders corresponding to different preset implementation methods, it can be ensured that different difference function codes corresponding to the same difference objects have the same identifier, thereby avoiding the situation where essentially the same difference objects correspond to multiple identifiers, that is, reducing the number of identifiers managed by the development platform, thereby being able to better manage the difference function codes in the folders corresponding to different preset implementation methods in the common function module, thereby improving the development efficiency of the application.
[0073] In addition, compared to the solution in which the difference function codes are generated by multiple applications respectively, the present embodiment innovatively proposes that the development platform independently generates the difference function codes corresponding to multiple preset implementation methods, that is, there is no need for the development platform and the developers of each of the multiple applications to communicate on the implementation process of the target function. Therefore, it can avoid that the developers of each of the multiple applications generate erroneous codes due to their lack of understanding of the workflow or data processing logic of the common function module, thereby improving the stability of the target type of application.
[0074] And when the difference function code is generated by multiple applications, since different applications have different code writing specifications, the identifiers corresponding to different difference function codes corresponding to the same difference object are also different. In this case, it is necessary to distinguish the identifiers when calling the difference function code, such as using different configuration classes for different applications, so that the configuration class manages the difference function codes corresponding to each difference function code. It can be seen that even if it corresponds to the same difference object, multiple difference function codes need to be distinguished by identifiers, which will obviously increase the workload of application development and reduce the efficiency of application development.
[0075] Figure 2A flowchart of another application development method provided by an embodiment of the present invention. Figure 2 In the embodiment shown, the steps can be Figure 1 In the embodiment shown, step S104 is performed afterwards. Figure 2 As shown, the method may include the following steps:
[0076] S201, in response to a test of an application of a target type, determining a target preset implementation method in a target functional module.
[0077] S202: Acquire a target folder corresponding to a target preset implementation method according to a correspondence between the implementation method and the folder.
[0078] S203: If the difference function code in the target folder corresponds to all objects that implement the target function, the difference function code in the target folder is called to determine whether the application is developed.
[0079] During the testing phase of the target type application, optionally, the difference function code in the target folder corresponds to all objects that implement the target function. At this time, the development platform can call the difference function code to enable the target type application to implement the complete target function.
[0080] Specifically, in response to the test of the target type of application, the development platform may first determine the target preset implementation mode of the target function. Then, the development platform may obtain the target folder corresponding to the target preset implementation mode according to the correspondence between the implementation mode and the folder. The target preset implementation mode is included in a plurality of preset implementation modes. Optionally, one preset implementation mode corresponds to one folder.
[0081] If the difference function code in the target folder corresponds to all objects that implement the target function, indicating that the complete target function can be achieved based on this difference function code, the development platform can call the difference function code in the target folder and execute this difference function code to determine whether the application is developed.
[0082] For example, assuming that the target function is an order processing function, all objects that implement the order processing function include order title text, order subject style, and recorded operation data of order selection buttons. If the development platform determines that the difference function code in the target folder corresponds to the order title text, order subject style, and recorded operation data of order selection buttons, that is, the difference function code corresponds to all objects that implement the order processing function, the development platform can call and execute the difference function code in the target folder to implement the order processing function.
[0083] In this embodiment, when it is determined that the difference function codes in the target folder correspond to all objects that implement the target function, the target type of application can implement the target function by calling and executing the difference function codes in the target folder, which means that the development of the application can be completed quickly and the development efficiency of the application can be improved.
[0084] During the testing phase of the target type application, in another optional situation, the difference function code in the target folder corresponds to a partial object that implements the target function. At this time, the development platform can only enable the target type application to implement part of the target function by calling the difference function code.
[0085] Based on this, in order to achieve the complete target function, the development platform can call the general function code in the general function module while calling the difference function code in the target folder, and execute the difference function code and the general function code to determine whether the application is developed. Among them, the general function code describes the implementation process of the general objects and / or non-difference objects in the multiple preset implementation methods and the general implementation method, and the target preset implementation method is included in the multiple preset implementation methods. The general objects and / or non-difference objects are another part of the objects that realize the target function.
[0086] Following the above Figure 2 In the example of the embodiment shown, the general function module is the order processing function module. If the development platform determines that the difference function code in the target folder corresponds to the order title text and the operation data of the recorded order selection button, that is, the difference function code corresponds to the partial object that realizes the order processing function, then the development platform can call the general function code in the order processing function module while calling the difference function code in the target folder, and execute the difference function code and the general function code to realize the order processing function.
[0087] In this embodiment, when it is determined that the difference function code in the target folder corresponds to a partial object that implements the target function, by calling and executing the difference function code in the target folder and the common function code in the common function module, the target type of application can implement the complete target function, that is, the development of the application can be completed.
[0088] For ease of understanding, the following Figure 3 The specific application scenario of configuring the order processing function module into application A and application B is used to exemplify the specific implementation process of the application development method provided in the above embodiments. Among them, the order processing function module is the common function module mentioned in the above embodiments. Application A and application B may include a user identity management function module, that is, other function modules mentioned in the above embodiments.
[0089] Specifically, when application A and application B want to implement an order processing function, application A can correspond to a first preset implementation mode of the order processing function, and application B can correspond to a second preset implementation mode of the order processing function. The difference object included in the first preset implementation mode and the second preset implementation mode can be the title text color.
[0090] Based on the title text color, the developer can write the definition information of the interface or abstract class corresponding to the title text color. The development platform can generate the first difference function code and the second difference function code corresponding to the interface or abstract class according to the definition information. The first difference function code can make the order processing function have the first preset implementation mode, and the second difference function code can make the order processing function have the second preset implementation mode.
[0091] Then, the development platform may store the first difference function code in a first folder in the order processing function module corresponding to the first preset implementation method, and store the second difference function code in a second folder in the order processing function module corresponding to the second preset implementation method.
[0092] In order to better manage the difference function codes, the development platform can also unify the identification of the first difference function code corresponding to the title text color in the first folder and the identification of the second difference function code corresponding to the title text color in the second folder to obtain the updated first folder and the updated second folder.
[0093] The development platform can also add the first difference function code and the second difference function code to the order processing function module to obtain a new order processing function module, wherein the new order processing function module is the target function module mentioned in the above embodiments.
[0094] Afterwards, in response to the test of the target type of application, the development platform may call the first difference function code in the updated first folder corresponding to the first preset implementation in the new order processing function module according to the correspondence between the implementation and the folder, and execute the first difference function code to determine the running state of the application A. The target type of application includes a new order processing module and a user identity management module.
[0095] If it is determined that the running state of application A is not running normally, it can be determined that application A has not been developed, that is, application A cannot provide the order processing function. If it is determined that the running state of application A is running normally, it can be determined that application A has been developed, that is, application A can also provide the order processing function.
[0096] Similar to the process of determining whether application A has been developed, the development platform can also determine whether application B has been developed, which will not be described in detail here.
[0097] Figure 4 A schematic diagram of the structure of an application development system provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, the application development system includes: a development module, a configuration module and a calling module.
[0098] Among them, the development module can first obtain a description file, which describes the difference information between multiple preset implementations of the target function and the general implementation. For any of the multiple preset implementations, a difference function code corresponding to the difference object can be generated according to the description file describing the difference information. Afterwards, the difference function code can be stored in a folder corresponding to any preset implementation in the general function module. Finally, the difference function codes corresponding to different preset implementations can be added to the general function module to obtain the target function module.
[0099] The general implementation method can be implemented by a pre-developed general function module, the implementation method of the target function includes at least one difference object, the difference object includes the implementation logic and / or display style of the target function, and the difference information corresponds to the difference objects in the plurality of preset implementation methods and the general implementation method. Correspondingly, the difference function code can describe the difference implementation process of the difference object.
[0100] The configuration module can be used to configure the corresponding relationship between the implementation mode and the folder. Optionally, one preset implementation mode corresponds to one folder.
[0101] Further, in response to the test of the target type of application, the calling module can call the difference function code in the folder corresponding to the target preset implementation mode in the target function module according to the correspondence between the implementation mode configured in the configuration module and the folder, and execute the difference function code to determine whether the application is developed. The target type of application can be obtained by encapsulating the target function module and other function modules corresponding to the target type by the development module, and the target function in the application has the target preset implementation mode.
[0102] In this embodiment, for any one of the multiple preset implementations, a difference function code corresponding to the difference object is generated according to the obtained description file. Then, the difference function code is stored in a folder corresponding to any preset implementation in the general function module, and the difference function codes corresponding to different preset implementations are added to the general function module to obtain the target function module. Finally, in response to the test of the target type of application, according to the correspondence between the implementation and the folder, the difference function code in the folder corresponding to the target preset implementation in the target function module is called to determine whether the application is developed.
[0103] It can be seen that the difference function codes corresponding to different preset implementation methods generated according to the description file are all added to the general function module to obtain the target function module. Since different preset implementation methods correspond to different folders, and the folder corresponding to any preset implementation method often includes difference function codes corresponding to multiple difference objects, therefore, in the test phase of application development, the scheme can directly call the difference function code in the folder corresponding to the target preset implementation method in the target function module according to the correspondence between the implementation method and the folder, that is, the difference function code corresponding to multiple difference objects in a folder can be obtained through one call, eliminating the process of searching for the difference function codes corresponding to multiple difference objects in turn according to the number of difference objects, thereby improving the configuration efficiency of the function module and further improving the development efficiency of the application.
[0104] The following will describe in detail the application development device of one or more embodiments of the present invention. Those skilled in the art will appreciate that these application development devices can be configured using commercially available hardware components through the steps taught in this solution.
[0105] Figure 5 A schematic diagram of the structure of an application development device provided by an embodiment of the present invention, such as Figure 5 As shown, the device comprises:
[0106] The acquisition module 11 is used to obtain a description file, which describes the difference information between multiple preset implementation methods and a universal implementation method of the target function, the universal implementation method is implemented by a pre-developed universal function module, the implementation method of the target function includes at least one difference object, the difference object includes the implementation logic and / or display style of the target function, and the difference information corresponds to the difference objects between the multiple preset implementation methods and the universal implementation method.
[0107] The generating module 12 is used for generating a difference function code corresponding to the difference object according to the description file for any one of the plurality of preset implementation modes.
[0108] The storage module 13 is used to store the difference function code in a folder in the common function module corresponding to any one of the preset implementation modes.
[0109] The adding module 14 is used to add the difference function codes corresponding to the different preset implementation modes to the common function module to obtain the target function module.
[0110] The calling module 15 is used to respond to the test of the target type of application, and according to the correspondence between the implementation method and the folder, call the difference function code in the folder corresponding to the target preset implementation method in the target function module to determine whether the application is developed. The application includes the target function module and other function modules corresponding to the target type, and the target function in the application has a target preset implementation method.
[0111] Optionally, the difference information includes definition information of an interface or an abstract class. Based on this, the generation module 12 is used to generate a difference function code corresponding to the interface or the abstract class according to the definition information, and the difference function code enables the target function to have any of the preset implementation methods.
[0112] Optionally, the device further comprises: a packaging module 16, configured to package the target functional module and the other functional modules to obtain an application of the target type.
[0113] Optionally, the device further comprises: an identification unification module 17, which is used to obtain folders corresponding to the plurality of preset implementation modes in the common function module; and unify the identifications of the difference function codes corresponding to the same difference object in different folders to obtain an updated folder.
[0114] The calling module 15 is used to respond to the test of the target type of application and call the difference function code in the folder corresponding to the target preset implementation method in the target function module according to the correspondence between the target preset implementation method and the updated folder.
[0115] Optionally, the calling module 15 is used to determine the target preset implementation method of the target function in response to the test of the target type of application; obtain the target folder corresponding to the target preset implementation method according to the correspondence between the implementation method and the folder; if the difference function code in the target folder corresponds to all objects that implement the target function, then call the difference function code in the target folder.
[0116] Optionally, the calling module 15 is also used to call the difference function code in the target folder and the general function code in the general function module if the difference function code in the target folder corresponds to a partial object that implements the target function, and the general function code describes the implementation process of the general objects and / or non-difference objects in the multiple preset implementation methods and the general implementation method.
[0117] Figure 5 The device shown can perform Figures 1 to 3 For the method of the embodiment shown in the figure, the part not described in detail in this embodiment can be referred to Figures 1 to 3 The implementation process and technical effects of this technical solution refer to Figures 1 to 3 The description in the illustrated embodiment will not be repeated here.
[0118] In a possible design, the structure of the application development device can be implemented as an electronic device, such as Figure 6 As shown, the electronic device may include: a processor 21 and a memory 22. The memory 22 is used to store the electronic device to perform the above Figures 1 to 3 The program of the application development method provided in the illustrated embodiment, the processor 21 is configured to execute the program stored in the memory 22 .
[0119] The program includes one or more computer instructions, wherein the one or more computer instructions can implement the following steps when executed by the processor 21:
[0120] Acquire a description file, wherein the description file describes difference information between multiple preset implementations of a target function and a universal implementation, wherein the universal implementation is implemented by a pre-developed universal function module, wherein the implementation of the target function includes at least one difference object, wherein the difference object includes implementation logic and / or display style of the target function, and wherein the difference information corresponds to the difference object between the multiple preset implementations and the universal implementation;
[0121] For any one of the plurality of preset implementations, generating a difference function code corresponding to the difference object according to the description file;
[0122] The difference function code is stored in a folder corresponding to any one of the preset implementation modes in the general function module;
[0123] Adding the difference function codes corresponding to the different preset implementation modes to the common function module to obtain the target function module;
[0124] In response to the test of the target type of application, according to the correspondence between the implementation method and the folder, the difference function code in the folder corresponding to the target preset implementation method in the target function module is called to determine whether the application is developed. The application includes the target function module and other function modules corresponding to the target type, and the target function in the application has a target preset implementation method.
[0125] Optionally, the processor 21 is further configured to execute the aforementioned Figures 1 to 3 All or part of the steps in the illustrated embodiments.
[0126] The structure of the electronic device may further include a communication interface 23 for the electronic device to communicate with other devices or a communication network.
[0127] In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium for storing computer software instructions used by the above electronic device, which includes instructions for executing the above Figure 1 to Figure 3 The procedures involved in the application development methodology shown.
[0128] In addition, an embodiment of the present invention provides a computer program product. The computer program product includes a computer program or an instruction. When the computer program or the instruction is executed by a processor, the processor is enabled to implement the above Figure 1 to Figure 3 The steps or functions of the application development method shown.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An application development method, characterized in that: include: Acquire a description file, wherein the description file describes difference information between multiple preset implementations of a target function and a universal implementation, wherein the universal implementation is implemented by a pre-developed universal function module, wherein the implementation of the target function includes at least one difference object, wherein the difference object includes implementation logic and / or display style of the target function, and wherein the difference information corresponds to the difference object between the multiple preset implementations and the universal implementation; For any one of the plurality of preset implementations, generating a difference function code corresponding to the difference object according to the description file; The difference function code is stored in a folder corresponding to any one of the preset implementation modes in the general function module; Adding the difference function codes corresponding to the different preset implementation modes to the common function module to obtain the target function module; In response to the test of the target type of application, according to the correspondence between the implementation method and the folder, the difference function code in the folder corresponding to the target preset implementation method in the target function module is called to determine whether the application is developed. The application includes the target function module and other function modules corresponding to the target type, and the target function in the application has a target preset implementation method.
2. The method according to claim 1, characterized in that The difference information includes definition information of an interface or an abstract class; The step of generating a difference function code corresponding to the difference object according to the description file includes: According to the definition information, a difference function code corresponding to the interface or the abstract class is generated, and the difference function code enables the target function to have any one of the preset implementation methods.
3. The method according to claim 1, characterized in that The method further comprises: The target functional module and the other functional modules are encapsulated to obtain an application program of the target type.
4. The method according to claim 1, characterized in that: The method further comprises: Obtaining folders corresponding to the plurality of preset implementation modes in the general function module; Unify the identification of the difference function codes corresponding to the same difference object in different folders to obtain the updated folder; The test of the target type application program in response to the test, calling the difference function code in the folder corresponding to the target preset implementation mode in the target function module according to the correspondence between the implementation mode and the folder, includes: In response to the test of the target type of application, according to the correspondence between the target preset implementation mode and the updated folder, the difference function code in the folder corresponding to the target preset implementation mode in the target function module is called.
5. The method according to claim 1, characterized in that The test of the target type application program in response to the test, calling the difference function code in the folder corresponding to the target preset implementation mode in the target function module according to the correspondence between the implementation mode and the folder, includes: In response to the test of the target type of application, determining a target preset implementation mode of the target function; According to the correspondence between the implementation method and the folder, obtaining the target folder corresponding to the target preset implementation method; If the difference function code in the target folder corresponds to all objects that implement the target function, the difference function code in the target folder is called.
6. The method according to claim 5, characterized in that The method further comprises: If the difference function code in the target folder corresponds to a partial object that implements the target function, the difference function code in the target folder and the general function code in the general function module are called, and the general function code describes the implementation process of the general objects and / or non-difference objects in the multiple preset implementation methods and the general implementation method.
7. An application development system, characterized in that: The system includes a development module, a configuration module and a calling module; The development module is used to obtain a description file, wherein the description file describes difference information between multiple preset implementations of a target function and a universal implementation, wherein the universal implementation is implemented by a pre-developed universal function module, wherein the implementation of the target function includes at least one difference object, wherein the difference object includes the implementation logic and / or display style of the target function, and wherein the difference information corresponds to the difference object between the multiple preset implementations and the universal implementation; for any one of the multiple preset implementations, generating a difference function code corresponding to the difference object according to the description file; storing the difference function code in a folder corresponding to the any one of the preset implementations in the universal function module; and adding the difference function codes corresponding to different preset implementations to the universal function module to obtain a target function module; The configuration module is used to configure the corresponding relationship between the implementation mode and the folder; The calling module is used to respond to the test of the target type of application, and according to the correspondence between the implementation method and the folder, call the difference function code in the folder corresponding to the target preset implementation method in the target function module to determine whether the application is developed. The target type of application includes the target function module and other function modules corresponding to the target type, and the target function in the application has a target preset implementation method.
8. An application development device, characterized in that: include: an acquisition module, configured to acquire a description file, wherein the description file describes difference information between multiple preset implementations of a target function and a universal implementation, wherein the universal implementation is implemented by a pre-developed universal function module, wherein the implementation of the target function includes at least one difference object, wherein the difference object includes implementation logic and / or display style of the target function, and wherein the difference information corresponds to the difference object between the multiple preset implementations and the universal implementation; A generating module, configured to generate, for any one of the plurality of preset implementation modes, a difference function code corresponding to the difference object according to the description file; A storage module, used for storing the difference function code in a folder corresponding to any one of the preset implementation modes in the common function module; An adding module, used for adding the difference function codes corresponding to the different preset implementation modes to the general function module to obtain a target function module; A calling module is used to respond to the test of the target type of application, and according to the correspondence between the implementation method and the folder, call the difference function code in the folder corresponding to the target preset implementation method in the target function module to determine whether the application is developed. The application includes the target function module and other function modules corresponding to the target type, and the target function in the application has a target preset implementation method.
9. An electronic device, characterized in that: include: A memory and a processor; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the application development method according to any one of claims 1 to 6.
10. A non-transitory machine-readable storage medium, characterized in that: The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the application development method according to any one of claims 1 to 6.
11. A computer program product, characterized in that The computer program product includes a computer program or instructions, so that the computer program or instructions can implement the application development method according to any one of claims 1 to 6.
