CN115543278A - Page source code generation method, device, equipment and storage medium - Google Patents

Page source code generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN115543278A
CN115543278A CN202211229022.6A CN202211229022A CN115543278A CN 115543278 A CN115543278 A CN 115543278A CN 202211229022 A CN202211229022 A CN 202211229022A CN 115543278 A CN115543278 A CN 115543278A
Authority
CN
China
Prior art keywords
source code
page
code
user input
low
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.)
Pending
Application number
CN202211229022.6A
Other languages
Chinese (zh)
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.)
Ctrip Computer Technology Shanghai Co Ltd
Original Assignee
Ctrip Computer Technology Shanghai 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 Ctrip Computer Technology Shanghai Co Ltd filed Critical Ctrip Computer Technology Shanghai Co Ltd
Priority to CN202211229022.6A priority Critical patent/CN115543278A/en
Publication of CN115543278A publication Critical patent/CN115543278A/en
Pending legal-status Critical Current

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/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • 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 invention provides a page source code generation method, a device, equipment and a storage medium, wherein a graphical user interface based on an engineering template and a low-code component source code is displayed in a low-code system, page rendering is carried out based on the engineering template and the low-code component source code in response to first user input under the condition that the first user input to the graphical user interface is received, and the page source code is generated in response to second user input under the condition that the second user input on a page is received. By using the embodiment, the dependence of the low code system on the platform can be reduced firstly, the use scene of the low code system is enriched, and the expansibility and the convenience of the low code system are improved. In addition, the source code can be applied to the secondary development of multiple scenes or multiple systems, so that not only can a large amount of labor cost be saved, but also the original functions of the low-code system can be utilized, and the expansibility and the high efficiency of the low-code system are enhanced.

Description

Page source code generation method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a source code generation method, apparatus, device, and storage medium.
Background
The Low-Code Development Platform (LCDP) is a Platform software that facilitates the generation of applications, and the software Development environment allows users to write programs with graphical interfaces and configurations, rather than using traditional programming methods. LCDP is a development platform that can generate application programs quickly without coding (0 code) or with a small amount of code, and a method (referred to as visual programming language) for developing application programs through visualization enables developers with different experience levels to create web pages and mobile application programs through a graphical user interface using a drag component and model-driven logic.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the invention and therefore may include information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
Aiming at the problems in the prior art, the invention aims to provide a page source code generation method, a page source code generation device, page source code generation equipment and a storage medium, which overcome the difficulties in the prior art and can improve the expansibility of a low-code system.
The embodiment of the disclosure provides a method for generating a page source code, which includes:
displaying a graphical user interface based on the engineering template and the low-code component source code in a low-code system;
in the event that a first user input to the graphical user interface is received, in response to the first user input, performing page rendering based on the engineering template and the low-code component source code;
in the event that a second user input on the page is received, source code for the page is generated in response to the second user input.
Optionally, in response to the second user input, generating source code for the page, comprising:
and responding to the second user input, obtaining an input object input by the second user, and generating the source code of the page under the condition that the input object is the target button.
Optionally, generating source code for the page includes:
displaying source codes of the pages in a code editor mode;
the page source code generation method further includes:
in the event that a third user input is received, code editing information is obtained, and source code for the updated page is obtained based on the code editing information.
Optionally, the page source code generating method further includes:
and under the condition that the fourth user input is received, page rendering and displaying are carried out based on the source code of the updated page.
Optionally, the page source code generating method further includes:
in the event that a fifth user input on the page is received, the source code for the page is derived in response to the third user input.
Optionally, in a case that a first user input to the graphical user interface is received, before performing page rendering based on the engineering template and the component source code in response to the first user input, the page source code generating method includes:
receiving a sixth user input;
and responding to the sixth user input, acquiring component updating information of the engineering template, and updating the component source codes of the engineering template based on the component updating information.
The embodiment of the present disclosure further provides a page source code generating apparatus, which includes:
the display module is used for displaying a graphical user interface based on the engineering template and the source code of the low-code component in a low-code system;
a rendering module that, upon receiving a first user input to the graphical user interface, performs, in response to the first user input, a page rendering based on the engineering template and the low-code component source code;
and the source code generation module generates the source code of the page in response to the second user input under the condition that the second user input on the page is received.
Optionally, the source code generation module is specifically configured to:
and responding to the second user input, obtaining an input object input by the second user, and generating the source code of the page under the condition that the input object is a target button.
An embodiment of the present invention further provides a page source code generating device, including:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the above-described page source code generation method via execution of executable instructions.
An embodiment of the present invention further provides a computer-readable storage medium for storing a program, and when the program is executed, the method for generating a page source code is implemented.
The page source code generation method, the device, the equipment and the storage medium display a graphical user interface based on an engineering template and a low-code component source code in a low-code system, respond to a first user input under the condition of receiving the first user input to the graphical user interface, perform page rendering based on the engineering template and the low-code component source code, and respond to a second user input under the condition of receiving the second user input on a page to generate the source code of the page. By using the embodiment, the source code of the page can be generated according to the engineering template and the source code of the low-code component in the low-code system scene. The method can firstly reduce the dependence of the low-code system on the platform, enrich the use scenes of the low-code system and improve the expansibility and the convenience of the low-code system. In addition, the source code can be applied to the secondary development of multiple scenes or multiple systems, so that not only can a large amount of labor cost be saved, but also the original functions of the low-code system can be utilized, and the expansibility and the high efficiency of the low-code system are enhanced.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, with reference to the accompanying drawings.
Fig. 1 is one of flowcharts of a page source code generation method of an embodiment of the present disclosure.
FIG. 2 shows a directory structure diagram of an engineering objective of an embodiment of the present disclosure.
Fig. 3 is a second flowchart of a page source code generation method according to an embodiment of the disclosure.
Fig. 4 is a third flowchart of a page source code generation method according to an embodiment of the present disclosure.
FIG. 5 shows an interface diagram of a graphical user interface of a low code system, but an embodiment.
Fig. 6 is a fourth flowchart of a page source code generation method according to an embodiment of the present disclosure.
Fig. 7 is a fifth flowchart of a page source code generation method according to an embodiment of the present disclosure.
Fig. 8 is a schematic structural diagram of a page source code generation apparatus according to an embodiment of the present disclosure.
Fig. 9 is a schematic structural diagram of the page source code generating apparatus of the present invention. And
fig. 10 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present application is provided by way of specific examples, and other advantages and effects of the present application will be readily apparent to those skilled in the art from the disclosure herein. The present application is capable of other and different embodiments and of being practiced or being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present application. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings so that those skilled in the art to which the present application pertains can easily carry out the present application. The present application may be embodied in many different forms and is not limited to the embodiments described herein.
Reference throughout this specification to "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," or the like, means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. Furthermore, the particular features, structures, materials, or characteristics shown may be combined in any suitable manner in any one or more embodiments or examples. Moreover, the various embodiments or examples and features of the various embodiments or examples presented herein can be combined and combined by those skilled in the art without being mutually inconsistent.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the feature. In the expressions of the present application, "plurality" means two or more unless specifically defined otherwise.
In order to clearly explain the present application, components that are not related to the description are omitted, and the same reference numerals are given to the same or similar components throughout the specification.
Throughout the specification, when a device is referred to as being "connected" to another device, this includes not only the case of being "directly connected" but also the case of being "indirectly connected" with other components interposed therebetween. In addition, when a device "includes" a certain component, unless otherwise stated, the device does not exclude other components, but may include other components.
When a device is said to be "on" another device, this may be directly on the other device, but may also be accompanied by other devices in between. When a device is said to be "directly on" another device, there are no other devices in between.
Although the terms first, second, etc. may be used herein to denote various components in some instances, these components should not be limited by these terms. These terms are only used to distinguish one element from another. For example, the first interface and the second interface are represented. Furthermore, as used in this application, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes" and/or "including," when used in this specification, specify the presence of stated features, steps, operations, components, items, species, and/or groups, but do not preclude the presence, or addition of one or more other features, steps, operations, components, items, species, and/or groups thereof. The terms "or" and/or "as used herein are to be construed as inclusive or meaning any one or any combination. Thus, "a, B or C" or "a, B and/or C" means "any of the following: a; b; c; a and B; a and C; b and C; A. b and C ". An exception to this definition will occur only when a combination of components, functions, steps or operations are inherently mutually exclusive in some way.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the singular forms "a", "an" and "the" include plural forms as long as the words do not expressly indicate a contrary meaning. The term "comprises/comprising" when used in this specification is taken to specify the presence of stated features, regions, integers, steps, operations, elements, and/or components, but does not exclude the presence or addition of other features, regions, integers, steps, operations, elements, and/or components.
Although not defined differently, including technical and scientific terms used herein, all terms have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. Terms defined in commonly used dictionaries are to be additionally interpreted as having meanings consistent with those of related art documents and the contents of the present prompts, and must not be excessively interpreted as having ideal or very formulaic meanings unless defined.
In the related art, a conventional page development mode based on a low-code system can perform development and configuration of a page component for a specific service scene to generate a page.
In practice, however, low-code systems require secondary development of code in some scenarios, such as: the method comprises the steps of using a scene (used in other systems) in a cross-business system and optimizing the performance (a low-code system usually needs to perform a large amount of data processing, structure conversion and the like, and the performance overhead is large). If a traditional low-code platform technology developer development component mode is adopted, secondary development scenes such as cross-system use and performance tuning can not be realized for codes.
Fig. 1 is a flowchart of a page source code generation method according to an embodiment of the present disclosure, and an execution subject of the method is a low-code system. As shown in fig. 1, an embodiment of the present disclosure provides a page source code generating method, including the following steps:
step 110: displaying a graphical user interface of the engineering template and the source code of the low-code component in the low-code system;
step 120: in the event that a first user input to the graphical user interface is received, in response to the first user input, performing page rendering based on the engineering template and the low-code component source code;
step 130: in the event that a second user input on the page is received, source code for the page is generated in response to the second user input.
By using the embodiment, the source code of the page can be generated according to the engineering template and the source code of the low-code component in the low-code system scene. Therefore, the source code can be applied to multi-scene or multi-system secondary development, so that the dependence of a low-code system on a platform is reduced, the use scene of the low-code system is enriched, and the expansibility and the convenience of the low-code system are improved.
In embodiments of the present disclosure, the engineering templates and the low-code component source code may be developed in advance by a technical developer. Wherein, the creation of the engineering template can be realized by using create-contact-app technology, and simultaneously supports other self-defined types of engineering templates. The low code component source code is a component source code corresponding to the page building of the low code system. The engineering template is a skeleton of the page source code, and the component source code is an important component of the page source code.
Fig. 2 is a directory structure diagram of a project template, wherein the project template generally includes an entry file, a source code of a low-code component (e.g., a set of codes on the right side corresponding to a directory of a left-side index. Js), a dependency list, a project specification document, and the like. For example, the left side shows JS entry files of multiple components, such as background (background), button (button), picture (picture), price (price), text (text), application (App), and index (index).
In this embodiment, custom templates of different technical languages are generated according to the support of different technical languages of the low code system.
Fig. 3 shows a method for customizing an engineering template and a low-code component source code according to an embodiment of the present disclosure, as shown in fig. 3 in combination with fig. 2, the method includes the following steps:
step 310: an engineering master catalog, i.e., the last generated code catalog, is created.
Step 320: html, a user entry template file, generally index.
Step 330: a component directory and source code files for all components are created.
Step 340: create a main flow JS entry file, such as app. According to the page description file, introducing a component path depending on a page, creating a rendering method, and setting a props attribute corresponding to the component in the method. Where the props is the data (analogous to the arguments of a function) that the caller passes to the component.
In addition, other project required files may also be created.
In the embodiment of the disclosure, the low-code system provides a graphical user interface, and receives the input of a user through the graphical user interface so as to configure, edit, update and the like the source code of the low-code component.
In step 120 of FIG. 1, the first user input is a page rendering operation. Specifically, a corresponding icon is displayed on a graphical user interface, and when it is detected that an input object input by a first user is matched with the corresponding icon, page rendering is performed according to an engineering template and a low-code component source code.
At this time, the page may be further presented.
In an alternative embodiment of the present disclosure, a second user input may be received through the rendered page, such that the source code for the page is generated in response to the second user input.
Specifically, in response to a second user input, generating source code for a page, comprising:
and responding to the second user input, obtaining an input object input by the second user, and generating the source code of the page under the condition that the input object is the target icon.
And displaying a target button on the current display page, and triggering to generate the source code of the page under the condition that a second user input acting on the target button is detected.
Wherein the source code of the page can be further exported.
Fig. 4 shows a flowchart of a page source code generation method according to an embodiment of the present disclosure, and as shown in fig. 4, the method specifically includes the following steps:
step 410: displaying a graphical user interface of the engineering template and the source code of the low-code component in the low-code system;
step 420: in a case that a first user input to the graphical user interface is received, in response to the first user input, performing page rendering based on the engineering template and the low-code component source code;
step 430: in the event that a second user input on the page is received, displaying the source code of the page in the form of a code editor in response to the second user input;
step 440: in the event that a third user input is received, code editing information is obtained in response to the third user input, and source code of the updated page is obtained based on the code editing information.
As shown in fig. 5, the source code generation function is accessed by exposing a function button in the low code system toolbar. The code editor is displayed, when a button of the code editor is clicked, a source code can be directly generated, the code editor is displayed, and real-time editing can be carried out through the code editor.
Where "clicking" is an exemplary action of the third user input above.
In the corresponding embodiment, the data structure contained in the generated source code can be displayed through the Monaco Editor technology, and real-time online editing is supported.
Further, page rendering and presentation may be performed based on the source code of the updated page in response to a fourth user input in the event that the fourth user input is received.
Therefore, in this embodiment, for part of special scenes, secondary development can be performed after source codes are generated, so that not only can a large amount of labor cost be saved, but also the original functions of the low-code system can be utilized, and the expansibility and the efficiency of the low-code system are enhanced. This can solve the technical problems of the related art: the traditional low-code system is not applicable to the cross-business system use, performance optimization and other scenes, and the required code cannot be generated by utilizing the characteristics of the low code.
Fig. 6 shows a flowchart of a page source code generation method according to another embodiment of the present disclosure, and as shown in fig. 6, the page source code generation method may include the following steps:
step 610: displaying a graphical user interface of the engineering template and the source code of the low-code component in a low-code system;
step 620: in response to receiving a first user input to a graphical user interface, performing page rendering based on the engineering template and low-code component source code in response to the first user input;
step 630: in the event that a second user input on the page is received, generating source code for the page in response to the second user input;
step 640: in the event that a fifth user input is received on the page, in response to the fifth user input, exporting source code for the page.
In conjunction with fig. 5, a "source code generation" button is shown, and when the "source code generation" button is clicked, the generated source code can be exported.
In this case, with the aid of the engineering template and the low-code component source code, a series of file directory generation and file write operations are performed on a current page structure built by a certain low-code system, so as to generate a corresponding directory structure, file name, path, code and corresponding relationship thereof. And (4) exporting the generated result to a corresponding compressed packet through a JSZip technology, and providing the compressed packet for technical developers to carry out secondary development.
In an embodiment of the present disclosure, in a case where a first user input to the graphical user interface is received, in response to the first user input, before performing page rendering based on the engineering template and the component source code, the page source code generating method includes:
receiving a sixth user input;
and responding to the sixth user input, acquiring component updating information of the engineering template, and updating component source codes of the engineering template based on the component updating information.
The component update information may include, but is not limited to, adding or deleting low-code components.
Fig. 7 shows a flowchart of a page source code generation method provided by the embodiment of the present disclosure, where the method includes the following steps:
step 710: the technical developers provide engineering templates and low-code component source codes as basic materials for generating page source codes.
Step 720: and writing a file creation script by utilizing the engineering template.
Step 730: and constructing a page by using the existing low-code system to generate the description information of the corresponding page.
Step 740: judging whether secondary development is needed;
if not, directly issuing and releasing the page, and ending the process.
If yes, step 750 is executed to click the corresponding source code export button, and the generated source code is provided to the corresponding technical developer.
Step 760: and performing secondary development by a technical developer based on the generated code, and putting and using a page after the development.
Fig. 8 is a schematic structural diagram of the page source code generation apparatus of the present invention. As shown in fig. 8, the page source code generating apparatus 800 of the present invention includes:
a display module 810 for displaying a graphical user interface based on the engineering template and the source code of the low-code component in the low-code system;
a rendering module 820 that, upon receiving a first user input to the graphical user interface, performs page rendering based on the engineering template and low-code component source code in response to the first user input;
the source code generation module 830, in case of receiving a second user input on the page, generates a source code of the page in response to the second user input.
In an alternative embodiment, the source code generating module 830 is specifically configured to:
and responding to the second user input, obtaining an input object input by the second user, and generating a source code of the page under the condition that the input object is a target button.
In an alternative embodiment, the source code generating module 830 is specifically further configured to:
displaying the source code of the page in a code editor mode;
code editing information is obtained in the event that a third user input is received, and updated source code of the page is obtained based on the code editing information.
In an alternative embodiment, the display module 820 is further specifically configured to:
and under the condition that a fourth user input is received, page rendering and displaying are carried out based on the updated source code of the page.
In an alternative embodiment, the source code generating module 830 is specifically further configured to:
in the event that a fifth user input is received on the page, in response to the third user input, exporting source code for the page.
In an optional embodiment, the rendering module 820 is specifically further configured to:
in an instance in which a first user input to the graphical user interface is received, in response to the first user input, prior to page rendering based on the engineering template and component source code, receiving a sixth user input;
and responding to the sixth user input, acquiring component updating information of the engineering template, and updating component source codes of the engineering template based on the component updating information.
The page source code generation device can generate the source code of the page according to the engineering template and the low-code component source code. The method can firstly reduce the dependence of the low-code system on the platform, enrich the use scenes of the low-code system and improve the expansibility and convenience of the low-code system. In addition, the source code can be applied to multi-scene or multi-system secondary development, not only can save a large amount of labor cost, but also can utilize the original functions of the low-code system, and enhances the expansibility and the high efficiency of the low-code system.
The embodiment of the invention also provides page source code generating equipment, which comprises a processor. A memory having stored therein executable instructions of the processor. Wherein the processor is configured to perform the steps of the page source code generation method via execution of executable instructions.
Therefore, the page source code generating equipment can reduce the dependence of the low-code system on the platform, enrich the use scenes of the low-code system and improve the expansibility and the convenience of the low-code system. In addition, the source code can be applied to the secondary development of multiple scenes or multiple systems, so that not only can a large amount of labor cost be saved, but also the original functions of the low-code system can be utilized, and the expansibility and the high efficiency of the low-code system are enhanced.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module, "or" platform.
Fig. 9 is a schematic structural diagram of the page source code generating apparatus of the present invention. An electronic device 900 according to this embodiment of the invention is described below with reference to fig. 9. The electronic device 900 shown in fig. 9 is only an example and should not bring any limitation to the function and the scope of use of the embodiments of the present invention.
As shown in fig. 9, the electronic device 900 is embodied in the form of a general purpose computing device. Components of electronic device 900 may include, but are not limited to: at least one processing unit 910, at least one memory unit 920, a bus 930 connecting different platform components (including the memory unit 920 and the processing unit 910), a display unit 940, etc.
Where the storage unit stores program code, which may be executed by the processing unit 910, so that the processing unit 910 performs the steps according to various exemplary embodiments of the present invention described in the section of the page source code generation method of this specification. For example, processing unit 910 may perform the steps as shown in fig. 1.
The storage unit 920 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM) 921 and/or a cache memory unit 922, and may further include a read only memory unit (ROM) 923.
Storage unit 920 may also include a program/utility 924 having a set (at least one) of program modules 925, such program modules 925 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 930 can be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 900 may also communicate with one or more external devices 90 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 900, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 900 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 950. Also, the electronic device 900 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via the network adapter 960. The network adapter 960 may communicate with other modules of the electronic device 900 via the bus 930. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, to name a few.
The embodiment of the invention also provides a computer readable storage medium for storing the program, and the steps of the page source code generation method are realized when the program is executed. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above-mentioned page source code generation method section of this specification, when the program product is run on the terminal device.
As shown above, when the program of the computer-readable storage medium of this embodiment is executed, the dependency of the low-code system on the platform can be reduced, the usage scenario of the low-code system can be enriched, and the expansibility and convenience of the low-code system can be improved. In addition, the source code can be applied to multi-scene or multi-system secondary development, not only can save a large amount of labor cost, but also can utilize the original functions of the low-code system, and enhances the expansibility and the high efficiency of the low-code system.
Fig. 10 is a schematic structural diagram of a computer-readable storage medium of the present invention. Referring to fig. 10, a program product 1000 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this respect, and in this document, a 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.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The 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 (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, 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.
A computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, 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 readable storage medium may also be any readable medium that is not a 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 readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like 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 computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In summary, the method, the device, the equipment and the storage medium for generating the page source code reduce the dependence of the low code system on the platform, enrich the use scenes of the low code system, and improve the expansibility and the convenience of the low code system. In addition, the source code can be applied to multi-scene or multi-system secondary development, not only can save a large amount of labor cost, but also can utilize the original functions of the low-code system, and enhances the expansibility and the high efficiency of the low-code system.
The foregoing is a further detailed description of the invention in connection with specific preferred embodiments and it is not intended to limit the invention to the specific embodiments described. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (10)

1. A method for generating a page source code, comprising:
displaying a graphical user interface based on the engineering template and the low-code component source code in a low-code system;
in response to receiving a first user input to the graphical user interface, performing page rendering based on the engineering template and low-code component source code in response to the first user input;
in the event that a second user input on the page is received, generating source code for the page in response to the second user input.
2. The method of generating page source code according to claim 1, wherein said generating source code for the page in response to the second user input comprises:
and responding to the second user input, obtaining an input object input by the second user, and generating a source code of the page under the condition that the input object is a target button.
3. The method for generating page source code according to claim 2, wherein the generating the source code of the page comprises:
displaying the source code of the page in a code editor mode;
the page source code generation method further includes:
in the event that a third user input is received, code editing information is obtained, and updated source code of the page is obtained based on the code editing information.
4. The page source code generation method according to claim 3, characterized by further comprising:
in response to receiving a fourth user input, page rendering and presentation is performed based on the updated source code of the page in response to the fourth user input.
5. The page source code generation method according to claim 1, characterized by further comprising:
in the event that a fifth user input is received on the page, in response to the fifth user input, exporting source code for the page.
6. The method for generating page source code according to claim 1, wherein in a case that a first user input to the graphical user interface is received, in response to the first user input, before performing page rendering based on the engineering template and the component source code, the method for generating page source code comprises:
receiving a sixth user input;
and responding to the sixth user input, acquiring component updating information of the engineering template, and updating component source codes of the engineering template based on the component updating information.
7. A page source code generating apparatus, comprising:
the display module is used for displaying a graphical user interface based on the engineering template and the source code of the low-code component in a low-code system;
a rendering module that, upon receiving a first user input to the graphical user interface, performs, in response to the first user input, page rendering based on the engineering template and low-code component source code;
a source code generation module that generates a source code for the page in response to a second user input on the page if the second user input is received.
8. The page source code generating apparatus according to claim 7, wherein the source code generating module is specifically configured to:
and responding to the second user input, obtaining an input object input by the second user, and generating a source code of the page under the condition that the input object is a target button.
9. A page source code generating apparatus, comprising:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the page source code generation method of any of claims 1 to 6 via execution of the executable instructions.
10. A computer readable storage medium storing a program, wherein the program when executed implements the steps of the page source code generation method of any one of claims 1 to 6.
CN202211229022.6A 2022-10-08 2022-10-08 Page source code generation method, device, equipment and storage medium Pending CN115543278A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211229022.6A CN115543278A (en) 2022-10-08 2022-10-08 Page source code generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211229022.6A CN115543278A (en) 2022-10-08 2022-10-08 Page source code generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115543278A true CN115543278A (en) 2022-12-30

Family

ID=84733135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211229022.6A Pending CN115543278A (en) 2022-10-08 2022-10-08 Page source code generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115543278A (en)

Similar Documents

Publication Publication Date Title
CN109634598B (en) Page display method, device, equipment and storage medium
CN109901834B (en) Document page generation method, device, computer equipment and storage medium
CN109739600B (en) Data processing method, medium, device and computing equipment
CN107943465B (en) Method and device for generating HTML (Hypertext markup language) form
CN111736840A (en) Compiling method and running method of applet, storage medium and electronic equipment
CN112506854A (en) Method, device, equipment and medium for storing page template file and generating page
US20030120707A1 (en) Systems and methods for exporting functionality of a modularized system
CN110489162B (en) Method, device, medium and equipment for simplifying installation package SO (storage and retrieval) file
CN114048415A (en) Form generation method and device, electronic equipment and computer readable storage medium
CN114358742A (en) Workflow execution method, device, equipment and storage medium
CN113971037A (en) Application processing method and device, electronic equipment and storage medium
CN109408057B (en) Method, device, medium and computing equipment for automatically generating codes
CN113296759B (en) User interface processing method, user interface processing system, device and storage medium
CN115543278A (en) Page source code generation method, device, equipment and storage medium
CN114449063A (en) Message processing method, device and equipment
CN111596997B (en) UI information request method, device, terminal and storage medium
CN114253537A (en) Form generation method and device, electronic equipment and storage medium
CN114238831A (en) HTML code fragment processing method, system, electronic equipment and storage medium
CN113656041A (en) Data processing method, device, equipment and storage medium
CN113535037A (en) Interactive display method and device for command line terminal, computer readable medium and equipment
CN113703638A (en) Data management page processing method and device, electronic equipment and storage medium
CN111880775A (en) Multi-module layered architecture implementation method and device, electronic equipment and storage medium
CN111666068A (en) Platform development framework, construction method, equipment and medium
CN111736833A (en) Method and system for generating popup component, electronic device and storage medium
CN112882698A (en) Development environment generation method and device, computer storage medium and electronic device

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