CN109597617B - Method and device for quickly generating service page based on template - Google Patents

Method and device for quickly generating service page based on template Download PDF

Info

Publication number
CN109597617B
CN109597617B CN201910072816.8A CN201910072816A CN109597617B CN 109597617 B CN109597617 B CN 109597617B CN 201910072816 A CN201910072816 A CN 201910072816A CN 109597617 B CN109597617 B CN 109597617B
Authority
CN
China
Prior art keywords
page
code
service
template
business
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
CN201910072816.8A
Other languages
Chinese (zh)
Other versions
CN109597617A (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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910072816.8A priority Critical patent/CN109597617B/en
Publication of CN109597617A publication Critical patent/CN109597617A/en
Application granted granted Critical
Publication of CN109597617B publication Critical patent/CN109597617B/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/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Abstract

The disclosure discloses a method, a device, electronic equipment and a computer-readable storage medium for quickly generating a service page based on a template. The method for quickly generating the service page based on the template comprises the following steps: constructing a basic page, wherein a page code of the basic page is used for constructing an environment required by the operation of the business page and/or realizing the same abstract workflow in the same business scene; constructing one or more page templates, wherein the page templates are used for providing code templates for realizing service functions in service scenes; generating a final page code of each page of the business scene through code conversion of a specific function of each page of the business scene based on the corresponding page template; and combining the generated final page code of each page into the page code of the basic page to generate the code of the service page. By adopting the scheme for rapidly generating the service page based on the template, the embodiment of the disclosure solves the technical problems of large workload and low development efficiency of service page development of service application in the prior art.

Description

Method and device for quickly generating service page based on template
Technical Field
The present disclosure relates to the field of computer application development, and in particular, to a method and an apparatus for quickly generating a service page based on a template, an electronic device, and a computer-readable storage medium.
Background
In the prior art, various business applications are widely developed on the basis of a browser webpage technology, for example, business applications designed by a card-type page, such as business applications of jitters, headlines and the like, and various information displayed in the business applications is displayed in a card form. Each card needs to write corresponding codes independently, and therefore the coding is complex and the efficiency is low. Meanwhile, in the prior art, the types and versions of browsers are numerous, and business pages of business applications are loaded and presented successfully in the numerous browsers and versions, and a lot of codes for realizing compatibility need to be added.
Each page of these business applications provides a business scenario with many same or similar workflows or interactions, for example, the above described card-type page, and each card has many similarities regardless of style, interaction, and data type and form. This results in a great deal of repetitive work in developing such business applications in the prior art, which is likely to cause errors and seriously inefficient.
How to reduce the workload of developing a service page in service application and improve the development efficiency is a technical problem to be solved urgently in the prior art.
Disclosure of Invention
In view of the above technical problems, the present disclosure provides a method, an apparatus, an electronic device, and a computer-readable storage medium for quickly generating a service page based on a template.
In a first aspect, an embodiment of the present disclosure provides a method for quickly generating a service page based on a template, including: constructing a basic page, wherein a page code of the basic page is used for constructing an environment required by the operation of the business page and/or realizing the same abstract workflow in the same business scene;
constructing one or more page templates, wherein the page templates are used for providing code templates for realizing service functions in service scenes;
generating a final page code of each page of the business scene through code conversion of a specific function of each page of the business scene based on the corresponding page template;
and combining the generated final page code of each page into the page code of the basic page to generate the code of the service page.
Further, the structure of the basic page comprises a page header and a page body; the page header comprises various function libraries for constructing page codes; the page body comprises a plurality of functional functions of the script language and is used for building an environment required by the operation of the service page and/or realizing the same abstract workflow in the same service scene.
Further, the function library includes one or more of a client jsbridge library, a buried point sdk library, a public css library, or a public js library.
Further, the functions realized by the function include one or more of page data acquisition, data processing, template rendering or processing of rendered pages.
Further, the structure of the page template comprises a page structure definition, a business flow function and a page style; the business flow function is used for realizing corresponding business processing logic; the page style is used to define a page style to be presented by a page generated based on the page template.
Further, the page structure definition comprises a plurality of page structures and necessary data.
Further, the generating a final page code of each page of the business scenario by code conversion of a specific function of each page of the business scenario based on the corresponding page template includes: extracting all structural parts in the page template; and respectively carrying out code conversion according to specific services aiming at each structural part to generate a final page code of each page of the service scene.
Further, the merging the generated final page code of each page into the page code of the base page, and generating the code of the service page includes: and correspondingly combining each structural part of the final page code into the structural part of the basic page to generate the code of the business page.
Further, the business scene is constructed by loading and displaying the business page based on the client environment.
Js is used to organize the template structure.
In a second aspect, an embodiment of the present disclosure provides an apparatus for quickly generating a service page based on a template, including:
the basic page module is used for constructing a basic page, and the page code of the basic page is used for constructing an environment required by the operation of the business page and/or realizing the same abstract workflow in the same business scene;
the system comprises a page template module, a page module and a service module, wherein the page template module is used for constructing one or more page templates, and the page templates are used for providing code templates for realizing service functions in service scenes;
the conversion module is used for generating a final page code of each page of the service scene through code conversion of a specific function of each page of the service scene based on the corresponding page template;
and the merging module is used for merging the generated final page code of each page into the page code of the basic page to generate the code of the service page.
Further, the structure of the basic page comprises a page header and a page body; the page header comprises various function libraries for constructing page codes; the page body comprises a plurality of functional functions of the script language and is used for building an environment required by the operation of the service page and/or realizing the same abstract workflow in the same service scene.
Further, the function library includes one or more of a client jsbridge library, a buried point sdk library, a public css library, or a public js library.
Further, the functions realized by the function include one or more of page data acquisition, data processing, template rendering or processing of rendered pages.
Further, the structure of the page template comprises a page structure definition, a business flow function and a page style; the business flow function is used for realizing corresponding business processing logic; the page style is used to define a page style to be presented by a page generated based on the page template.
Further, the page structure definition comprises a plurality of page structures and necessary data.
Further, the generating a final page code of each page of the business scenario by code conversion of a specific function of each page of the business scenario based on the corresponding page template includes: extracting all structural parts in the page template; and respectively carrying out code conversion according to specific services aiming at each structural part to generate a final page code of each page of the service scene.
Further, the merging the generated final page code of each page into the page code of the base page, and generating the code of the service page includes: and correspondingly combining each structural part of the final page code into the structural part of the basic page to generate the code of the business page.
Further, the business scene is constructed by loading and displaying the business page based on the client environment.
Js is used to organize the template structure.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method for template-based fast generation of business pages according to any of the first aspect.
In a fourth aspect, the present disclosure provides a non-transitory computer-readable storage medium, which stores computer instructions for causing a computer to execute any one of the methods for quickly generating a business page based on a template in the foregoing first aspect.
The disclosure discloses a method, a device, electronic equipment and a computer-readable storage medium for quickly generating a service page based on a template. The method for quickly generating the service page based on the template comprises the following steps: constructing a basic page, wherein a page code of the basic page is used for constructing an environment required by the operation of the business page and/or realizing the same abstract workflow in the same business scene; constructing one or more page templates, wherein the page templates are used for providing code templates for realizing service functions in service scenes; generating a final page code of each page of the business scene through code conversion of a specific function of each page of the business scene based on the corresponding page template; and combining the generated final page code of each page into the page code of the basic page to generate the code of the service page. By adopting the scheme for rapidly generating the service page based on the template, the embodiment of the disclosure solves the technical problems of large workload and low development efficiency of service page development of service application in the prior art.
The foregoing is a summary of the present disclosure, and for the purposes of promoting a clear understanding of the technical means of the present disclosure, the present disclosure may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained according to the drawings without creative efforts for those skilled in the art.
FIG. 1: the method for quickly generating the service page based on the template in one embodiment of the disclosure is a flow chart;
FIG. 2: the device structure diagram of the business page is rapidly generated based on the template in one embodiment of the disclosure;
FIG. 3: the electronic equipment structure diagram of the embodiment of the invention is used for quickly generating the service page based on the template.
Detailed Description
The embodiments of the present disclosure are described below with specific examples, and other advantages and effects of the present disclosure will be readily apparent to those skilled in the art from the disclosure in the specification. It is to be understood that the described embodiments are merely illustrative of some, and not restrictive, of the embodiments of the disclosure. The disclosure may be embodied or carried out in various other specific embodiments, and various modifications and changes may be made in the details within the description without departing from the spirit of the disclosure. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the appended claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the disclosure, one skilled in the art should appreciate that one aspect described herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. Additionally, such an apparatus may be implemented and/or such a method may be practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present disclosure, and the drawings only show the components related to the present disclosure rather than the number, shape and size of the components in actual implementation, and the type, amount and ratio of the components in actual implementation may be changed arbitrarily, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
Fig. 1 is a flowchart of a method for quickly generating a service page based on a template according to an embodiment of the present disclosure, where the method for quickly generating a service page based on a template according to this embodiment may be executed by a device for quickly generating a service page based on a template, where the device for quickly generating a service page based on a template may be implemented as software or as a combination of software and hardware, and the device for quickly generating a service page based on a template may be integrated in a certain device, such as a server or a terminal device, in an image processing system. As shown in fig. 1, the method comprises the steps of:
step S101, a basic page is constructed, and a page code of the basic page is used for constructing an environment required by the operation of the business page and/or realizing the same abstract workflow in the same business scene;
the whole service scene of the service application is displayed intentionally by loading and running the service page, and usually, each page correspondingly displays a specific service scene. There may be many same or similar workflows or interactions in the business scenario presented by each page of the business application, and accordingly, the same or similar workflows in the business application are abstracted out, including a common application environment, such as various function libraries used in the business application. Taking the example that the service scene of the service application is based on the client environment display h5 page, the data in all the service pages are obtained through the jsbridge interface provided by the client, and all the service pages share the client jsbridge function library at this time. And constructing the abstract workflow and the application environment into a basic page.
In one embodiment, the structure of the constructed basic page comprises a page head and a page body; the page header head is used for constructing an environment for running a business page of business application, for example, the environment comprises various function libraries for constructing page codes; the page body includes a plurality of functional functions encoded by the scripting language, for example, functional functions that implement the same workflow abstracted from the business scenario. The environment required by the operation of the service page is set up and/or the same work flow abstracted in the same service scene is realized through the structure of the basic page.
In one embodiment, the workflow function encoded in the javascript script language includes a page data obtaining function, a data processing function, a template rendering function, a rendered page processing function, and the like.
Step S102, one or more page templates are constructed, and the page templates are used for providing code templates for realizing service functions in service scenes;
the same or similar service logic and service functions in the service application are respectively abstracted to construct a plurality of page templates, and a code template is provided for the development of each specific service page. On the basis of the page template, according to the specific service logic and the attribute of the service function, the specific final service code of each page of the service application can be generated through simple conversion.
In one embodiment, the structure of the constructed page template comprises a page structure definition, a business process function and a page style; the page structure definition can comprise a plurality of page structure definitions and is used for defining a specific page structure and necessary data; the business flow function is used for realizing corresponding business processing logic; the page style is used to define a page style to be presented by a page generated based on the page template.
Js is used to organize the template structure of the page template. The template structure has better display effect, such as highlighting, in the editor of the vscode. The structure and syntax of the template can also be customized. Wherein the page structure definition is defined by a tag < template >, the business process function is defined by a tag < script >, and the page style is defined by a tag < style >.
When there are multiple < template > defined page structure definitions, each < template > is assigned a different ID or class attribute for distinction. The content in < template > is processed in a subsequent handler, for example replacing a data variable or expression defined therein. Wherein, the data variable uses syntax $ { variable }, and the expression uses syntax $ { status }. For example, the variable may be $ { list [0]. name }, and the expression may be $ { sex ═ 0? ' Male ': female ' }.
In one embodiment, the page structure definition of the multiple < template > definitions may have the form:
Figure BDA0001957800760000071
Figure BDA0001957800760000081
in one embodiment, a scripting language javascript is used to encode and define a business process function, so as to implement an abstracted business processing logic in a business application. For example, a data processing function processdata (data) is defined to process specific service data; defining an after-rendering page processing function (afterrender) (status) to process the after-rendering page, such as informing the client of the rendering result after rendering and sending buried point data. When there are a plurality of < template >, it is necessary to specify which template is to be rendered, and the renderTemplateid field is used to indicate the template ID to be rendered.
Step S103, generating a final page code of each page of the business scene through code conversion of a specific function of each page of the business scene based on the corresponding page template;
based on the constructed page template, extracting each structural part of the page template for code conversion according to the specific service function requirement of the page presenting each service scene, and generating a final page code of each specific page presenting each service scene.
In one embodiment, tools are used to transcode the page template, for example, a service flow function defined by < script > in the page template is transformed using babel; the page style defined by < style > in the page template is transformed using postcss.
And step S104, merging the generated final page code of each page into the page code of the basic page, and generating the code of the service page.
And generating a final page code of each specific page of the service scene after the page template code is converted, and merging each structure part of the final page code into a corresponding structure of the basic page so as to generate a code of the final service page.
In one embodiment, the < template > and < style > structural parts of the final page code are merged into the end of the page header head of the base page; and finally, combining the < script > structure part of the page code into the corresponding position of the page body of the basic page, thereby generating the service page code of the service application.
The common work flow and the common service logic of each page of the service application are abstracted and extracted into the basic page and the page template, so that the common service coding development is completed at one time, and only a small part of the specific functions of each page need to be coded independently based on the page template, thereby greatly reducing the development workload of the service application and improving the development efficiency.
Fig. 2 is a device for quickly generating a service page based on a template according to an embodiment of the present disclosure, including:
a basic page module 201, configured to construct a basic page, where a page code of the basic page is used to construct an environment required by the service page to operate and/or implement the same workflow abstracted from the same service scene;
the page template module 202 is configured to construct one or more page templates, where the page templates are used to provide code templates for implementing service functions in a service scene;
a conversion module 203, configured to generate a final page code of each page of the service scenario through code conversion of a specific function of each page of the service scenario based on the corresponding page template;
a merging module 204, configured to merge the generated final page code of each page into the page code of the base page, and generate a code of the service page.
The whole service scene of the service application is displayed intentionally by loading and running the service page, and usually, each page correspondingly displays a specific service scene. There may be many same or similar workflows or interactions in the business scenario presented by each page of the business application, and accordingly, the same or similar workflows in the business application are abstracted out, including a common application environment, such as various function libraries used in the business application. Taking the example that the service scene of the service application is based on the client environment display h5 page, the data in all the service pages are obtained through the jsbridge interface provided by the client, and all the service pages share the client jsbridge function library at this time. And constructing the abstract workflow and the application environment into a basic page.
In one embodiment, the structure of the basic page constructed by the basic page module 201 includes a page header head, and a page body; the page header head is used for constructing an environment for running a business page of business application, for example, the environment comprises various function libraries for constructing page codes; the page body includes a plurality of functional functions encoded by the scripting language, for example, functional functions that implement the same workflow abstracted from the business scenario. The environment required by the operation of the service page is set up and/or the same work flow abstracted in the same service scene is realized through the structure of the basic page.
In one embodiment, the workflow function encoded in the javascript script language includes a page data obtaining function, a data processing function, a template rendering function, a rendered page processing function, and the like.
The same or similar service logic and service functions in the service application are respectively abstracted to construct a plurality of page templates, and a code template is provided for the development of each specific service page. On the basis of the page template, according to the specific service logic and the attribute of the service function, the specific final service code of each page of the service application can be generated through simple conversion.
In one embodiment, the structure of the page template constructed by the page template module 202 includes a page structure definition, a business process function and a page style; the page structure definition can comprise a plurality of page structure definitions and is used for defining a specific page structure and necessary data; the business flow function is used for realizing corresponding business processing logic; the page style is used to define a page style to be presented by a page generated based on the page template.
In one embodiment, the page template module 202 organizes the template structure of the page template using a progressive structure frame vue. The template structure has better display effect, such as highlighting, in the editor of the vscode. The structure and syntax of the template can also be customized. Wherein the page structure definition is defined by a tag < template >, the business process function is defined by a tag < script >, and the page style is defined by a tag < style >.
When there are multiple < template > defined page structure definitions, each < template > is assigned a different ID or class attribute for distinction. The content in < template > is processed in a subsequent handler, for example replacing a data variable or expression defined therein. Wherein, the data variable uses syntax $ { variable }, and the expression uses syntax $ { status }. For example, the variable may be $ { list [0]. name }, and the expression may be $ { sex ═ 0? ' Male ': female ' }.
In one embodiment, the page structure definition of the multiple < template > definitions may have the form:
Figure BDA0001957800760000101
in one embodiment, the page template module 202 uses a scripting language javascript to encode and define a business process function, so as to implement an abstracted business processing logic in a business application. For example, a data processing function processdata (data) is defined to process specific service data; defining an after-rendering page processing function (afterrender) (status) to process the after-rendering page, such as informing the client of the rendering result after rendering and sending buried point data. When there are a plurality of < template >, it is necessary to specify which template is to be rendered, and the renderTemplateid field is used to indicate the template ID to be rendered.
Based on the constructed page template, extracting each structural part of the page template for code conversion according to the specific service function requirement of the page presenting each service scene, and generating a final page code of each specific page presenting each service scene.
In one embodiment, the conversion module 203 uses tools to perform transcoding of the page template, for example, using babel to convert a business process function defined by < script > in the page template; the page style defined by < style > in the page template is transformed using postcss.
And generating a final page code of each specific page of the service scene after the page template code is converted, and merging each structure part of the final page code into a corresponding structure of the basic page so as to generate a code of the final service page.
In one embodiment, merge module 204 merges the < template > and < style > structural portions of the final page code into the end of the page header head of the base page; and finally, combining the < script > structure part of the page code into the corresponding position of the page body of the basic page, thereby generating the service page code of the service application.
The common work flow and the common service logic of each page of the service application are abstracted and extracted into the basic page and the page template, so that the common service coding development is completed at one time, and only a small part of the specific functions of each page need to be coded independently based on the page template, thereby greatly reducing the development workload of the service application and improving the development efficiency.
Referring now to FIG. 3, a block diagram of an electronic device 500 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device 300 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM 302, and the RAM303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the 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 illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 present disclosure, 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 contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: constructing a basic page, wherein a page code of the basic page is used for constructing an environment required by the operation of the business page and/or realizing the same abstract workflow in the same business scene; constructing one or more page templates, wherein the page templates are used for providing code templates for realizing service functions in service scenes; generating a final page code of each page of the business scene through code conversion of a specific function of each page of the business scene based on the corresponding page template; and combining the generated final page code of each page into the page code of the basic page to generate the code of the service page.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart 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 disclosure. 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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 units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (12)

1. A method for quickly generating a service page based on a template is characterized by comprising the following steps:
constructing a basic page, wherein a page code of the basic page is used for constructing an environment required by the operation of the business page and/or realizing the same abstract workflow in the same business scene;
constructing one or more page templates, wherein the page templates are used for providing code templates for realizing service functions in service scenes;
generating a final page code of each page of the business scene through code conversion of a specific function of each page of the business scene based on the corresponding page template;
merging the generated final page code of each page into the page code of the basic page to generate a code of the service page;
the structure of the basic page comprises a page head and a page body; the page header comprises various function libraries for constructing page codes; the page body comprises a plurality of functional functions of the script language and is used for building an environment required by the operation of the service page and/or realizing the same abstract workflow in the same service scene.
2. The method of claim 1, wherein the library of functions comprises one or more of a client jsbr i dge library, a buried point sdk library, a public css library, or a public js library.
3. The method of claim 1, wherein the function implemented by the function includes one or more of page data acquisition, data processing, stencil rendering, or processing of rendered pages.
4. The method of claim 1, wherein the structure of the page template includes a page structure definition, a business process function, and a page style; the business flow function is used for realizing corresponding business processing logic; the page style is used to define a page style to be presented by a page generated based on the page template.
5. The method of claim 4, wherein the page structure definition includes a plurality for defining a specific page structure and necessary data.
6. The method of claim 1, wherein the generating final page code of each page of a business scenario through transcoding of specific functions of each page of the business scenario based on the corresponding page template comprises:
extracting all structural parts in the page template;
and respectively carrying out code conversion according to specific services aiming at each structural part to generate a final page code of each page of the service scene.
7. The method of claim 1, wherein said merging the generated final page code of each of said pages into the page code of said base page, generating code for said business page, comprises:
and correspondingly combining each structural part of the final page code into the structural part of the basic page to generate the code of the business page.
8. The method of claim 1, wherein the business scenario is constructed based on a client environment loading exposing the business page.
9. The method of claim 1, wherein the template structure is organized using a progressive structural framework vue.
10. An apparatus for rapidly generating a service page based on a template, comprising:
the basic page module is used for constructing a basic page, and the page code of the basic page is used for constructing an environment required by the operation of the business page and/or realizing the same abstract workflow in the same business scene;
the system comprises a page template module, a page module and a service module, wherein the page template module is used for constructing one or more page templates, and the page templates are used for providing code templates for realizing service functions in service scenes;
the conversion module is used for generating a final page code of each page of the service scene through code conversion of a specific function of each page of the service scene based on the corresponding page template;
the merging module is used for merging the generated final page code of each page into the page code of the basic page to generate the code of the service page;
the structure of the basic page comprises a page head and a page body; the page header comprises various function libraries for constructing page codes; the page body comprises a plurality of functional functions of the script language and is used for building an environment required by the operation of the service page and/or realizing the same abstract workflow in the same service scene.
11. An electronic device, comprising:
a memory for storing non-transitory computer readable instructions; and a processor for executing the computer readable instructions, so that the processor when executing implements the method for rapidly generating the business page based on the template according to any one of claims 1 to 9.
12. A computer-readable storage medium for storing non-transitory computer-readable instructions which, when executed by a computer, cause the computer to perform the method for template-based fast generation of business pages of any one of claims 1-9.
CN201910072816.8A 2019-01-25 2019-01-25 Method and device for quickly generating service page based on template Active CN109597617B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910072816.8A CN109597617B (en) 2019-01-25 2019-01-25 Method and device for quickly generating service page based on template

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910072816.8A CN109597617B (en) 2019-01-25 2019-01-25 Method and device for quickly generating service page based on template

Publications (2)

Publication Number Publication Date
CN109597617A CN109597617A (en) 2019-04-09
CN109597617B true CN109597617B (en) 2022-04-05

Family

ID=65966565

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910072816.8A Active CN109597617B (en) 2019-01-25 2019-01-25 Method and device for quickly generating service page based on template

Country Status (1)

Country Link
CN (1) CN109597617B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110286893B (en) * 2019-06-28 2023-08-15 百度在线网络技术(北京)有限公司 Service generation method, device, equipment, system and storage medium
CN110347425A (en) * 2019-07-11 2019-10-18 广州虎牙科技有限公司 A kind of configuration and method, apparatus, equipment and storage medium using template page
CN110427182A (en) * 2019-07-18 2019-11-08 北京市天元网络技术股份有限公司 A kind of template type construction APP method and device
CN110780868A (en) * 2019-10-10 2020-02-11 北大方正集团有限公司 Website development method, device, equipment and storage medium based on componentized template
CN111158675A (en) * 2019-12-31 2020-05-15 山东爱城市网信息技术有限公司 Front-end page template multiplexing method
CN111309307B (en) * 2020-02-25 2023-04-07 深圳联友科技有限公司 Method and device for integrating VUE page and workflow system
CN111427645A (en) * 2020-03-20 2020-07-17 青岛聚好联科技有限公司 H5-based cross-terminal adaptive display method and device
CN113468454A (en) * 2020-03-31 2021-10-01 北京沃东天骏信息技术有限公司 Method and device for rendering HTML (hypertext markup language) page
CN113867827A (en) * 2020-06-29 2021-12-31 北京字节跳动网络技术有限公司 Method and device for loading webpage
CN111752598A (en) * 2020-06-30 2020-10-09 北京达佳互联信息技术有限公司 Page generation method and device, electronic equipment and storage medium
CN111949910A (en) * 2020-07-20 2020-11-17 北京思特奇信息技术股份有限公司 Method and system for dynamically displaying acceptance information according to service
CN111966350A (en) * 2020-07-20 2020-11-20 深圳市麦谷科技有限公司 Web front-end interface generation method and device
CN111930352B (en) * 2020-08-10 2023-09-29 中国工商银行股份有限公司 Bank financial product online method and device
CN112764802A (en) * 2021-01-19 2021-05-07 挂号网(杭州)科技有限公司 Business logic customization method and device, electronic equipment and storage medium
CN112819554B (en) * 2021-02-24 2023-12-29 招联消费金融有限公司 Service processing method and device based on page operation and computer equipment
CN113190226A (en) * 2021-05-06 2021-07-30 北京百度网讯科技有限公司 App design method, and page rendering method and device of App
CN113535175A (en) * 2021-07-23 2021-10-22 工银科技有限公司 Application program front-end code generation method and device, electronic equipment and medium
CN113486283B (en) * 2021-07-27 2024-02-13 中国银行股份有限公司 Page merging method, device, server, medium and product
CN115185522A (en) * 2022-09-08 2022-10-14 广州市玄武无线科技股份有限公司 H5 page development method and device, terminal equipment and readable storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909361A (en) * 2015-12-23 2017-06-30 任子行网络技术股份有限公司 Web development approaches and device based on masterplate engine

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10756991B2 (en) * 2015-09-17 2020-08-25 Salesforce.Com, Inc. Simplified entity engagement automation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909361A (en) * 2015-12-23 2017-06-30 任子行网络技术股份有限公司 Web development approaches and device based on masterplate engine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
RN的bundle拆分与合并之安卓篇;哪吒闹海全靠浪;《简书》;20170518;第1-4页 *

Also Published As

Publication number Publication date
CN109597617A (en) 2019-04-09

Similar Documents

Publication Publication Date Title
CN109597617B (en) Method and device for quickly generating service page based on template
CN110780874B (en) Method and device for generating information
CN110554874A (en) Method and device for reusing webpage components of SaaS platform
CN112684968A (en) Page display method and device, electronic equipment and computer readable medium
CN113031946A (en) Method and device for rendering page component
CN109753644B (en) Rich text editing method and device, mobile terminal and storage medium
CN111443909A (en) Method and device for generating page
CN109992698B (en) Data processing method and device, electronic equipment and readable storage medium
CN112631588A (en) File generation method and device, electronic equipment and computer readable medium
CN111198738A (en) Mobile terminal page display method and device and electronic equipment
CN113253996B (en) Card construction method, electronic device, server and storage medium
CN113110829B (en) Multi-UI component library data processing method and device
CN113312568B (en) Web information extraction method and system based on HTML source code and webpage snapshot
CN112015415B (en) Screen page configuration and display method and device
CN109857503B (en) Page interaction effect self-adaption method and device and electronic equipment
CN115756452A (en) Target page code generation method, device, storage medium and program product
CN114115855A (en) Code multiplexing method and device, computer readable storage medium and electronic equipment
CN113703638A (en) Data management page processing method and device, electronic equipment and storage medium
CN113835790A (en) Paging page display method and device based on Android
CN112688863B (en) Gateway data processing method and device and electronic equipment
CN111275828B (en) Data processing method and device of three-dimensional assembly and electronic equipment
CN116974684B (en) Map page layout method, map page layout device, electronic equipment and computer readable medium
CN112540803B (en) Form design adaptation method, device, equipment and storage medium
CN111026983B (en) Method, device, medium and electronic equipment for realizing hyperlink
CN107102866B (en) Native APP file generation method and device under iOS system and server

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