CN113342323B - Method and device for online development of software - Google Patents

Method and device for online development of software Download PDF

Info

Publication number
CN113342323B
CN113342323B CN202110728573.6A CN202110728573A CN113342323B CN 113342323 B CN113342323 B CN 113342323B CN 202110728573 A CN202110728573 A CN 202110728573A CN 113342323 B CN113342323 B CN 113342323B
Authority
CN
China
Prior art keywords
java
target service
code
codes
demands
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.)
Active
Application number
CN202110728573.6A
Other languages
Chinese (zh)
Other versions
CN113342323A (en
Inventor
况洪安
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yinqing Technology Co ltd
Original Assignee
Yinqing Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Yinqing Technology Co ltd filed Critical Yinqing Technology Co ltd
Priority to CN202110728573.6A priority Critical patent/CN113342323B/en
Publication of CN113342323A publication Critical patent/CN113342323A/en
Application granted granted Critical
Publication of CN113342323B publication Critical patent/CN113342323B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/37Compiler construction; Parser generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The invention discloses a method and a device for online development of software, wherein the method comprises the following steps: when a software main program is called, receiving a target service requirement of a user; inquiring JAVA codes corresponding to target service demands from a code library according to the target service demands of the user, wherein the code library stores JAVA codes corresponding to various service demands; the JAVA codes corresponding to the target service demands are dynamically compiled into class files corresponding to the target service demands, the hot loading commands of the class files corresponding to the target service demands are executed based on tangent plane calling, the calling results of the class files corresponding to the target service demands are obtained, the expansibility of software development is improved by compiling the JAVA codes on line, the user demands can be timely met, the running results of the class files can be tested on the premise that the running of the main program is not affected based on hot loading, and the efficiency of software development is improved.

Description

Method and device for online development of software
Technical Field
The invention relates to the technical field of software development, in particular to a method and a device for on-line development of software.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
In the process of deploying saas service in an enterprise, when a user has customized requirements, the requirements of the user can only be added when the version of the basic software is updated, and when the user needs to compare functions or performances of different versions, the software of different versions needs to be released and deployed simultaneously, so that the system has poor expandability and low efficiency.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a method for online development of software, which is used for improving the expandability and efficiency of software development, and comprises the following steps:
when a software main program is called, receiving a target service requirement of a user;
inquiring JAVA codes corresponding to target service demands from a code library according to the target service demands of the user, wherein the code library stores JAVA codes corresponding to various service demands;
dynamically compiling JAVA codes corresponding to the target service demands into class files corresponding to the target service demands;
based on the cut plane call, executing a hot loading command of the class file corresponding to the target service requirement to obtain a call result of the class file corresponding to the target service requirement.
The embodiment of the invention provides a device for online development of software, which is used for improving the expandability and efficiency of software development, and comprises the following components:
the target business requirement receiving module is used for receiving the target business requirement of the user when the software main program is called;
the JAVA code inquiring module is used for inquiring JAVA codes corresponding to the target service demands from the code library according to the target service demands of the user, wherein the JAVA codes corresponding to the multiple service demands are stored in the code library;
the class file compiling module is used for dynamically compiling JAVA codes corresponding to the target service demands into class files corresponding to the target service demands;
and the hot loading module is used for executing a hot loading command of the class file corresponding to the target service requirement based on the section call to obtain a call result of the class file corresponding to the target service requirement.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the method for online development of the software when executing the computer program.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program for executing the method of software online development.
The embodiment of the invention is as follows: when a software main program is called, receiving a target service requirement of a user; inquiring JAVA codes corresponding to target service demands from a code library according to the target service demands of the user, wherein the code library stores JAVA codes corresponding to various service demands; the JAVA codes corresponding to the target service demands are dynamically compiled into class files corresponding to the target service demands, hot loading commands of the class files corresponding to the target service demands are executed based on tangent plane calling, call results of the class files corresponding to the target service demands are obtained, expansibility of software development is improved through online compiling of the JAVA codes, user demands can be timely met, the class files corresponding to the target service demands can be embedded in a main program based on hot loading, operation results of the class files are tested on the premise that operation of the main program is not affected, multiple versions of software are not required to be developed, and efficiency of software development is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a schematic diagram of a method flow for online development of software in the practice of the present invention;
FIG. 2 is a schematic diagram of a process for creating a code library according to an embodiment of the present invention;
FIG. 3 is a schematic diagram showing a specific flow of step 103 in FIG. 1;
FIG. 4 is a schematic diagram of an overall framework of a method for online development of software in an embodiment of the invention;
FIG. 5 is a schematic diagram of a process of loading classloaders by a virtual machine according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a device structure for online development of software in an embodiment of the invention;
fig. 7 is a schematic diagram of another structure of a device for online development of software in an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
One skilled in the art will appreciate that embodiments of the present invention may be implemented as a system, apparatus, method, or computer program product. Accordingly, the present disclosure may be embodied in the following forms, namely: complete hardware, complete software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
The embodiment of the invention provides a method for online development of software, which is used for improving the expandability and the efficiency of the software development, and fig. 1 is a schematic diagram of a flow of the method for online development of the software in the implementation of the invention, as shown in fig. 1, and the method comprises the following steps:
step 101: when a software main program is called, receiving a target service requirement of a user;
step 102: inquiring JAVA codes corresponding to target service demands from a code library according to the target service demands of the user, wherein the code library stores JAVA codes corresponding to various service demands;
step 103: dynamically compiling JAVA codes corresponding to the target service demands into class files corresponding to the target service demands;
step 104: based on the cut plane call, executing a hot loading command of the class file corresponding to the target service requirement to obtain a call result of the class file corresponding to the target service requirement.
As shown in fig. 1, the embodiment of the invention is implemented by: when a software main program is called, receiving a target service requirement of a user; inquiring JAVA codes corresponding to target service demands from a code library according to the target service demands of the user, wherein the code library stores JAVA codes corresponding to various service demands; the JAVA codes corresponding to the target service demands are dynamically compiled into class files corresponding to the target service demands, hot loading commands of the class files corresponding to the target service demands are executed based on tangent plane calling, call results of the class files corresponding to the target service demands are obtained, expansibility of software development is improved through online compiling of the JAVA codes, user demands can be timely met, the class files corresponding to the target service demands can be embedded in a main program based on hot loading, operation results of the class files are tested on the premise that operation of the main program is not affected, multiple versions of software are not required to be developed, and efficiency of software development is improved.
Fig. 2 is a schematic diagram of a process of creating a code base in an embodiment of the present invention, as shown in fig. 2, in an embodiment, before querying JAVA codes corresponding to a target service requirement from the code base, the method further includes:
establishing a code base according to the following mode;
developing JAVA codes corresponding to various service requirements according to the various service requirements during software development;
invoking a JAVA online compiler to precompiled JAVA codes corresponding to various service requirements;
marking the JAVA code which is successfully precompiled as the code to be issued and/or the code to be developed, and marking the JAVA code which is failed to be precompiled as the code to be developed;
and encrypting the codes to be distributed and the codes to be developed and storing the codes to be distributed and the codes to be developed into a database.
In particular, as shown in fig. 2, when software development is performed, a developer can develop JAVA codes corresponding to multiple service requirements according to multiple service requirements and special requirements of a user through an online code editing window, then call a JAVA online compiler to precompiled JAVA codes corresponding to the multiple service requirements, precompiled JAVA codes can only be marked as codes to be developed, encrypted and stored in a database or continuously written, precompiled JAVA codes can be marked as codes to be developed and/or codes to be developed, encrypted and stored in a database, JAVA codes can be stored as multiple versions, the precompiled JAVA codes can be marked as codes to be developed for facilitating subsequent continuous user requirement secondary development, the JAVA codes to be developed can replace the current version codes and can also be stored as new version codes, the JAVA codes to be developed can be marked as designated running versions, and the subsequent running version of the JAVA codes can be designated running default version of the system.
In one embodiment, the JAVA code corresponding to the target service requirement includes multiple versions;
the class file corresponding to the target service requirement contains the version number of the JAVA code.
Fig. 3 is a schematic diagram of a specific flow of step 103 in fig. 1, where dynamically compiling JAVA code corresponding to a target service requirement into a class file corresponding to the target service requirement includes:
step 301: when the JAVA code corresponding to the target service requirement is the code to be developed, carrying out secondary development on the JAVA code corresponding to the target service requirement;
step 302: when the JAVA codes corresponding to the target service demands are codes to be issued, dynamically compiling the JAVA codes corresponding to the target service demands into class files corresponding to the target service demands;
step 303: invoking a JAVA on-line compiler to precompiled JAVA codes corresponding to the target service requirements after secondary development;
step 304: and when the pre-compiling is successful, dynamically compiling JAVA codes corresponding to the target business requirements into class files corresponding to the target business requirements.
In specific implementation, fig. 4 is a schematic diagram of an overall framework of a method for online development of software in the embodiment of the present invention, as shown in fig. 4, in step 101, when a software main program is invoked, a target service requirement of a user may be received, in step 102, JAVA codes corresponding to the target service requirement may be queried from a code library according to the target service requirement of the user, then, in step 103, firstly, the JAVA codes corresponding to the target service requirement are decrypted, then, JAVA codes corresponding to the target service requirement may be dynamically compiled into class files corresponding to the target service requirement, specifically, when JAVA codes corresponding to the target service requirement are to be developed, a development interface of the JAVA codes may be invoked through section programming, based on the customization requirement of the user, a standard code writing mode may be adopted in the corresponding specification, JAVA codes corresponding to the target service requirement may be secondarily developed, when JAVA codes corresponding to the target service requirement are to be deployed, then, JAVA codes corresponding to the target service requirement may be dynamically compiled into class files corresponding to the target service requirement, then, a JAVA compiler may be dynamically compiled into class files corresponding to the target service requirement, then, the JAVA files may be compiled into the class files corresponding to be more easily and the online requirement can be conveniently and dynamically compiled by the user, and the JAVA can be conveniently and the online requirement is not be conveniently developed by the application program by the standard code writing mode, and the JAVA requirements can be more than the requirements on the online requirements, and the online requirements can be conveniently developed by the development requirements by the user, and the JAVA requirements on the service requirements, the underlying development of the system is not of concern.
It should be noted that, under normal conditions, the class is loaded through the path of the class packet, and the class packet conflict easily occurs when the same class packet is loaded, so, as shown in fig. 4, in the embodiment of the present invention, the JAVA (a) code corresponding to the target service requirement includes multiple versions, for example, JAVA (A1), JAVA (A2), JAVA (A3), and the like, and then the class file corresponding to the target service requirement includes the version number of the JAVA code, for example: by adding version management to codes under the same class package, the embodiment of the invention generates a class file with a version number during compiling, thereby solving the problem of java class package conflict.
In one embodiment, in step 104, based on the slice call, executing a hot load command of a class file corresponding to the target service requirement to obtain a call result of the class file corresponding to the target service requirement, including:
based on the section call, executing the hot loading command of the class file of each version corresponding to the target service requirement, and obtaining the call result of the class file of each version corresponding to the target service requirement.
In specific implementation, fig. 5 is a schematic diagram of a process of loading a classLoader by a virtual machine in an embodiment of the present invention, as shown in fig. 5, for a Java application, hot loading is to update a Java class file during runtime, and includes the following steps: destroying the existing custom ClassLoader; and updating the class file, and creating a new ClassLoader to load the updated class file.
In step 104, the main program may execute the hot loading command of each version of class file corresponding to the target service requirement based on the tangent plane call, to obtain the call result of each version of class file corresponding to the target service requirement, so that the class files of different versions can be deployed in the same system based on the hot loading, the running effects of the class files of different versions can be tested, the code of the debug level can be embedded at any time in the running process of the system, the running result is observed, and the running condition of the key point is tracked in real time in the running process of the system.
It should be noted that although the operations of the method of the present invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in that particular order or that all of the illustrated operations be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
Based on the same inventive concept, the embodiment of the invention also provides a device for online development of software, such as the following embodiment. Because the principle of solving the problem of the device for online development of the software is similar to that of the method for online development of the software, the implementation of the device can be referred to the implementation of the method, and the repetition is omitted. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
An embodiment of the present invention provides a device for online development of software, which is used to improve the expandability and efficiency of software development, and fig. 6 is a schematic diagram of a device structure for online development of software in the embodiment of the present invention, as shown in fig. 6, where the device includes:
the target business requirement receiving module 01 is used for receiving the target business requirement of a user when the software main program is called;
the JAVA code inquiry module 02 is configured to inquire JAVA codes corresponding to the target service requirements from a code base according to the target service requirements of the user, where the code base stores JAVA codes corresponding to multiple service requirements;
the class file compiling module 03 is configured to dynamically compile JAVA codes corresponding to the target service requirements into class files corresponding to the target service requirements;
and the hot loading module 04 is used for executing a hot loading command of the class file corresponding to the target service requirement based on the tangent plane call to obtain a call result of the class file corresponding to the target service requirement.
FIG. 7 is a schematic diagram of another structure of an apparatus for online development of software according to an embodiment of the present invention, as shown in FIG. 7, in one embodiment, the apparatus further includes: the code base establishment module 05 is used for:
before inquiring JAVA codes corresponding to the target service demands from the code library, the code library is established in the following manner;
developing JAVA codes corresponding to various service requirements according to the various service requirements during software development;
invoking a JAVA online compiler to precompiled JAVA codes corresponding to various service requirements;
marking the JAVA code which is successfully precompiled as the code to be issued and/or the code to be developed, and marking the JAVA code which is failed to be precompiled as the code to be developed;
and encrypting the codes to be distributed and the codes to be developed and storing the codes to be distributed and the codes to be developed into a database.
In one embodiment, the class file compiling module 03 is specifically configured to:
when the JAVA code corresponding to the target service requirement is the code to be developed, carrying out secondary development on the JAVA code corresponding to the target service requirement;
when the JAVA codes corresponding to the target service demands are codes to be issued, dynamically compiling the JAVA codes corresponding to the target service demands into class files corresponding to the target service demands;
invoking a JAVA on-line compiler to precompiled JAVA codes corresponding to the target service requirements after secondary development;
and when the pre-compiling is successful, dynamically compiling JAVA codes corresponding to the target business requirements into class files corresponding to the target business requirements.
In one embodiment, the JAVA code corresponding to the target service requirement includes multiple versions; the class file corresponding to the target service requirement contains the version number of the JAVA code;
the heat loading module 04 is specifically configured to:
based on the section call, executing the hot loading command of the class file of each version corresponding to the target service requirement, and obtaining the call result of the class file of each version corresponding to the target service requirement.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the method for online development of the software when executing the computer program.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program for executing the method of software online development.
The following presents a specific example to facilitate understanding of how the present invention may be practiced.
When software development is performed, a developer develops JAVA codes corresponding to various service requirements through an online code editing window according to the various service requirements and special requirements of users, calls a JAVA online compiler, pre-compiles the JAVA codes corresponding to the various service requirements, marks the pre-compiled and failed JAVA codes as codes to be developed, marks the pre-compiled and passed JAVA codes as codes to be developed and/or codes to be developed, encrypts the codes to be developed and the codes to be developed, stores the encrypted codes to a database, establishes a code library, and then performs the following steps as shown in fig. 3:
the first step: when a software main program is called, receiving a target service requirement of a user;
and a second step of: inquiring JAVA codes corresponding to the target service requirements from a code library according to the target service requirements of the user, wherein the JAVA (A) codes corresponding to the target service requirements comprise a plurality of versions, and JAVA (A1), JAVA (A2) and JAVA (A3);
and a third step of: decrypting the JAVA codes corresponding to the target service demands, calling a development interface of the code to be developed through tangent plane programming when the JAVA codes corresponding to the target service demands are the code to be developed, secondarily developing the JAVA codes corresponding to the target service demands in a standard code writing mode based on the customized demands of users, calling a JAVA on-line compiler, precompiled the JAVA codes corresponding to the target service demands after secondary development, and dynamically compiling the JAVA codes corresponding to the target service demands into class files corresponding to the target service demands when precompiled successfully, wherein the class files corresponding to the target service demands comprise version numbers of the JAVA codes, class (A1), class (A2) and class (A3);
fourth step: when the JAVA codes corresponding to the target service demands are codes to be issued, dynamically compiling the JAVA codes corresponding to the target service demands into class files corresponding to the target service demands;
fifth step: and the main program executes the hot loading command of the class file of each version corresponding to the target service requirement based on the tangent plane call to obtain the call result of the class file of each version corresponding to the target service requirement, and the result 1, the result 2 and the result 3.
In summary, the embodiment of the invention is as follows: when a software main program is called, receiving a target service requirement of a user; inquiring JAVA codes corresponding to target service demands from a code library according to the target service demands of the user, wherein the code library stores JAVA codes corresponding to various service demands; the JAVA codes corresponding to the target service demands are dynamically compiled into class files corresponding to the target service demands, hot loading commands of the class files corresponding to the target service demands are executed based on tangent plane calling, call results of the class files corresponding to the target service demands are obtained, expansibility of software development is improved through online compiling of the JAVA codes, user demands can be timely met, the class files corresponding to the target service demands can be embedded in a main program based on hot loading, operation results of the class files are tested on the premise that operation of the main program is not affected, multiple versions of software are not required to be developed, and efficiency of software development is improved.
In addition, the embodiment of the invention dynamically loads the compiled result by compiling the JAVA codes on line, realizes the loading of the JAVA class package under the condition of not restarting the server, can encrypt and store the JAVA codes, compile the JAVA codes on line, view the JAVA codes on line, repair the problems on line and run the JAVA codes dynamically, does not have the risk of decompiling the codes, improves the expansibility of software development, and can rapidly meet the finer demands of users on the basis of the existing saas service platform. The method can provide simpler section in the custom place commonly used by the user through section programming, common developers only need to pay attention to the realization of the service, and the bottom development of the system does not need to pay attention.
The embodiment of the invention can deploy the class files of different versions in the same system based on hot loading, test the operation effect of the class files of different versions, embed the code of debug level at any time in the operation process of the system, observe the operation result and track the operation condition of key points in real time without affecting the operation process of the system.
Although the invention provides method operational steps as described in the examples or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When implemented by an actual device or client product, the instructions may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment) as shown in the embodiments or figures.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, apparatus (system) or computer program product. Accordingly, the present specification embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments. In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The orientation or positional relationship indicated by the terms "upper", "lower", etc. are based on the orientation or positional relationship shown in the drawings, are merely for convenience of description and to simplify the description, and are not indicative or implying that the apparatus or elements in question must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as limiting the present invention. Unless specifically stated or limited otherwise, the terms "mounted," "connected," and "coupled" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances. It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other. The present invention is not limited to any single aspect, nor to any single embodiment, nor to any combination and/or permutation of these aspects and/or embodiments. Moreover, each aspect and/or embodiment of the invention may be used alone or in combination with one or more other aspects and/or embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention, and are intended to be included within the scope of the claims and specification.

Claims (6)

1. A method for online development of software, comprising:
when a software main program is called, receiving a target service requirement of a user;
inquiring JAVA codes corresponding to target service demands from a code library according to the target service demands of the user, wherein the code library stores JAVA codes corresponding to various service demands;
dynamically compiling JAVA codes corresponding to the target service demands into class files corresponding to the target service demands;
based on the section call, executing a hot loading command of a class file corresponding to the target service requirement to obtain a call result of the class file corresponding to the target service requirement; wherein, for a JAVA application, the hot loading is to update JAVA class files at runtime, comprising: destroying the existing custom ClassLoader; updating the class file, and creating a new class loader to load the updated class file;
dynamically loading the compiled result by compiling JAVA codes on line, and loading JAVA class packages for users to compile and view on line under the condition of not restarting the server;
before inquiring the JAVA codes corresponding to the target service demands from the code library, the method further comprises the following steps:
establishing a code base according to the following mode;
developing JAVA codes corresponding to various service requirements according to the various service requirements during software development;
invoking a JAVA online compiler to precompiled JAVA codes corresponding to various service requirements;
marking the JAVA code which is successfully precompiled as the code to be issued and/or the code to be developed, and marking the JAVA code which is failed to be precompiled as the code to be developed;
encrypting the codes to be developed and storing the encrypted codes to be developed and the encrypted codes to be developed into a database;
dynamically compiling JAVA codes corresponding to the target service demands into class files corresponding to the target service demands, wherein the JAVA codes comprise:
when the JAVA code corresponding to the target service requirement is the code to be developed, carrying out secondary development on the JAVA code corresponding to the target service requirement;
when the JAVA codes corresponding to the target service demands are codes to be issued, dynamically compiling the JAVA codes corresponding to the target service demands into class files corresponding to the target service demands;
invoking a JAVA on-line compiler to precompiled JAVA codes corresponding to the target service requirements after secondary development;
and when the pre-compiling is successful, dynamically compiling JAVA codes corresponding to the target business requirements into class files corresponding to the target business requirements.
2. The method of claim 1, wherein the JAVA code corresponding to the target service requirement comprises a plurality of versions; the class file corresponding to the target service requirement contains the version number of the JAVA code;
based on the section call, executing a hot loading command of a class file corresponding to the target service requirement to obtain a call result of the class file corresponding to the target service requirement, wherein the method comprises the following steps:
based on the section call, executing the hot loading command of the class file of each version corresponding to the target service requirement, and obtaining the call result of the class file of each version corresponding to the target service requirement.
3. An apparatus for online development of software, comprising:
the target business requirement receiving module is used for receiving the target business requirement of the user when the software main program is called;
the JAVA code inquiring module is used for inquiring JAVA codes corresponding to the target service demands from the code library according to the target service demands of the user, wherein the JAVA codes corresponding to the multiple service demands are stored in the code library;
the class file compiling module is used for dynamically compiling JAVA codes corresponding to the target service demands into class files corresponding to the target service demands;
the hot loading module is used for executing a hot loading command of the class file corresponding to the target service requirement based on the section call to obtain a call result of the class file corresponding to the target service requirement; wherein, for a JAVA application, the hot loading is to update JAVA class files at runtime, comprising: destroying the existing custom ClassLoader; updating the class file, and creating a new class loader to load the updated class file;
dynamically loading the compiled result by compiling JAVA codes on line, and loading JAVA class packages for users to compile and view on line under the condition of not restarting the server;
wherein the apparatus further comprises: the code base building module is used for:
before inquiring JAVA codes corresponding to the target service demands from the code library, the code library is established in the following manner;
developing JAVA codes corresponding to various service requirements according to the various service requirements during software development;
invoking a JAVA online compiler to precompiled JAVA codes corresponding to various service requirements;
marking the JAVA code which is successfully precompiled as the code to be issued and/or the code to be developed, and marking the JAVA code which is failed to be precompiled as the code to be developed;
encrypting the codes to be developed and storing the encrypted codes to be developed and the encrypted codes to be developed into a database;
the class file compiling module is specifically used for:
when the JAVA code corresponding to the target service requirement is the code to be developed, carrying out secondary development on the JAVA code corresponding to the target service requirement;
when the JAVA codes corresponding to the target service demands are codes to be issued, dynamically compiling the JAVA codes corresponding to the target service demands into class files corresponding to the target service demands;
invoking a JAVA on-line compiler to precompiled JAVA codes corresponding to the target service requirements after secondary development;
and when the pre-compiling is successful, dynamically compiling JAVA codes corresponding to the target business requirements into class files corresponding to the target business requirements.
4. The apparatus of claim 3, wherein the JAVA code corresponding to the target service requirement comprises a plurality of versions; the class file corresponding to the target service requirement contains the version number of the JAVA code;
the heat loading module is specifically used for:
based on the section call, executing the hot loading command of the class file of each version corresponding to the target service requirement, and obtaining the call result of the class file of each version corresponding to the target service requirement.
5. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 or 2 when executing the computer program.
6. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program for executing the method of any one of claims 1 or 2.
CN202110728573.6A 2021-06-29 2021-06-29 Method and device for online development of software Active CN113342323B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110728573.6A CN113342323B (en) 2021-06-29 2021-06-29 Method and device for online development of software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110728573.6A CN113342323B (en) 2021-06-29 2021-06-29 Method and device for online development of software

Publications (2)

Publication Number Publication Date
CN113342323A CN113342323A (en) 2021-09-03
CN113342323B true CN113342323B (en) 2024-03-29

Family

ID=77481373

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110728573.6A Active CN113342323B (en) 2021-06-29 2021-06-29 Method and device for online development of software

Country Status (1)

Country Link
CN (1) CN113342323B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113703740A (en) * 2021-09-17 2021-11-26 厦门中盾安信科技有限公司 Method and system for configuring and executing service request command based on service rule
CN113703820A (en) * 2021-09-23 2021-11-26 中国银行股份有限公司 Method and device for hot loading source code, electronic equipment and storage medium
CN115373725B (en) * 2022-10-24 2023-02-03 布谷云软件技术(南京)有限公司 Software development management system and method with requirement as granularity

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6110226A (en) * 1998-02-19 2000-08-29 Cygnus Solutions Java development environment using optimizing ahead-of-time compiler
US6151703A (en) * 1996-05-20 2000-11-21 Inprise Corporation Development system with methods for just-in-time compilation of programs
US6842894B1 (en) * 1999-04-05 2005-01-11 Gateway, Inc. Dynamic Compiling
US6973646B1 (en) * 2000-07-21 2005-12-06 International Business Machines Corporation Method for compiling program components in a mixed static and dynamic environment
CN103885875A (en) * 2012-12-21 2014-06-25 中国银联股份有限公司 Device and method for verifying scripts
CN106250178A (en) * 2016-07-26 2016-12-21 北京北森云计算股份有限公司 The method that system dynamics function intercepts extension online is realized by the compiling of multilingual cloud
CN106648822A (en) * 2016-12-30 2017-05-10 深圳市九洲电器有限公司 User interface character string screening method and system
CN106775893A (en) * 2016-12-30 2017-05-31 北京小米移动软件有限公司 To the method and device of program precompile
CN107168758A (en) * 2017-04-12 2017-09-15 北京小米移动软件有限公司 The code compilation inspection method and device of many code libraries
CN107832099A (en) * 2017-10-26 2018-03-23 咪咕数字传媒有限公司 A kind of client release compatible method, apparatus and storage medium
CN108446223A (en) * 2018-03-06 2018-08-24 吉旗(成都)科技有限公司 A kind of business scenario automated testing method based on on-the-flier compiler
CN110262818A (en) * 2019-05-29 2019-09-20 北京达佳互联信息技术有限公司 The hot update method of Java code, device, electronic equipment and storage medium
CN111736916A (en) * 2020-06-08 2020-10-02 北京达佳互联信息技术有限公司 Dynamic expansion method and device based on Java language, electronic equipment and storage medium
CN112199110A (en) * 2020-10-16 2021-01-08 上海睿成软件有限公司 Restart-free operation and maintenance upgrading method, system, device and medium
CN112947934A (en) * 2021-02-25 2021-06-11 山东爱城市网信息技术有限公司 Method, device and medium for dynamically transforming business logic

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7941797B2 (en) * 2005-10-27 2011-05-10 International Business Machines Corporation Dynamically providing native libraries and their dependencies
US8327351B2 (en) * 2009-04-30 2012-12-04 Sap Ag Application modification framework
US9058193B2 (en) * 2013-11-14 2015-06-16 Google Inc. Methods and systems for providing compatibility of applications with multiple versions of an operating system
US10275278B2 (en) * 2016-09-14 2019-04-30 Salesforce.Com, Inc. Stream processing task deployment using precompiled libraries

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6151703A (en) * 1996-05-20 2000-11-21 Inprise Corporation Development system with methods for just-in-time compilation of programs
US6110226A (en) * 1998-02-19 2000-08-29 Cygnus Solutions Java development environment using optimizing ahead-of-time compiler
US6842894B1 (en) * 1999-04-05 2005-01-11 Gateway, Inc. Dynamic Compiling
US6973646B1 (en) * 2000-07-21 2005-12-06 International Business Machines Corporation Method for compiling program components in a mixed static and dynamic environment
CN103885875A (en) * 2012-12-21 2014-06-25 中国银联股份有限公司 Device and method for verifying scripts
CN106250178A (en) * 2016-07-26 2016-12-21 北京北森云计算股份有限公司 The method that system dynamics function intercepts extension online is realized by the compiling of multilingual cloud
CN106648822A (en) * 2016-12-30 2017-05-10 深圳市九洲电器有限公司 User interface character string screening method and system
CN106775893A (en) * 2016-12-30 2017-05-31 北京小米移动软件有限公司 To the method and device of program precompile
CN107168758A (en) * 2017-04-12 2017-09-15 北京小米移动软件有限公司 The code compilation inspection method and device of many code libraries
CN107832099A (en) * 2017-10-26 2018-03-23 咪咕数字传媒有限公司 A kind of client release compatible method, apparatus and storage medium
CN108446223A (en) * 2018-03-06 2018-08-24 吉旗(成都)科技有限公司 A kind of business scenario automated testing method based on on-the-flier compiler
CN110262818A (en) * 2019-05-29 2019-09-20 北京达佳互联信息技术有限公司 The hot update method of Java code, device, electronic equipment and storage medium
CN111736916A (en) * 2020-06-08 2020-10-02 北京达佳互联信息技术有限公司 Dynamic expansion method and device based on Java language, electronic equipment and storage medium
CN112199110A (en) * 2020-10-16 2021-01-08 上海睿成软件有限公司 Restart-free operation and maintenance upgrading method, system, device and medium
CN112947934A (en) * 2021-02-25 2021-06-11 山东爱城市网信息技术有限公司 Method, device and medium for dynamically transforming business logic

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈丁等.Java EE程序设计教程.西安电子科技大学出版社,2018,第336-339页. *

Also Published As

Publication number Publication date
CN113342323A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
CN113342323B (en) Method and device for online development of software
US10019256B2 (en) Systems and methods for incremental software development
US10007511B2 (en) Systems and methods for incremental software deployment
Dearle Software deployment, past, present and future
US8607208B1 (en) System and methods for object code hot updates
US8726255B2 (en) Recompiling with generic to specific replacement
US9075596B2 (en) Deployment
KR101687213B1 (en) Dynamically loading graph-based computations
US7694277B2 (en) Cross version customization of design environment
US9542175B2 (en) Continuous deployment
US20070220492A1 (en) Application verifier infrastructure and checks
CN107678748B (en) Source code file compiling method and device
US8266588B2 (en) Creating projects in a rational application developer workspace
CN105159732B (en) In mobile terminal installation or the method and mobile terminal of more new application
JP2008507775A (en) System and method for extracting and creating application meta information in a software application repository
KR20140053756A (en) Method for linking and loading to protect applications
US9542173B2 (en) Dependency handling for software extensions
US12086575B2 (en) System and method for a hybrid development platform
US20080271004A1 (en) Computer-implemented method, system, and program product for optimizing a distributed application
CN105631337A (en) System and method for controlling access to a native image of a machine code to operating system resources
CN109857432B (en) Hot updating method and device for game application
CN114610318A (en) Android application packaging method, device, equipment and storage medium
US7987457B2 (en) Targeted patching for native generation images
Islam et al. Runtime software patching: Taxonomy, survey and future directions
US9760364B2 (en) Checks for software extensions

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
GR01 Patent grant
GR01 Patent grant