A business development method, apparatus, electronic device, and storage medium
By encapsulating system code into system components and configuring JSON interfaces, business code can call the overall functionality, solving the problem of repeatedly writing system code in Java Web system development and achieving efficient and reliable business development.
Patent Information
- Application Number
- CN202111437229.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2041-11-30
AI Technical Summary
In the development of existing Java Web systems, programmers need to repeatedly write system code, which leads to high development difficulty, uncontrollable code quality, high maintenance costs, and difficulty in locating problems.
The system code is encapsulated into system components with overall functionality, and configured for business code to call via a JSON interface, thereby decoupling the business code and the system code.
It improves development efficiency, ensures the quality and reusability of system code, ensures stable and efficient system operation, and helps in problem localization and maintenance.
Smart Images

Figure CN114115817B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of software development technology, and more specifically, to a business development method, apparatus, electronic device and storage medium. Background Technology
[0002] Computer software mainly consists of two parts: application software and computer systems. Application software helps users solve problems promptly during computer use; examples include learning and management software within a computer system. Computer system software primarily refers to software directly related to the computer itself, such as computer monitoring and maintenance software.
[0003] Currently, most Java Web systems are developed based on the J2EE architecture or popular frameworks like Spring MVC and Spring Boot. These architectures and frameworks provide fundamental components for web application development and deployment, allowing programmers to focus on the underlying network protocols and reuse many derivative standard components such as JDBC or RMI. However, these frameworks and components only provide basic functionality; how to use these functionalities requires programmers to write system code based on the current environment and requirements. This repetitive writing of system code in each new project increases the development complexity. Summary of the Invention
[0004] The present invention provides a business development method, apparatus, electronic device, and storage medium.
[0005] The technical solution of the embodiments of the present invention is as follows:
[0006] A business development methodology, comprising:
[0007] Encapsulate the system code corresponding to the underlying resources into system components with overall functionality;
[0008] Configure JSON interfaces for the system components;
[0009] The system components are accessed via the JSON interface in the business code, so that the business code can call the overall function.
[0010] In an exemplary embodiment, the number of system components is multiple;
[0011] Configuring JSON interfaces for the system components includes: setting up interfaces for the multiple system components that conform to the JSON specification and proxy the acquisition of remote requests;
[0012] Accessing the system components via the JSON interface in the business code includes:
[0013] In the business code, a JSON object description of the called system component is set, wherein the JSON object description includes a type field and a parameter field. The type field is used to identify the type information of the overall function corresponding to the called system component, and the parameter field is used to store the parameters required to call the overall function corresponding to the system component.
[0014] The execution result described in the JSON object is obtained through the interface of the remote request obtained by the proxy.
[0015] In an exemplary implementation, the JSON object description also includes a name field for storing annotation information for the invoked system component.
[0016] In an exemplary embodiment, the system components include at least one of the following: a Hypertext Transfer Protocol request component; a database component; a log printing component; an environmental control component; and a security control component.
[0017] The type field includes at least one of the following: Hypertext Transfer Protocol request; Hadoop database request; Redis request; Shell request; Kafka request;
[0018] The business logic code uses the Freemarker engine, while the system code uses the Java engine.
[0019] In an exemplary embodiment, the method further includes:
[0020] External calls to the aforementioned business code are provided via a Dynamic Hypertext Transfer Protocol interface; or
[0021] Internal calls to the business code are provided via a pre-defined internal interface.
[0022] A business development apparatus, comprising:
[0023] The encapsulation module is used to encapsulate the system code corresponding to the underlying resources into system components with overall functionality;
[0024] The configuration module is used to configure JSON interfaces for the system components;
[0025] The calling module is used to access the system components via the JSON interface in the business code, so that the business code can call the overall function.
[0026] In an exemplary embodiment, the number of system components is multiple;
[0027] The configuration module is used to set up interfaces that conform to the JSON specification for the multiple system components and to proxy the acquisition of remote requests.
[0028] The calling module is used to set a JSON object description of the called system component in the business code. The JSON object description includes a type field and a parameter field. The type field is used to identify the type information of the overall function of the called system component. The parameter field is used to store the parameters required to call the overall function of the system component. The execution result of the JSON object description is obtained through the interface of the remote request obtained by the proxy.
[0029] In an exemplary implementation, the JSON object description also includes a name field for storing annotation information for the invoked system component.
[0030] In an exemplary embodiment, the system components include at least one of the following: a Hypertext Transfer Protocol request component; a database component; a log printing component; an environmental control component; and a security control component.
[0031] The type field includes at least one of the following: Hypertext Transfer Protocol request; Hadoop database request; Redis request; Shell request; Kafka request;
[0032] The business logic code uses the Freemarker engine, while the system code uses the Java engine.
[0033] In the exemplary implementation, it also includes:
[0034] The calling module is used to provide external calls to the business code via a dynamic hypertext transfer protocol interface; or, via a pre-defined internal interface, to provide internal calls to the business code.
[0035] A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, can implement the steps of the business development method as described in any of the preceding claims.
[0036] An electronic device comprising:
[0037] processor;
[0038] Memory used to store the processor's executable instructions;
[0039] The processor is configured to read the executable instructions from the memory and execute the instructions to implement the business development method as described in any of the preceding embodiments.
[0040] A computer program product includes computer instructions that, when executed by a processor, implement the business development method as described in any of the preceding claims.
[0041] As can be seen from the above technical solution, in this embodiment of the invention, the system code corresponding to the underlying resources is encapsulated into a system component with overall functionality; a JSON interface is configured for the system component; and the system component is accessed via the JSON interface in the business code, enabling the business code to call the overall functionality. Therefore, this embodiment of the invention decouples the business code and the system code, encapsulating the system code into a callable system component, allowing programmers to write only business code and not system code when developing business applications. This ensures the quality of the business system and improves development efficiency. Furthermore, this embodiment of the invention also improves the reusability of the system code, thereby ensuring the stable and efficient operation of the system. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 It is an architecture diagram for business development in existing technologies.
[0044] Figure 2 This is a flowchart of a business development method according to an embodiment of the present invention.
[0045] Figure 3 This is an architecture diagram for business development in an embodiment of the present invention.
[0046] Figure 4 This is a structural diagram of the business development apparatus according to an embodiment of the present invention.
[0047] Figure 5 This is an exemplary structural diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings.
[0049] For the sake of brevity and intuitiveness, the following description uses several representative embodiments to illustrate the solution of the present invention. Numerous details in the embodiments are only used to aid in understanding the solution of the present invention. However, it is obvious that the technical solution of the present invention can be implemented without being limited to these details. To avoid unnecessarily obscuring the solution of the present invention, some embodiments are not described in detail, but only a framework is given. In the following text, "comprising" means "including but not limited to," and "according to..." means "at least according to..., but not limited to only according to...". Due to Chinese language habits, unless the quantity of a component is specifically indicated below, it means that the component can be one or more, or can be understood as at least one.
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] The terms "first," "second," "third," "fourth," etc. (if present) in the description, claims, and accompanying drawings of embodiments of the present invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein.
[0052] The applicant observed that, taking Java web system development as an example, current business development commonly provides frameworks and components for web application development and deployment. This allows programmers to avoid focusing on underlying network protocols and reuse many derived standard components built upon them. However, these frameworks or components only provide basic functionality. How to specifically use these functionalities in a business system still requires programmers to write system code based on the current environment and requirements. The code written for the current environment is called system code. System code is used to ensure system performance, security, logging standards, monitoring, and alerts.
[0053] Figure 1This is an architecture diagram of business development in existing technology. As can be seen, business code and system code are mixed in the business system. This means that business developers need to write both system code and business code related to specific business functions, which has at least the following disadvantages: (1) Low development efficiency: The system code needs to be rewritten in each new project. (2) Uncontrollable code quality: The quality of the program is affected by many factors, such as whether the code style is followed, the quality and experience of the programmers, etc. The quality of the system code developed by different programmers varies greatly and is uncontrollable. (3) High maintenance cost: The system code and business code are mixed together, which makes the code readability worse and is not conducive to optimization measures such as system refactoring. (4) Difficulty in locating problems: This is mainly reflected in the standardization of code logs, such as where to enter logs and in what format.
[0054] This invention proposes a basic framework for business development, which includes comprehensive system code, including performance, security, logging standards, monitoring and alarms, etc. This system code is independent of business logic and can run independently. The framework also includes extension interfaces. Programmers responsible for business development can only conveniently use system resources through the extension interfaces provided by the framework, but cannot directly write code to call system resources, thereby achieving complete isolation between business code and system code.
[0055] Figure 2 This is a flowchart of a business development method according to an embodiment of the present invention.
[0056] like Figure 2 As shown, the method includes:
[0057] Step 201: Encapsulate the system code corresponding to the underlying resources into system components with overall functionality.
[0058] In one implementation, the system components include at least one of the following: a Hypertext Transfer Protocol (HTTP) request component; a database component; a log printing component; an environmental control component; a security control component, etc. Correspondingly, the underlying resources may include security resources, monitoring and alarm resources, log management resources, performance resources, etc.
[0059] A system component can correspond to one or more underlying resources. Once encapsulated, a system component corresponding to one or more underlying resources possesses the corresponding overall functionality. For example, a log printing component can correspond to log management underlying resources and performance underlying resources. After encapsulating the system code for log management and performance underlying resources into a log printing component, this encapsulated log printing component has the function of printing logs containing various performance metrics.
[0060] Step 202: Configure JSON interfaces for system components.
[0061] JSON (JavaScript Object Notation) is a lightweight data-interchange format. Based on a subset of ECMAScript (the JavaScript specification defined by the European Computer Association), it uses a text format completely independent of programming languages to store and represent data. Simply put, JSON can convert a set of data represented in a JavaScript object into a string, which can then be easily transmitted between networks or programs. It can also be restored to the data format supported by various programming languages when needed; for example, in PHP, JSON can be restored to an array or a basic object. When using AJAX, if you need to pass values from an array, you need to use JSON to convert the array into a string.
[0062] As can be seen, encapsulating system code into system components, which can be used through configured JSON interfaces, reduces the complexity of the system code and enhances its reusability. Furthermore, business logic can use system functions without needing to write system code; it only requires simple configuration.
[0063] System components primarily encapsulate the underlying system code, enabling the invocation of various low-level resources, ensuring sufficient performance, security, standardized logging, and rigorous monitoring. The exposed JSON interfaces, on the other hand, are used by the upper-level business layer through configuration and combination.
[0064] In one implementation, the type field includes at least one of the following: Hypertext Transfer Protocol request; Hadoop database request; Redis request; Shell request; Kafka request; wherein the business code uses the Freemarker engine and the system code uses the Java engine.
[0065] In one implementation, the JSON object description further includes a name field, which is used to store annotation information for the invoked system component.
[0066] In this embodiment of the invention, all underlying resources are described using a unified JSON object format, and the fields in this object are described as shown in Table 1:
[0067]
[0068] Table 1
[0069] Step 203: Access the system component via the JSON interface in the business code so that the business code can call the overall function.
[0070] In one exemplary implementation, the number of system components is multiple; step 201, configuring JSON interfaces for the system components, includes setting up interfaces conforming to the JSON specification for the multiple system components to proxy the acquisition of remote requests (e.g., the tools.getData() command); step 203, accessing the system components in the business code via the JSON interface, includes setting up a JSON object description of the called system component in the business code, wherein the JSON object description includes a type field (such as type in Table 1) and a parameter field (such as value in Table 1), the type field is used to identify the type information corresponding to the overall function of the called system component, and the parameter field is used to store the parameters required to call the overall function corresponding to the system component; and obtaining the execution result of the JSON object description via the interface to proxy the acquisition of remote requests.
[0071] Example (1): In the business code, the corresponding HTTP component can be called in the following way:
[0072]
[0073] Among them, the outermost <#assign / > is the identifier of the Freemark template.
[0074] First, following the format in Table 1, define a JSON object and store it in a parameter named `requestParam`. Here, `"type":"http"` indicates an HTTP request; `name` is a description of the HTTP request; and `value` is the specific parameter, describing the HTTP request URL, the method for submitting parameters, and the parameters attached to this URL. Next, call the proxy's interface for retrieving remote requests, such as `tools.getDate()`, and pass the `requestParam` parameter to `tools.getDate()`. `tools.getDate()` is an interface exposed by the system code to the business code for accessing underlying resources. Internally, it checks the value of `type` passed in the parameter and then calls the corresponding engine to parse it. For example, if the value of `type` is "http", then the HTTP parsing engine is called to parse the corresponding parameter value and obtain the result. Finally, assign the obtained result to the variable `result`.
[0075] Example (2): In the business code, call the corresponding database component in the following way:
[0076]
[0077] Similarly, following the format in Table 1, a JSON object is defined and stored in a parameter named `requestParam`. Here, `"type":"db"` indicates a database request; `value` is the specific parameter, describing the Structured Query Language (SQL) for this database request, the database execution method, and the parameters for requesting this SQL. Additionally, `config` is a database configuration, including the username and password for accessing the database. Then, the proxy is called to obtain the interface for the remote request, such as `tools.getDate()`, and the `requestParam` parameter is passed to `tools.getDate()`. Internally, `tools.getDate()` checks that the value of `type` passed in the parameter is "db", so it calls the database parsing engine to parse the corresponding parameter value and obtain the result. Finally, the obtained result is assigned to the variable `result`.
[0078] The above examples, using HTTP components and database components as examples, illustrate typical instances of calling the overall functionality of system components. In reality, the type value can also be hbase, Redis, kafka, etc., corresponding to different types of underlying resource access. The implementation of this invention does not limit this.
[0079] As can be seen, the business logic code uses the unified `tools.getDate()` method to call underlying resources without needing to concern itself with the specific implementation, performance, or security of the method; it only needs to focus on the business logic implementation. Furthermore, since Freemark itself cannot directly call underlying resources and can only do so through `tools.getDate()`, this avoids the mixing of system code and business logic.
[0080] In one implementation, the method further includes: providing an external call to the business code via a dynamic HTTP interface; or providing an internal call to the business code via a pre-defined internal interface.
[0081] The following section explains external calls.
[0082] In external calls, the entire business system implements only one dynamic HTTP interface. For example, the access path is: / deploy / {api}; this is a dynamic URL. The system will search for the corresponding Freemarker file on the server path based on the value of {api} in the URL, parse the retrieved Freemarker file, and finally return the parsing result as the result of the entire URL. For example, assuming a request is made to http: / / localhost:8080 / deploy / test1, the system will search for a file named test1, parse the content of this file using Freemarker, and finally return the parsing result as the result.
[0083] The following section explains internal calls.
[0084] Each simple business logic is stored in its own Freemarker file, and the file name corresponds to the name of the business API. Business logic may call each other, or different business logics may have the same parts. Therefore, business code also needs to be reused. This system provides an internal calling method for business code, which can achieve business code reuse.
[0085] The internal calling methods of the business code include:
[0086] Step (1): Through the inter-thread communication mechanism, send the parameters required by the called internal code to the called internal code.
[0087] Step (2): Execute the called internal code.
[0088] Step (3): Encapsulate the execution result of the called internal code into a predetermined format and output it. The implementation process of steps (1) to (3) can be encapsulated into a newly generated internal calling function, for example, named tools.code().
[0089] For example, in business code named testB, business code testA is called through tools.code("testA"), and the result of testA is parsed and stored in resultA.
[0090]
[0091]
[0092] As can be seen, this invention decouples business logic code from system code. The system code is provided by the framework, allowing programmers to focus solely on writing business logic code during development, without needing to write system code. This ensures both the quality of the system code and improves development efficiency. Furthermore, this invention enhances the reusability of the system code, thereby ensuring stable and efficient system operation. Additionally, the system code includes standardized logging, providing sufficiently accurate logs for problem localization and guaranteeing system maintainability.
[0093] Figure 3 This is an architecture diagram for business development according to an embodiment of the present invention. System developers encapsulate the system code into components that can be used through configuration. For example, system components include: HTTP request components; database components; log printing components; environment control components; security control components, etc. The resources corresponding to the underlying code include: security resources, monitoring and alarm resources, log management resources, performance resources, etc.
[0094] Business developers can use Freemarker to develop business logic. As you can see, system code and business logic are developed using different languages and written in two separate files, thus achieving physical isolation and complete decoupling. Furthermore, Freemarker is merely a rendering component; the framework itself does not provide methods for accessing underlying resources. High-performance, secure, and standardized logging, along with strictly monitored system code, can be implemented within the underlying framework, exposing simple interfaces for business logic to use. This prevents system code from accidentally infiltrating into business logic.
[0095] Figure 4 This is a structural diagram of the business development apparatus according to an embodiment of the present invention.
[0096] like Figure 4 As shown, the business development device 400 includes:
[0097] Encapsulation module 401 is used to encapsulate system code corresponding to underlying resources into system components with overall functionality;
[0098] Configuration module 402 is used to configure JSON interfaces for system components;
[0099] Module 403 is invoked to access system components via a JSON interface in business code, enabling the business code to invoke the overall functionality.
[0100] In an exemplary implementation, there are multiple system components; configuration module 402 is used to set up interfaces conforming to the JSON specification for multiple system components to proxy the acquisition of remote requests; invocation module 403 is used to set up JSON object descriptions of the invoked system components in the business code, wherein the JSON object description includes a type field and a parameter field, the type field is used to identify the type information of the overall function corresponding to the invoked system component, and the parameter field is used to store the parameters required to invoke the overall function corresponding to the system component; the execution result of the JSON object description is obtained through the interface for proxying the acquisition of remote requests.
[0101] In an exemplary implementation, the JSON object description also includes a name field, which stores annotation information for the invoked system component.
[0102] In an exemplary implementation, the system components include at least one of the following: a Hypertext Transfer Protocol (HTTP) request component; a database component; a log printing component; an environment control component; a security control component; and the type field includes at least one of the following: an HTTP request; a Hadoop database request; a Redis request; a Shell request; and a Kafka request; wherein the business code uses the Freemarker engine, and the system code uses the Java engine.
[0103] In an exemplary implementation, it further includes: a calling module for providing external calls to business code via a dynamic hypertext transfer protocol interface; or, providing internal calls to business code via a pre-defined internal interface.
[0104] This invention also provides a computer-readable medium that stores instructions, which, when executed by a processor, can perform the steps of the above-described business development method. In practical applications, the computer-readable medium may be included in the device / apparatus / system described in the above embodiments, or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, can implement the business development methods described in the above embodiments. According to the embodiments disclosed in this invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof, but this is not intended to limit the scope of protection of this invention. In the embodiments disclosed in this invention, the computer-readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0105] like Figure 5 As shown, embodiments of the present invention also provide an electronic device in which the apparatus for implementing the method of embodiments of the present invention can be integrated. For example... Figure 5 As shown, it illustrates an exemplary structural diagram of an electronic device according to an embodiment of the present invention.
[0106] Specifically, the electronic device may include a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, and a computer program stored in the memory and executable on the processor. When the program in the memory 502 is executed, the aforementioned business development method can be implemented.
[0107] In practical applications, this electronic device may also include components such as a power supply 503, an input unit 504, and an output unit 505. Those skilled in the art will understand that... Figure 5The structure of the electronic device shown does not constitute a limitation on the device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. The processor 501 is the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It performs overall monitoring of the electronic device by running or executing software programs and / or modules stored in memory 502, and by calling data stored in memory 502, thereby executing various server functions and processing data. Memory 502 can be used to store software programs and modules, i.e., the aforementioned computer-readable storage medium. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in memory 502. Memory 502 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created according to the use of the server, etc. Furthermore, memory 502 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 502 may also include a memory controller to provide processor 501 with access to memory 502.
[0108] The electronic device also includes a power supply 503 that supplies power to the various components. This power supply can be logically connected to the processor 501 via a power management system, enabling functions such as charging, discharging, and power consumption management. The power supply 503 may also include one or more DC or AC power supplies, a recharging system, a power fault detection circuit, a power converter or inverter, a power status indicator, or other arbitrary components. The electronic device may also include an input unit 504, which can receive input digital or character information and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. The electronic device may also include an output unit 505, which can display information input by the user or information provided to the user, as well as various graphical user interfaces, which can be composed of graphics, text, icons, video, and any combination thereof.
[0109] This invention also provides a computer program product including computer instructions that, when executed by a processor, perform the methods described in any of the above embodiments.
[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments disclosed in this invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in the order specified in the drawings. For example, two blocks shown connected together may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0111] This document describes the principles and implementation methods of the present invention using specific embodiments. These embodiments are merely illustrative of the method and core concepts of the present invention and are not intended to limit the invention. Those skilled in the art can make changes to the specific implementation methods and application scope based on the ideas, spirit, and principles of the present invention. Any modifications, equivalent substitutions, or improvements made should be included within the scope of protection of this invention.
Claims
1. A business development method, characterized in that, include: Encapsulate the system code corresponding to the underlying resources into system components with overall functionality; Configure JSON interfaces for the system components; The system components are accessed via the JSON interface in the business code, so that the business code can call the overall function; The system has multiple components; Configuring JSON interfaces for the system components includes configuring interfaces for the multiple system components that conform to the JSON specification and proxy the acquisition of remote requests. Accessing the system components via the JSON interface in the business code includes: In the business code, a JSON object description of the called system component is set, wherein the JSON object description includes a type field and a parameter field. The type field is used to identify the type information of the overall function corresponding to the called system component, and the parameter field is used to store the parameters required to call the overall function corresponding to the system component. The execution result described in the JSON object is obtained through the interface of the remote request obtained by the proxy.
2. The business development method according to claim 1, characterized in that, The JSON object description also includes a name field, which is used to store comment information for the called system components.
3. The business development method according to claim 1, characterized in that, The system components include at least one of the following: a Hypertext Transfer Protocol request component; a database component; a log printing component; an environment control component; and a security control component. The type field includes at least one of the following: Hypertext Transfer Protocol request; Hadoop database request; Redis request; Shell request; Kafka request; The business logic code uses the Freemarker engine, while the system code uses the Java engine.
4. The business development method according to claim 1, characterized in that, The method also includes: External calls to the aforementioned business code are provided via a Dynamic Hypertext Transfer Protocol interface; or, Internal calls to the business code are provided via a pre-defined internal interface.
5. A business development apparatus, characterized in that, include: The encapsulation module is used to encapsulate the system code corresponding to the underlying resources into system components with overall functionality; The configuration module is used to configure JSON interfaces for the system components; The calling module is used to access the system components via the JSON interface in the business code, so that the business code can call the overall function; The system has multiple components; The configuration module is used to set up interfaces that conform to the JSON specification for the multiple system components and to proxy the acquisition of remote requests. The calling module is used to set a JSON object description of the called system component in the business code. The JSON object description includes a type field and a parameter field. The type field is used to identify the type information of the overall function corresponding to the called system component. The parameter field is used to store the parameters required to call the overall function corresponding to the system component. The execution result of the JSON object description is obtained through the interface of the remote request obtained by the proxy.
6. A computer-readable storage medium storing computer instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the business development method according to any one of claims 1-4.
7. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the business development method according to any one of claims 1-4.
8. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the business development method according to any one of claims 1-4.
Citation Information
Patent Citations
Application program development method and device and application program use method and device
CN110069247A
Business service encapsulation and access system, method and device of rich client
CN110381026A