Disclosure of Invention
In view of this, the embodiment of the present invention provides an application integration system and an application integration method, in which, by creating a total service integration portal (i.e. portal page), a menu of a common portion is placed in the portal, and a loading framework is provided at the portal, and when a user clicks the common menu, loading of each application is achieved by calling the framework. When the portal is used for loading the application, only the corresponding application script is loaded, the common areas such as the header and the like do not need to be refreshed, and only the working area corresponding to the business application is refreshed, namely, the loading of the business application is realized through a remote loading technology, the local refreshing of the page is realized, further, the user experience is improved, and the load of the server is reduced.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an application integration system including an entry page, a request generation module, a remote loading module, and an application integration module;
The request generation module is used for responding to the operation of a user on the entry page and generating an application access request;
the remote loading module is used for pulling a business application script according to the application access request;
the application integration module is used for generating interface elements of the business application based on the business application script and rendering the interface elements on the entry page so as to complete integration of the business application and the entry page.
In an alternative embodiment, the entry page includes a header common area in which a service application menu is presented;
The acquisition module is further configured to: and responding to the menu selection operation of the user in the header public area, and generating an application access request.
In an alternative embodiment, the portal page further includes a service area;
The application integration module is further configured to: and rendering the interface element of the business application generated based on the business application script in the business area to complete the integration of the business application and the entry page.
In an alternative embodiment, the application integration module is further configured to:
forming a preset application component object based on the business application script;
Calling a preset rendering method, generating an interface element based on the preset application component object, and adding the interface element to a page element of the service area;
and calling an application program interface corresponding to the service application script, acquiring application data and loading the acquired application data into the service area so as to complete the integration of the service application and the entry page.
In an alternative embodiment, the system further comprises a script development tool for developing business application scripts, the script development tool integrating common functional components of the portal page.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an application integration method, including:
Responding to the operation of a user on an entry page, and generating an application access request;
pulling a business application script according to the application access request;
and generating interface elements of the service application based on the service application script, and rendering the interface elements on the entry page to complete integration of the service application and the entry page.
In an alternative embodiment, the entry page includes a header common area and a service area, and a service application menu is displayed in the header common area;
Generating an application access request in response to a user operation on the portal page includes: responding to menu selection operation of a user in a header public area, and generating an application access request;
Generating an interface element of the service application based on the service application script and rendering the interface element on the entry page to complete the integration of the service application and the entry page comprises: and rendering the interface element of the business application generated based on the business application script in the business area to complete the integration of the business application and the entry page.
In an alternative embodiment, rendering the interface element of the service application generated based on the service application script in the service area to complete the integration of the service application and the portal page includes:
forming a preset application component object based on the business application script;
Calling a preset rendering method, generating an interface element based on the preset application component object, and adding the interface element to a page element of the service area;
and calling an application program interface corresponding to the service application script, acquiring application data and loading the acquired application data into the service area so as to complete the integration of the service application and the entry page.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic device including: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the application integration method of the embodiment of the invention.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements an application integration method of the embodiments of the present invention.
One embodiment of the above invention has the following advantages or benefits: by creating a total business integration portal (i.e., portal page), the public part of the menu is placed in the portal, and at the same time, a loading framework is provided at the portal, and when the user clicks on the public menu, loading of each application is achieved by calling the framework. When the portal is used for loading the application, only the corresponding application script is loaded, the common areas such as the header and the like do not need to be refreshed, and only the working area corresponding to the business application is refreshed, namely, the loading of the business application is realized through a remote loading technology, the local refreshing of the page is realized, further, the user experience is improved, and the load of the server is reduced.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of main modules of an application integration system 100 according to an embodiment of the present invention, and as shown in fig. 1, the system application integration system 100 includes an entry page 101, a request generation module 102, a remote loading module 103, and an application integration module 104.
Wherein the portal page 101 is used to provide a visualized public access interface. As an example, the entry page 101 includes a header common area, a footer common area, and a service area. The header public area is used for displaying public information such as logo, business application menu, current login user and the like. And unified management (such as hierarchical management of menus) and rendering are performed on the menus of all business applications in the header common area. The footer public area is used for displaying optional operation prompt information. The service area is used to expose components or interfaces of the teleservice application. When the user accesses the entry page for the first time, a default service application (which can be preset) is displayed in the service area, and when the user needs to jump to other service applications, the corresponding service application is loaded according to a menu selected by the user.
The request generation module 102 is configured to generate an application access request in response to a user operation on the portal page. Specifically, the request generation module 102 is configured to generate an application access request in response to a menu selection operation performed by a user in the header common area.
The remote loading module 103 is configured to pull the service application script according to the application access request.
In a practical scenario, the script of the service application is typically published on a server, which is not typically the same server as the server on which the portal page is located, so that the service application script needs to be loaded remotely.
The application integration module 104 is configured to generate an interface element of the service application based on the service application script, and render the interface element on the portal page, so as to complete integration of the service application and the portal page. Specifically, the application integration module 10 renders the interface element of the service application generated based on the service application script in the service area, so as to complete the integration of the service application and the portal page.
More specifically, the application integration module 104 completes the integration of the business application with the portal page according to the following steps:
forming a preset application component object based on the business application script;
Calling a preset rendering method, generating an interface element based on the preset application component object, and adding the interface element to a page element of the service area;
and calling an application program interface corresponding to the service application script, acquiring application data and loading the acquired application data into the service area so as to complete the integration of the service application and the entry page.
Wherein the predetermined application component object may be a reaction/vue component object. Wherein, the act is a Javascript library for building user interfaces, and vue is a set of progressive frameworks for building user interfaces. The preset rendering method may be a render function for rendering the render/vue component objects.
Specifically, when a user selects a menu, firstly, a service script of a remote service application is pulled, the service script is restored to a reaction/vue component object, the reaction/vue component object is added to the running environment of the current front-end framework and is implanted into a service area, a render method is called for rendering, and finally, an api (application program interface) of the service application is called for reading service application data, so that application integration is completed.
According to the application integration system provided by the embodiment of the invention, the general service integration portal (namely the portal page) is established, the menu of the public part is placed in the portal, meanwhile, the loading framework is provided at the portal, and when a user clicks the public menu, the loading of each application is realized by calling the framework. When the portal is used for loading the application, only the corresponding application script is loaded, the common areas such as the header and the like do not need to be refreshed, and only the working area corresponding to the business application is refreshed, namely, the loading of the business application is realized through a remote loading technology, the local refreshing of the page is realized, further, the user experience is improved, and the load of the server is reduced. Moreover, the information such as page header navigation and the like is stored in the entry page, and each business application developer does not need to manually introduce the public components, and the business application developer only focuses on the development of business application logic, so that the workload of the business application developer is reduced.
In an alternative embodiment, the system further comprises a script development tool for developing business application scripts, the script development tool integrating common functional components of the portal page.
In this embodiment, the service application script loaded by the remote loading module needs to meet the requirement of integrated application development, so that a developer needs to use the provided script development tool to help the user develop the service application meeting the specification. The process of developing business application scripts by utilizing the script development tool comprises two processes of local debugging and script packaging.
Because the entry page in the application integration system of the embodiment of the invention integrates the public functions of the business application (namely the functions of the header public area and the footer public area), the public functions do not need to be integrated when the business application script is developed. Also, the overall running effect of the service application cannot be visually seen in the development stage, so that a front-end mock technology (mock is that for some objects which are not easy to construct/acquire in the test process, a mock object is created to simulate the behavior of the objects) needs to be used, an application program interface of the service application realizes the visualization of the development stage through the local mock simulation, and a script development tool integrates front-end components of a public functional area. Information such as menus, logo, login users and the like is implanted into the script development tool, and the acquired api data simulate real entry page data. The general practice is to set a mock api path in the project of the reaction/vue, and change the running mode of the entry page and the request generation module into a local mock mode, so that the request of the api returns local simulation data to help the developer to display the public functional area. The script packaging process packages the business application into a compact/vue component, strips off the locally simulated component and data, packages only the content of the business application part, generates a section of native js script (JavaScript, js for short) from the compact/vue component through webpack tool (webpack is a module packer of a modern JavasScript application program), and deploys the script onto a web server of the business application for remote invocation by a remote loading module.
The application integration system of the embodiment of the invention uses the script development tool to carry out service development, introduces the script development tool in the service development engineering, introduces the public functional components, sets the simulation data, starts the api simulation mode of the public function, then starts the service development, is more convenient for users to debug, and checks the development effect in a visual mode.
Fig. 2 is an architecture diagram of an application integration system according to another embodiment of the present invention, which includes a total business portal module, a business application module, and a script development tool, as shown in fig. 2.
The system comprises a total business entrance module, a business application script and a business application script, wherein the total business entrance module is used for setting the layout of a public access interface and realizing a remote loading mechanism of the business application script, injecting the remote script into a specific business area and rendering the business application interface; and the business application module is responsible for developing and debugging specific business applications by using a script development tool, and packaging and publishing the specific business applications into business application scripts. The script development tool is responsible for providing the functions of packaging and local auxiliary debugging of the front-end interface.
Specifically, the total business portal module is used for establishing a page layout of the total portal, and generally comprises a header, a footer and a business working area. The header realizes the display of the public information such as logo, menu, current login user and the like. The footer is responsible for presentation of specific hints for some operations. The workspace is responsible for rendering the remote business application components. And establishing a layout to form an entry page. The user accesses the unified total entry page address to realize roaming among applications, when the user accesses the total entry page for the first time, the user firstly loads the total entry page, selects a default application to be displayed in a specific service area, and when the user needs to jump to other service applications, remotely loads a corresponding service application script according to the selected menu.
When a user selects a menu, firstly pulling a service script of a remote service application, restoring the service script into a component object of a reaction/vue, adding the component object into a running environment of a current front-end framework, implanting the component object into a service application area, calling a render method to render, and finally calling an api of the service application to read service application data to complete the integration of the service application. Specifically, the process is shown in fig. 3.
After the remote loading technology is used, the development flow has a place different from the conventional development mode, mainly needs to simulate the public function of the total business entrance module, and uses a script tool to package the business script, and other flows can be developed according to the conventional flow. Specifically, the process of using the script development tool to develop the service application script is shown in fig. 4, introducing the script development tool in the service development project, introducing the public functional components, setting the simulation data, starting the api simulation mode of the public function, then starting the service development, facilitating the debugging of the user, and viewing the development effect in a visual mode. After development is completed, the application is packaged into a script capable of being issued through a script development tool, and the script only comprises codes of the business application to form a component of compact/vue for calling and rendering by a main portal.
The script development tool of the embodiment of the invention integrates the front-end components of the public functional area, and uses the front-end mock technology to realize the visualization of the development stage of the interface of the back-end api through the local mock simulation. The method is characterized in that the service application side does not need to integrate public functions, and the whole operation effect of the service application cannot be visually seen in the development stage, so that the front-end mock technology is needed, and the interface of the back-end api is visualized in the development stage through local mock simulation. And implanting an api obtained by information such as a menu, logo, login user and the like into the script tool to simulate real business total entry data. The general practice is to set a mock api path in the reaction/vue project, change the running mode of the front end frame public access data module into the local mock mode, then the api request will return the local simulation data, helping the developer to display the public functional area. Packaging the business application into a component of compact/vue, stripping the locally simulated component and data, packaging only the content of the business application part, generating a section of native js script by packaging the business application compact/vue through a webpack tool, and deploying the section of native js script to a web server of the business application for remote call of a total business entry module.
According to the application integration system provided by the embodiment of the invention, the general service integration portal (namely the portal page) is established, the menu of the public part is placed in the portal, meanwhile, the loading framework is provided at the portal, and when a user clicks the public menu, the loading of each application is realized by calling the framework. When the portal is used for loading the application, only the corresponding application script is loaded, the common areas such as the header and the like do not need to be refreshed, and only the working area corresponding to the business application is refreshed, namely, the loading of the business application is realized through a remote loading technology, the local refreshing of the page is realized, further, the user experience is improved, and the load of the server is reduced.
Fig. 5 is a schematic diagram of main flow of a service application integration method according to an embodiment of the present invention, as shown in fig. 5, the method includes:
step S501: in response to a user operation on the portal page, an application access request is generated.
The entry page comprises a header public area and a service area, and a service application menu is displayed in the header public area.
Step S502: and pulling the business application script according to the application access request.
Specifically, the method comprises the following steps: and responding to the menu selection operation of the user in the header public area, and generating an application access request.
Step S503: and generating interface elements of the service application based on the service application script, and rendering the interface elements on the entry page to complete integration of the service application and the entry page. Specifically, the interface element of the service application generated based on the service application script is rendered in the service area, so that the integration of the service application and the entry page is completed.
In an alternative embodiment, as shown in fig. 6, this step includes the following sub-steps:
Step S601: forming a preset application component object based on the business application script;
Step S602: calling a preset rendering method, generating an interface element based on the preset application component object, and adding the interface element to a page element of the service area;
Step S603: and calling an application program interface corresponding to the service application script, acquiring application data and loading the acquired application data into the service area so as to complete the integration of the service application and the entry page.
According to the business application integration method, a total business integration portal (namely an portal page) is established, a menu of a public part is placed in the portal, a loading frame is provided at the portal, and when a user clicks the public menu, loading of each application is achieved through calling the frame. When the portal is used for loading the application, only the corresponding application script is loaded, the common areas such as the header and the like do not need to be refreshed, and only the working area corresponding to the business application is refreshed, namely, the loading of the business application is realized through a remote loading technology, the local refreshing of the page is realized, further, the user experience is improved, and the load of the server is reduced.
Fig. 7 illustrates an exemplary system architecture 700 to which the application integration method or system of embodiments of the invention may be applied.
As shown in fig. 7, a system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 is the medium used to provide communication links between the terminal devices 701, 702, 703 and the server 705. The network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 705 via the network 704 using the terminal devices 701, 702, 703 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc., may be installed on the terminal devices 701, 702, 703.
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server providing support for shopping-type websites browsed by the user using the terminal devices 701, 702, 703. The background management server can analyze and other processing on the received data such as the product information inquiry request and the like, and feed back processing results (such as target push information and product information) to the terminal equipment.
It should be noted that, the application integration method provided in the embodiment of the present invention is generally executed by the server 705, and accordingly, the application integration system is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, there is illustrated a schematic diagram of a computer system 800 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 801.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes a sending module, an obtaining module, a determining module, and a first processing module. The names of these modules do not constitute a limitation on the unit itself in some cases, and for example, the transmitting module may also be described as "a module that transmits a picture acquisition request to a connected server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include:
Responding to the operation of a user on an entry page, and generating an application access request;
pulling a business application script according to the application access request;
and generating interface elements of the service application based on the service application script, and rendering the interface elements on the entry page to complete integration of the service application and the entry page.
According to the technical scheme of the embodiment of the invention, a total service integration portal (namely, an portal page) is established, a menu of a public part is placed in the portal, meanwhile, a loading frame is provided at the portal, and when a user clicks the public menu, loading of each application is realized by calling the frame. When the portal is used for loading the application, only the corresponding application script is loaded, the common areas such as the header and the like do not need to be refreshed, and only the working area corresponding to the business application is refreshed, namely, the loading of the business application is realized through a remote loading technology, the local refreshing of the page is realized, further, the user experience is improved, and the load of the server is reduced.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.