CN107153572B - Application program implementation method and device - Google Patents

Application program implementation method and device Download PDF

Info

Publication number
CN107153572B
CN107153572B CN201710244401.5A CN201710244401A CN107153572B CN 107153572 B CN107153572 B CN 107153572B CN 201710244401 A CN201710244401 A CN 201710244401A CN 107153572 B CN107153572 B CN 107153572B
Authority
CN
China
Prior art keywords
service process
process script
client
service
running
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
CN201710244401.5A
Other languages
Chinese (zh)
Other versions
CN107153572A (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201710244401.5A priority Critical patent/CN107153572B/en
Publication of CN107153572A publication Critical patent/CN107153572A/en
Application granted granted Critical
Publication of CN107153572B publication Critical patent/CN107153572B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/461Saving or restoring of program or task context

Abstract

The invention relates to the technical field of application development and discloses an application program implementation method and device. It includes: the server receives and stores the service process script; the service process script includes: the service process script running method comprises the steps that a service logic of an application program running across a server and a client and a running position identifier arranged in the service logic are matched with each other; when the service process script is operated by the server, if the operation position identification is detected, the operation of the service process script is suspended, context information generated by the service process script is acquired and synchronized to the client, and the client continues to operate the service process script according to the synchronized context information and the operation position identification; and when the service end detects the context information and the running position identification from the client synchronization, the service process script is continuously run. The embodiment greatly reduces the labor intensity of application program development, and is beneficial to improving the application program development quality.

Description

Application program implementation method and device
Technical Field
The invention relates to the technical field of application development, in particular to an application program implementation method and device.
Background
The wide spread of infrastructures like mobile internet and mobile payment within the country has made many internet-based service industry applications possible. Currently, in application development, fact is a popular application framework (the framework is used for defining a set of problem solving processes, providing related components to be applied in the problem solving process, and providing a program suite of methods for adding the related components). The fact is also defined as a JavaScript library for constructing a UI (short for User Interface), can easily generate various controls (the controls refer to display elements such as "button", "text box", "place selected on map", "album selection", and the like displayed on the User Interface) required by the programmer, and can perform operations such as quickly binding events. The developer only needs to care about the change of the whole data, namely how the UI between two data changes (such as adding a line of characters and adding a button) and the rest work can be completely handed over to the reach frame to do without needing to care about how to operate the UI specifically. Therefore, the logic complexity can be obviously reduced by using the React, so that the difficulty of application development is reduced, and the chance of generating Bug is less.
The WeChat UI development framework is a set of user interface framework based on WeChat clients. The WeChat UI development framework enables the WeChat public signal to directly call a native interface of the WeChat, the WeChat public signal has the capability of partial native application, and the WeChat UI enables the WeChat public signal to have user experience with a consistent style.
The inventor of the invention finds out that: the deficiencies of React are that: the method is a general application program framework mainly designed for a UI (user interface), the back-end framework still only has the most basic data reading and writing function and does not have a logic processing function, and fine-grained controls such as most basic buttons, labels and the like can be provided for developers only under the current software engineering theoretical level. For UI interface design, a developer needs to use coarse-grained controls such as "payment component", "chat page", "recording interface", and the like, and also needs to write data processing logic more conveniently, where the data processing logic includes data verification, a series of user interaction behaviors rather than simply reading and writing a database. Therefore, although the labor and time for developing a general internet App (Application) are effectively reduced, the fact still has a huge promotion space for rapidly developing internet applications. While the WeChat UI (i.e., WeUI) is still just a front-end UI framework that provides coarser grained and more practical UI controls than React, the WeChat UI also does not provide back-end server support required by Internet apps (e.g., service Apps). The WeUI only partially reduces the labor intensity of service industry App developers. Therefore, even if the current latest development tool is used by a developer, developing a complete internet service application still needs to consume a lot of manpower and time to write a lot of reusable components (such as chat tools, ordering tools, payment components, etc.), and needs to write a set of backend server processing programs, set a database, and set complex data verification and state storage programs, etc., so that the risk of low program robustness caused by high coding complexity needs to be borne. Therefore, the development efficiency and quality of the application program are seriously hindered by the problems of complicated control splicing (because a development tool only provides a space with fine granularity) and high code logic design difficulty (namely, the problem of technical layers such as calling of an API (application programming interface) and the like of a developer) faced by the existing application program developer, so that how to develop the service industry application more quickly and more robustly is vital to related small and medium-sized entrepreneurship enterprises and individuals.
Disclosure of Invention
The embodiment of the invention aims to provide an application program implementation method and device, so that developers do not need to consider the technical problem of library file calling in a back-end server, development difficulty can be reduced, and development efficiency can be improved.
In order to solve the above technical problem, an embodiment of the present invention provides an application program implementation method, applied to a server, including: receiving and storing a service process script; wherein the service procedure script comprises: the system comprises a service logic of an application program running across a server and a client and a running position identifier arranged in the service logic, wherein the running position identifier is used for indicating that the service logic runs on the client or the server; sending the service process script to a client matched with the server for the client to store and run the service process script; running the service process script in cooperation with the client; when the service process script is operated by the service end, if the operation position identification is detected, the operation of the service process script is suspended, the context information generated by the service process script is acquired, and the acquired context information is synchronized to the client, so that the client can continue to operate the service process script according to the synchronized context information and the operation position identification; and when the context information and the running position identification from the client synchronization are detected, continuing to run the service process script according to the context information and the running position identification of the client synchronization.
The embodiment of the invention also provides an application program implementation method, which is applied to the client and used for receiving and storing the service process script from the server; wherein the service procedure script comprises: the system comprises a service logic of an application program running across a server and a client and a running position identifier arranged in the service logic, wherein the running position identifier is used for indicating that the service logic runs on the client or the server; the service process script is matched with the server to run; when the client runs the service process script, if the running position identification is detected, the service process script is suspended, context information generated by the service process script is obtained, the obtained context information is synchronized to the server, and the server continues to run the service process script according to the synchronized context information and the running position identification; and when the context information and the running position identification from the server side synchronization are detected, continuing to run the service process script according to the context information and the running position identification from the server side synchronization.
The embodiment of the present invention further provides an application implementation apparatus, applied to a server, including: the first receiving module is used for receiving and storing the service process script; wherein the service procedure script comprises: the system comprises a service logic of an application program running across a server and a client and a running position identifier arranged in the service logic, wherein the running position identifier is used for indicating that the service logic runs on the client or the server; the first sending module is used for sending the service process script to a client matched with the server, so that the client can store and run the service process script; the first control module is used for controlling the service end and the client end to run the service process script in a matched mode; the first control module includes: the first detection submodule is used for detecting the running position identification when the service process script is run by the service end; the first acquisition submodule is used for suspending the operation of the service process script and acquiring context information generated by the service process script when the first detection submodule detects the operation position identification; the first synchronization submodule is used for synchronizing the acquired context information to the client side, so that the client side can continue to operate the service process script according to the synchronized context information and the operation position identification; and the first recovery submodule is used for continuing to run the service process script according to the context information and the running position identification of the client synchronization.
The embodiment of the present invention further provides an application implementation apparatus, applied to a client, including: the second receiving module is used for receiving and storing the service process script from the server; wherein the service procedure script comprises: the system comprises a service logic of an application program running across a server and a client and a running position identifier arranged in the service logic, wherein the running position identifier is used for indicating that the service logic runs on the client or the server; the second control module is used for controlling the client and the server to run the service process script in a matched manner; the second control module includes: a third detection submodule, configured to detect the running position identifier when the client runs the service process script; the second obtaining submodule is used for pausing the operation of the service process script and obtaining the context information generated by the service process script when the operation position identification is detected; the second synchronization submodule is used for synchronizing the acquired context information to the server side, so that the server side can continue to operate the service process script according to the synchronized context information and the operation position identification; the fourth detection submodule is used for detecting the context information and the running position identification from the server side synchronization; and the second recovery submodule is used for continuing to run the service process script according to the context information and the running position identification synchronized by the service end.
Compared with the prior art, the implementation mode of the invention has the advantages that a developer can write the service process of the application program into a file, namely the service process script, the operation position identification is set in the service process script, the operation position of the service logic after the current position of the service logic in the service process script is indicated through the operation position identification, namely the operation is carried out on the service end or the client, and when the operation of the service process script is finished, all functions of the application program can be realized. In the running process of the service process script, when the running position identification is detected, one end of the service process script which is currently running can obtain the context information generated by the end and synchronize the context information to the corresponding end of the service process script, so that the corresponding end can continue to run the service process script. Therefore, the embodiment of the invention does not need a developer to design the calling logic of the library file of the back-end server (for example, the problem of the technical level of the calling sequence of the API and the like is considered), thereby reducing the development difficulty of the application program and being beneficial to improving the development efficiency.
In addition, the obtaining of the context information generated by the service process script specifically includes: initializing the application program; wherein the initialization is used for allocating a cache used for storing the running data of the service process script; when the service process script runs, storing running data of the service process script in the cache; and when the operation position identification is detected, reading the operation data in the cache, and taking the read operation data as context information. The context information is stored through the initialization cache, and when the context information needs to be synchronized to the corresponding end, the context information can be quickly acquired, so that the synchronization efficiency is ensured.
In addition, the synchronizing the acquired context information to the client specifically includes: and synchronizing the context information to the client through a preset interface. In addition, the application program implementation method further comprises the following steps: presetting an application program template, wherein the application program template comprises predefined content elements and an application program frame; receiving a content element configuration file, and generating content elements of the application program according to predefined content elements and the content element configuration file; the running of the service process script in cooperation with the client specifically includes: setting the running environment of the service process script, a user page for generating the service process script and components required by the service process script according to the application program framework; and running the service process script based on the running environment, the user page and the component. By presetting the application program template and setting the running environment of the application program service process script, the user page for generating the service process script, the components required by the service process script and the like according to the preset application program template, the workload of repeated development of developers can be greatly reduced.
Additionally, the content element includes one or any combination of the following: commodity details, order details, payment information.
In addition, the obtaining of the context information generated by the service process script specifically includes: initializing the application program; wherein the initialization is used for allocating a cache used for storing the running data of the service process script; when the service process script runs, storing running data of the service process script in the cache; and when the operation position identification is detected, reading the operation data in the cache, and taking the read operation data as context information.
In addition, the storing the running data of the service process script in the cache specifically includes: displaying the form; wherein the form comprises a content element and a content element entry corresponding to the content element; and if the content element entry is detected to be triggered, displaying a corresponding content element modification interface, receiving content element modification information, and storing the received content element modification information into the cache.
Drawings
FIG. 1 is a flow chart of an application implementation method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of an application implementation method according to a second embodiment of the present invention;
FIG. 3 is a flowchart of an application implementation method according to a third embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an application implementation apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an application program implementing device according to a fifth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
When an existing developer develops an Application Program using a development tool for developing an internet Application Program and the like, the developer needs to manually write an interactive Interface between a server and a client and manually define a state transition mode of an order or a commodity and the like, that is, the developer needs to consider that data in a database of the server is acquired through an Application Program Interface (API), however, since different data have different permissions (such as some data, a user a can access and a user B cannot access), and other context information restrictions, the API needs to be repeatedly written when developing a new APP. Meanwhile, in order to call the API, a developer needs to set many technical details such as "click event", "callback" and the like in a client page, and these technical details need to be rewritten for different APIs, so that a large amount of repeated labor exists in writing a new APP, and such technical details have certain logic difficulty. Aiming at the problem that technical details such as API (application programming interface) and the like need to be written repeatedly, the service logic of the application program is written into a file (namely, the service process script), and a synchronization mechanism is introduced, so that the service process script can run in a coordinated and ordered mode across a server and a client, the complete service logic of the application program is realized, and further, various functions of the application program are realized.
The first embodiment of the present invention relates to an application program implementation method, which is applied to a server, and the specific flow is as shown in fig. 1, including step 101 to step 103.
Step 101: receiving and storing a service process script, wherein the service process script comprises: the service logic of the application program running across the server and the client and the running position identification set in the service logic. The operation position identifier is used for indicating that the business logic operates on the client or the server.
Wherein the business logic may be code describing an application service process. Herein, an application service process may refer to a service process (also referred to as a service flow) of any internet-based application. For example, the service flow of taxi taking software is as follows: calling express, dispatching, starting service, ending service, completing payment, etc. When a developer writes a service process script, how to acquire data of a server does not need to be considered in a technical level, that is, logic for acquiring the data of the server does not need to be written by itself through an API or other realizable modes, and only business logic needs to be written according to a service flow and an operation position identifier is set in the business logic. Generally, the codes of the business logic run sequentially line by line, but the service process script of this embodiment needs to run at both the server and the client, so the running location identifier is used to indicate the running location of the business logic behind the running location identifier (i.e. at the server or the client). For example, when writing a service process script of taxi taking software, a developer can manually set that a calling express car is operated at a client, a dispatching express car is operated at a server, and the like.
Step 102: and sending the service process script to a client matched with the server for the client to store and run the service process script.
When the user uses the APP realized based on the embodiment, the APP can be downloaded from the server through the client, wherein the downloaded APP contains the service process script.
Step 103: and running the service process script in cooperation with the client.
Wherein step 103 specifically includes sub-steps 1031 to 1032.
Substep 1031: when the service process script is operated by the server, if the operation position identification is detected, the operation of the service process script is suspended, the context information generated by the service process script is acquired, and the acquired context information is synchronized to the client, so that the client can continue to operate the service process script according to the synchronized context information and the operation position identification.
Substep 1032: and when the context information and the operation position identification from the client synchronization are detected, continuing to operate the service process script according to the context information and the operation position identification of the client synchronization.
Wherein there is no tandem restriction between sub-step 1031 and sub-step 1032. In practical applications, the service process script can be started to run at the client side or the server side. When the service process script is detected to be triggered, the service process script starts to run, and when the service process script is detected to be run over, the service flow of the application program is correspondingly realized, and meanwhile, various functions of the application program can be correspondingly realized. The service procedure script may be triggered, for example, by an event such as detection of an application icon being touched, a control of the application being triggered, etc. The present embodiment does not limit the manner in which the service process script is triggered.
Since the service process script is a file and needs to be run across the server and the client, two cases of the server running the service process script are illustrated in sub-step 1031 and sub-step 1032, respectively: firstly, when a service process script runs at a server side currently and needs to be switched to a client side to run, context information generated on the server side needs to be synchronized to the client side, and secondly, when the service process script runs at the client side currently and needs to be switched to the server side to run, the context information generated on the client side needs to be synchronized to the server side. The context information comprises a running position identifier, so that the client or the server can continue to run the service process script according to the running position identifier.
The obtaining of the context information generated by the service process script specifically includes: and initializing the application program, wherein the initialization is used for allocating a cache which is used for storing the running data of the service process script. And storing the running data of the service process script in a cache when the service process script runs. And when the running position identification is detected, reading the running data in the cache, and taking the read running data as context information.
In other words, in the embodiment, when the service process script runs on the server, the context information generated when the service process script runs can be obtained in the initialized cache, and does not need to be stored in the library file, and further, developers need not to write the API to call the relevant library file to obtain the relevant data and information generated by the running of the application program.
In this embodiment, when the service process script is run on the client, the server suspends running the service process script. The context information can be synchronized to the client through the preset interface, where the preset interface may be a device that synchronizes the context information through the hypertext transfer protocol.
Compared with the prior art, the method and the system have the advantages that developers can write the service process into a file, namely the service process script, set the operation position identification in the service process script, and control the service process script to run across the server and the client through the operation position identification. Meanwhile, the context information generated on the server and the client is synchronized to the other end, so that data support is provided for continuous operation of the service process script across the server and the client, and normal operation of the service process script is guaranteed. Therefore, the embodiment avoids the condition that a developer writes the access logic of the back-end server by self, reduces the difficulty of application program development, and is beneficial to improving the development efficiency and the quality of the application program.
A second embodiment of the present invention relates to an application program implementation method. The second embodiment is an improvement on the first embodiment, and the main improvements are as follows: in the second embodiment, the tedious work of manually splicing the fine granularity control by a developer, repeatedly developing an application program frame and the like is avoided through the preset application program template and the predefined content elements, and the development efficiency is further improved.
As shown in fig. 2, the application implementation method of the present embodiment includes steps 201 to 205.
Step 201: an application template is preset, and the application template comprises predefined content elements and an application framework.
The content element is an operation object for recording data and state of the application program. In some examples, the application content element may include one or any combination of the following: commodity details, order details, payment information. The present embodiment is not particularly limited to the content element. In one example, the application content elements may also be application components at the level of application base pages and components, such as "payment components," "chat pages," "recording interfaces," "notification components," and so forth.
Step 202: receiving a content element configuration file and generating content elements of the application according to the predefined content elements and the content element configuration file.
Wherein the content element configuration file is used to determine content elements used by the application. In practical application, the content element types additionally required by the user can be expanded through the plug-in.
Step 203: receiving and storing a service process script, wherein the service process script comprises: the service logic of the application program running across the server and the client and the running position identification set in the service logic. The operation position identifier is used for indicating that the business logic operates on the client or the server.
In this embodiment, the sequence of step 202 and step 203 is not limited.
Step 204: and sending the service process script to a client matched with the server for the client to store and run the service process script.
Step 205: and running the service process script in cooperation with the client.
Step 205 specifically includes sub-steps 2051 to 2052:
substep 2051: and setting the running environment of the service process script, generating a user page of the service process script and components required by the service process script according to the application program framework. The user page may be various interactive pages, among others.
Substep 2052: the service process script is run based on the run environment, the user page, and the component.
Substep 2053: when the service process script is operated by the server, if the operation position identification is detected, the operation of the service process script is suspended, the context information generated by the service process script is acquired, and the acquired context information is synchronized to the client, so that the client can continue to operate the service process script according to the synchronized context information and the operation position identification.
Substep 2054: and when the context information and the operation position identification from the client synchronization are detected, continuing to operate the service process script according to the context information and the operation position identification of the client synchronization.
Substeps 2051 and 2052 generate the running environment, the base page, and some components of the application program through a preset application template, so that repeated development by a developer can be avoided.
In this embodiment, the obtaining of the context information generated by the service process script specifically includes: initializing an application program, wherein the initialization is used for distributing a cache, and the cache is used for storing running data of a service process script; when the service process script runs, storing the running data of the service process script in a cache; and when the running position identification is detected, reading the running data in the cache, and taking the read running data as context information. When a plurality of application programs implemented based on the embodiment are run in the server, different application programs need to be initialized respectively, so that the application programs can be isolated, and mutual interference among the different application programs is avoided. Each application program can have a plurality of service process scripts and a plurality of content elements, but different application programs cannot mutually trigger service process scripts, access calculation results or access content elements unless a developer explicitly states in the definition of the content elements or the service process scripts. Thus, the applications can all run on the same client or server. In other words, the service process script execution environments (client or server) of different applications are initialized separately, ensuring that computation results, content elements, etc. are not shared. And if the calculation result needing to be shared needs to be specified in advance, the operating environment sets an access interface. If the service process script and the content element of other application programs are triggered, accessed and modified, the service process running environment checks whether the relevant service process script or the content element of the application program has an access interface, and if so, the service process running environment can continue.
The embodiment provides the reusable application program framework, the basic page, the components and the like for developers by providing the preset application program template and the predefined content elements, so that developers (users) only need to write a simple content element configuration script and a small amount of business logic codes to prepare the complete application program when developing the application program. Therefore, the method and the device can not only obviously improve the development efficiency of the application program and reduce the development difficulty of the application program, but also be beneficial to improving the development quality of the application program.
A third embodiment of the present invention relates to an application program implementation method, which is applied to a client, and as shown in fig. 3, the application program implementation method of the present embodiment includes steps 301 to 302.
Step 301: and receiving and storing the service process script from the server.
Step 302: and running the service process script in cooperation with the server.
Step 302 specifically includes sub-step 3021 and sub-step 3022.
Substep 3021: when the client runs the service process script, if the running position identification is detected, the service process script is paused, the context information generated by the service process script is obtained, and the obtained context information is synchronized to the server so that the server can continue to run the service process script according to the synchronized context information and the running position identification. And when the server receives the context information and the running position identification synchronized with the client, the server recovers the running of the service process script from the received running position identification.
Substep 3022: and when the context information and the running position identification from the server side synchronization are detected, continuing to run the service process script according to the context information and the running position identification from the server side synchronization.
The manner of obtaining the context information generated by the service process script in sub-step 3021 is, for example: and initializing the application program, wherein the initialization is used for allocating a cache, and the cache is used for storing the running data of the service process script. And storing the running data of the service process script in a cache when the service process script runs. And when the operation position identification is detected, reading the operation data in the cache, and taking the read operation data as the context information.
In sub-step 3021, storing the running data of the service process script in a cache, which may specifically include: a form is displayed, wherein the form includes a content element and a content element entry corresponding to the content element. And if the content element entry is detected to be triggered, displaying a corresponding content element modification interface, receiving content element modification information, and storing the received content element modification information into a cache. The content elements can use the content elements predefined by the server, can be developed by a developer, and can be added into the application program through a plug-in.
Compared with the prior art, the implementation mode has the advantages that the client can be matched with the server to synchronize the running data of the service process script, so that the service process script can run in a coordinated and ordered mode across the server and the client, and the realization of various functions of the application program is guaranteed.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the steps contain the same logical relationship, which is within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A fourth embodiment of the present invention relates to an application program implementing apparatus applied to a server, and as shown in fig. 4, the application program implementing apparatus includes:
the first receiving module 40 is used for receiving and storing the service process script. Wherein the service process script comprises: the service logic of the application program running across the server and the client and the running position identification set in the service logic. The operation position identifier is used for indicating that the service logic operates in a client or a server.
And the first sending module 41 is configured to send the service process script to a client cooperating with the server, so that the client stores and runs the service process script.
And the first control module 42 is used for controlling the service end and the client end to run the service process script in a matching manner.
Wherein the first control module 42 includes:
the first detection submodule 420 is configured to detect an operation location identifier when the service process script is operated by the server.
The first obtaining submodule 421 is configured to suspend running the service process script when the first detecting submodule 420 detects the running position identifier, and obtain context information generated by the service process script.
The first synchronization sub-module 422 is configured to synchronize the acquired context information to the client, so that the client continues to run the service process script according to the synchronized context information and the running location identifier.
A second detection submodule 423, configured to detect context information from the client synchronization and the running location identity. Wherein the second detection submodule 423 may detect context information from the client synchronization and the run location identification when the service process script is not started or paused.
The first recovery submodule 424 is configured to continue to run the service process script according to the context information of the client synchronization and the running location identifier.
Compared with the prior art, the method and the system have the advantages that developers can write the service process into a file, namely the service process script, set the operation position identification in the service process script, and control the service process script to run across the server and the client through the operation position identification. Meanwhile, the context information generated on the server and the client is synchronized to the other end, so that data support is provided for continuous operation of the service process script across the server and the client, and normal operation of the service process script is guaranteed. Therefore, the embodiment avoids the condition that a developer writes the access logic of the back-end server by self, reduces the difficulty of application program development, and is beneficial to improving the development efficiency and the quality of the application program.
It should be understood that this embodiment is an example of the apparatus corresponding to the first embodiment, and may be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
A fifth embodiment of the present invention relates to an application program implementing apparatus applied to a client, as shown in fig. 5, the application program implementing apparatus including:
and the second receiving module 50 is used for receiving and storing the service process script from the server. Wherein the service process script comprises: the service logic of the application program running across the server and the client and the running position identification set in the service logic. The operation position identifier is used for indicating that the business logic operates on the client or the server.
And the second control module 51 is configured to control the client and the server to run the service process script in a matching manner.
The second control module 51 includes:
and a third detection sub-module 510, configured to detect the running location identifier when the client runs the service process script.
The second obtaining sub-module 511 is configured to, when the running location identifier is detected, suspend running the service process script, and obtain context information generated by the service process script.
The second synchronization sub-module 512 is configured to synchronize the obtained context information to the server, so that the server continues to run the service process script according to the synchronized context information and the running position identifier.
A fourth detection submodule 513 is configured to detect context information from the server synchronization and the running location identifier. The fourth detection sub-module 513 may detect the context information from the server synchronization and the running location identifier when the running of the service process script is not started or suspended.
And a second recovery submodule 514, configured to continue to run the service process script according to the context information synchronized by the service end and the running position identifier.
Compared with the prior art, the implementation mode has the advantages that the client can be matched with the server to synchronize the running data of the service process script, so that the service process script can run in a coordinated and ordered mode across the server and the client, and the realization of various functions of the application program is guaranteed.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
Those skilled in the art can understand that all or part of the steps in the method of the foregoing embodiments may be implemented by a program to instruct related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (10)

1. An application program implementation method is applied to a server side, and is characterized by comprising the following steps:
receiving and storing a service process script; wherein the service procedure script comprises: the system comprises a service logic of an application program running across a server and a client and a running position identifier arranged in the service logic, wherein the running position identifier is used for indicating that the service logic runs on the client or the server;
sending the service process script to a client matched with the server for the client to store and run the service process script;
running the service process script in cooperation with the client;
when the service process script is operated by the service end, if the operation position identification is detected, the operation of the service process script is suspended, the context information generated by the service process script is acquired, and the acquired context information is synchronized to the client, so that the client can continue to operate the service process script according to the synchronized context information and the operation position identification;
and when the context information and the running position identification from the client synchronization are detected, continuing to run the service process script according to the context information and the running position identification of the client synchronization.
2. The application implementation method of claim 1,
the obtaining of the context information generated by the service process script specifically includes:
initializing the application program; wherein the initialization is used for allocating a cache used for storing the running data of the service process script;
when the service process script runs, storing running data of the service process script in the cache;
and when the operation position identification is detected, reading the operation data in the cache, and taking the read operation data as context information.
3. The application implementation method of claim 1,
the synchronizing the obtained context information to the client specifically includes:
and synchronizing the context information to the client through a preset interface.
4. The application implementation method of claim 1, further comprising:
presetting an application program template, wherein the application program template comprises predefined content elements and an application program frame;
receiving a content element configuration file, and generating content elements of the application program according to predefined content elements and the content element configuration file;
the running of the service process script in cooperation with the client specifically includes:
setting the running environment of the service process script, a user page for generating the service process script and components required by the service process script according to the application program framework;
and running the service process script based on the running environment, the user page and the component.
5. The application implementation method of claim 4,
the content element comprises one or any combination of the following: commodity details, order details, payment information.
6. An application program implementation method is applied to a client, and is characterized by comprising the following steps:
receiving and storing a service process script from a server; wherein the service procedure script comprises: the system comprises a service logic of an application program running across a server and a client and a running position identifier arranged in the service logic, wherein the running position identifier is used for indicating that the service logic runs on the client or the server;
the service process script is matched with the server to run;
when the client runs the service process script, if the running position identification is detected, the service process script is suspended, context information generated by the service process script is obtained, the obtained context information is synchronized to the server, and the server continues to run the service process script according to the synchronized context information and the running position identification;
and when the context information and the running position identification from the server side synchronization are detected, continuing to run the service process script according to the context information and the running position identification from the server side synchronization.
7. The application implementation method of claim 6,
the obtaining of the context information generated by the service process script specifically includes:
initializing the application program; wherein the initialization is used for allocating a cache used for storing the running data of the service process script;
when the service process script runs, storing running data of the service process script in the cache;
and when the operation position identification is detected, reading the operation data in the cache, and taking the read operation data as context information.
8. The application implementation method of claim 7,
the storing the running data of the service process script in the cache specifically includes:
displaying the form; wherein the form comprises a content element and a content element entry corresponding to the content element;
and if the content element entry is detected to be triggered, displaying a corresponding content element modification interface, receiving content element modification information, and storing the received content element modification information into the cache.
9. An application program implementing device applied to a server side is characterized by comprising:
the first receiving module is used for receiving and storing the service process script; wherein the service procedure script comprises: the system comprises a service logic of an application program running across a server and a client and a running position identifier arranged in the service logic, wherein the running position identifier is used for indicating that the service logic runs on the client or the server;
the first sending module is used for sending the service process script to a client matched with the server, so that the client can store and run the service process script;
the first control module is used for controlling the service end and the client end to run the service process script in a matched mode;
the first control module includes:
the first detection submodule is used for detecting the running position identification when the service process script is run by the service end;
the first acquisition submodule is used for suspending the operation of the service process script and acquiring context information generated by the service process script when the first detection submodule detects the operation position identification;
the first synchronization submodule is used for synchronizing the acquired context information to the client side, so that the client side can continue to operate the service process script according to the synchronized context information and the operation position identification;
a second detection submodule for detecting context information from the client synchronization and a running location identity,
and the first recovery submodule is used for continuously running the service process script according to the context information and the running position identification synchronized by the client.
10. An application program implementing device applied to a client, comprising:
the second receiving module is used for receiving and storing the service process script from the server; wherein the service procedure script comprises: the system comprises a service logic of an application program running across a server and a client and a running position identifier arranged in the service logic, wherein the running position identifier is used for indicating that the service logic runs on the client or the server;
the second control module is used for controlling the client and the server to run the service process script in a matched manner;
the second control module includes:
a third detection submodule, configured to detect the running position identifier when the client runs the service process script;
the second obtaining submodule is used for pausing the operation of the service process script and obtaining the context information generated by the service process script when the operation position identification is detected;
the second synchronization submodule is used for synchronizing the acquired context information to the server side, so that the server side can continue to operate the service process script according to the synchronized context information and the operation position identification;
the fourth detection submodule is used for detecting the context information and the running position identification from the server side synchronization;
and the second recovery submodule is used for continuing to run the service process script according to the context information and the running position identification synchronized by the service end.
CN201710244401.5A 2017-04-14 2017-04-14 Application program implementation method and device Active CN107153572B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710244401.5A CN107153572B (en) 2017-04-14 2017-04-14 Application program implementation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710244401.5A CN107153572B (en) 2017-04-14 2017-04-14 Application program implementation method and device

Publications (2)

Publication Number Publication Date
CN107153572A CN107153572A (en) 2017-09-12
CN107153572B true CN107153572B (en) 2020-08-07

Family

ID=59793460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710244401.5A Active CN107153572B (en) 2017-04-14 2017-04-14 Application program implementation method and device

Country Status (1)

Country Link
CN (1) CN107153572B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101957756A (en) * 2010-09-29 2011-01-26 南京魔盒信息科技有限公司 System and method for rapidly generating intelligent mobile terminal program
CN102098211A (en) * 2009-12-11 2011-06-15 华为技术有限公司 Service Mashup method for dynamic cooperation of client and server, server and client
CN105204917A (en) * 2015-11-05 2015-12-30 北京奇虎科技有限公司 Method and device for loading configuration files at starting moment of application program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10101983B2 (en) * 2014-11-07 2018-10-16 Open Text Sa Ulc Client application with embedded server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098211A (en) * 2009-12-11 2011-06-15 华为技术有限公司 Service Mashup method for dynamic cooperation of client and server, server and client
CN101957756A (en) * 2010-09-29 2011-01-26 南京魔盒信息科技有限公司 System and method for rapidly generating intelligent mobile terminal program
CN105204917A (en) * 2015-11-05 2015-12-30 北京奇虎科技有限公司 Method and device for loading configuration files at starting moment of application program

Also Published As

Publication number Publication date
CN107153572A (en) 2017-09-12

Similar Documents

Publication Publication Date Title
US11269696B2 (en) Application processing method and apparatus
US10785175B2 (en) Polling extension application for interacting with a messaging application
WO2018228211A1 (en) Application conversion method, apparatus and device
CN109074278B (en) Validating stateful dynamic links in mobile applications
US20170289338A1 (en) Enabling stateful dynamic links in mobile applications
US9058193B2 (en) Methods and systems for providing compatibility of applications with multiple versions of an operating system
US20130036196A1 (en) Method and system for publishing template-based content
TW201601059A (en) Methods for screen sharing and apparatuses using the same
CN112947969B (en) Page off-screen rendering method, device, equipment and readable medium
US20180196584A1 (en) Execution of multiple applications on a device
CN114816401B (en) Interface element positioning method, electronic equipment and storage medium
CN109445891B (en) Picture configuration and display method, device and computer readable storage medium
CN111861454A (en) Method and device for displaying unique identifier of digital object
US10671373B1 (en) Mechanism for automatically incorporating software code changes into proper channels
US8769498B2 (en) Warning of register and storage area assignment errors
CN111324398A (en) Recent content processing method, device, terminal and storage medium
CN107153572B (en) Application program implementation method and device
US9477448B2 (en) Screen-oriented computing program refactoring
CN110096325B (en) Social dynamic information display method, computer equipment and storage medium
CN113268221A (en) File matching method and device, storage medium and computer equipment
CN105183491A (en) Cross-platform desktop GIS and starting method thereof
CN111026463A (en) Page loading method, device, equipment and storage medium
US20140244538A1 (en) Business process management, configuration and execution
CN110891120B (en) Interface content display method and device and storage medium
WO2023245369A1 (en) Application starting method and apparatus, electronic device, and storage medium

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