CN111708528A - Method, device and equipment for generating small program and storage medium - Google Patents

Method, device and equipment for generating small program and storage medium Download PDF

Info

Publication number
CN111708528A
CN111708528A CN202010544617.5A CN202010544617A CN111708528A CN 111708528 A CN111708528 A CN 111708528A CN 202010544617 A CN202010544617 A CN 202010544617A CN 111708528 A CN111708528 A CN 111708528A
Authority
CN
China
Prior art keywords
component
applet
source code
target
matched
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
CN202010544617.5A
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.)
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202010544617.5A priority Critical patent/CN111708528A/en
Publication of CN111708528A publication Critical patent/CN111708528A/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/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0486Drag-and-drop
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a storage medium for generating an applet. The method comprises the following steps: displaying at least one small program component in the component library in a first display interface, wherein a source code for executing a set function is packaged in each small program component; responding to the selected component in the first display interface, displaying the selected component in a second display interface, and correspondingly writing a source code matched with the selected component into a source code file matched with a target applet to be generated; and responding to a development finishing instruction of the small program, and generating the target small program according to the source code file. The scheme of the embodiment of the invention can solve the problems that the existing small program development method has long development period and developers need to have certain programming foundation to generate the small program, and can generate the small program quickly.

Description

Method, device and equipment for generating small program and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, equipment and a storage medium for generating an applet.
Background
With the development of intelligent terminal technology, more and more application functions and more abundant forms can be realized on the intelligent terminal.
The applet present is an implementation of the application function. The applet is implemented as a platform based on the host program. The host program is also an application program, which is installed in the terminal and runs through the software and hardware end capability provided by the operating system. The small program is provided with a platform environment by the host program and runs under the environment support of the host program. The applet comprises code customized by a developer, and also comprises platform capability provided by the host program and software and hardware end capability provided by the terminal. The applet may invoke the end capability through the host program to implement the application function.
At the present stage, a small program prototype is designed according to the requirement mainly through product personnel, an interface personnel carries out small program interface design based on the product prototype, a technician carries out small program development according to a small program interface design graph, and operation and maintenance personnel can carry out content maintenance on the small program. The small program development method has a long development period, needs a certain programming basis for developers, and has high requirements for the developers.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for generating an applet, which are used for solving the problems that the existing applet developing method is long in development period and a developer needs to have a certain programming basis to generate the applet and can quickly generate the applet.
In a first aspect, an embodiment of the present invention provides a method for generating an applet, where the method includes:
displaying at least one small program component in the component library in a first display interface, wherein a source code for executing a set function is packaged in each small program component;
responding to the selected component in the first display interface, displaying the selected component in a second display interface, and correspondingly writing the source code matched with the selected component into a source code file matched with a target applet to be generated;
and responding to a development finishing instruction of the small program, and generating the target small program according to the source code file.
In a second aspect, an embodiment of the present invention further provides an apparatus for generating an applet, where the apparatus includes:
the system comprises an applet component display module, a first display interface and a second display interface, wherein the applet component display module is used for displaying at least one applet component in a component library in the first display interface, and a source code for executing a set function is packaged in each applet component;
the component source code writing module is used for responding to the component selected in the first display interface, displaying the selected component in a second display interface, and correspondingly writing the source code matched with the selected component into a source code file matched with the target applet to be generated;
and the target small program generating module is used for responding to a development finishing instruction of the small program and generating the target small program according to the source code file.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the method for generating the applet according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for executing the method for generating an applet according to any one of the embodiments of the present invention.
The method comprises the steps that at least one small program component in a component library is displayed in a first display interface, and a source code for executing a set function is packaged in each small program component; responding to the selected component in the first display interface, displaying the selected component in a second display interface, and correspondingly writing a source code matched with the selected component into a source code file matched with a target applet to be generated; the method has the advantages that the target applet is generated according to the source code file in response to the development ending instruction of the applet, the problems that the development period of the existing applet development method is long, and developers need to have certain programming bases to generate the applet can be solved, and the applet can be generated quickly.
Drawings
FIG. 1 is a flowchart of a method for generating an applet in one embodiment of the present invention;
FIG. 2 is a flowchart of a method for generating an applet in the second embodiment of the present invention;
FIG. 3 is a flowchart of a method for generating an applet in a third embodiment of the present invention;
FIG. 4 is a flowchart of a method for generating an applet in a fourth embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an applet development platform according to a fourth embodiment of the present invention;
FIG. 6 is an implementation architecture diagram of an applet development platform in accordance with a fourth embodiment of the present invention;
FIG. 7 is a diagram illustrating an applet development platform in accordance with a fourth embodiment of the present invention;
fig. 8 is a schematic structural diagram of an applet generating apparatus in a fifth embodiment of the present invention;
fig. 9 is a schematic structural diagram of a computer device in the sixth embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad invention. It should be further noted that, for convenience of description, only some structures, not all structures, relating to the embodiments of the present invention are shown in the drawings.
Before describing embodiments of the present invention, it should be noted that an applet is an application that can be used without downloading or installing, and a user can open the application by "scanning" or "searching". In general, an applet is implemented based on a host program as a platform, where the host program may be any application program installed in a terminal and running through software and hardware end capabilities provided by an operating system; for example, the host program may be a chat application, a video playing application, or a search application, which is not limited in the embodiment of the present invention. It should be noted that the terminal for installing the host program may be an intelligent terminal such as a smart phone, a tablet computer, or a smart watch, and the embodiment of the present invention is not limited thereto; the operating system may be an operating system such as android, IOS, or microsoft, which is not limited in the embodiment of the present invention.
Meanwhile, the applet related in the embodiment of the present invention may be any applet, for example, an information display applet, an express query applet, or a learning applet, and the present invention is not limited in this embodiment.
Example one
Fig. 1 is a flowchart of a method for generating an applet in one embodiment of the present invention, where this embodiment is applicable to a case of quickly generating an applet, and the method may be executed by an applet generating apparatus, which may be implemented by software and/or hardware and integrated in a computer device. Specifically, referring to fig. 1, the method specifically includes the following steps:
and step 110, displaying at least one small program component in the component library in a first display interface, wherein a source code for executing a set function is packaged in each small program component.
The applet component may be a component of an applet, and each applet may include multiple applet components, for example, a video playing applet may include: a component that presents images, a component that presents text information, or a component that a user inputs comments, and the like, which are not limited in the embodiment of the present invention. The component library may include a plurality of applet components, and it should be noted that the applet components may be components that implement different functions, for example, an article management component, a form management component, a product management component, a payment management component, and the like, which are not limited in the embodiment of the present invention.
It should be noted that, in the embodiment of the present invention, a source code for executing a setting function is encapsulated in each applet component, for example, a source code for implementing a payment function is encapsulated in the payment management component; the form management component is encapsulated with source codes and the like for realizing the form management function, which are not described herein again in the embodiments of the present invention.
In an optional implementation of the embodiment of the present invention, the component library may display a plurality of applet components included in the component library on a first display interface, where the first display interface may display each applet component by a component name, for example, an article management component, a form management component, or a product management component; the first presentation interface may also present each applet component in the form of an icon, for example, the first presentation interface may include an article management component icon, a form management component icon, or a product management component icon, and the like, which is not limited by the embodiment of the present invention.
Optionally, the first display interface may be an application market, or may be any database, which is not limited in the embodiment of the present invention.
And 120, responding to the selected component in the first display interface, displaying the selected component in a second display interface, and correspondingly writing the source code matched with the selected component into a source code file matched with the target applet to be generated.
In a specific implementation, when the target applet is generated, each component corresponding to the target applet can be selected in the first display interface, and each selected component is displayed in the second display interface; the target applet may be any applet, for example, an information display applet, an express query applet, or a learning applet, which is not limited in the embodiment of the present invention. It should be noted that, in the embodiment of the present invention, the first display interface and the second display interface are not the same display interface; for example, the second presentation interface may be a web page or a presentation page of an application, which is not limited in the embodiment of the present invention.
And further correspondingly writing the source codes matched with the selected components into the source codes matched with the target applet to be generated. In an optional implementation manner of the embodiment of the present invention, the source code of the target applet to be generated may be written in a Domain Specific Language (DSL) file corresponding to the target applet to be generated, and after each component matched with the target applet is selected in the first display interface, the source code matched with each selected component may be written in the DSL file matched with the target applet, respectively.
And step 130, responding to the development finishing instruction of the small program, and generating the target small program according to the source code file.
In an optional implementation, after the source code matched with each selected applet component is correspondingly written into the source code file matched with the target applet to be generated, and after a development end instruction of the applet is received, the source code file of the target applet can be compiled, so that the target applet is generated.
In another optional example of the embodiment of the present invention, after it is detected that the source code matched with each applet component is written into the source code file matched with the target applet to be generated correspondingly, a maintenance instruction of the user is not received within a set time (for example, 5 minutes, or 10 minutes, etc., which is not limited in the embodiment of the present invention), that is, the source code file of the target applet may be compiled, so as to generate the target applet.
In the scheme of the embodiment, at least one applet component included in a component library is displayed in a first display interface, and a source code for executing a set function is packaged in each applet component; responding to the selected component in the first display interface, displaying the selected component in a second display interface, and correspondingly writing a source code matched with the selected component into a source code file matched with a target applet to be generated; the method has the advantages that the target applet is generated according to the source code file in response to the development ending instruction of the applet, the problems that the development period of the existing applet development method is long, and developers need to have certain programming bases to generate the applet can be solved, and the applet can be generated quickly.
Example two
Fig. 2 is a flowchart of a method for generating an applet in a second embodiment of the present invention, which is a further refinement of the foregoing technical solution, and the technical solution in this embodiment may be combined with various alternatives in one or more of the foregoing embodiments. As shown in fig. 2, the generation method of the applet includes the steps of:
step 210, displaying at least one applet component included in the component library in a first display interface, wherein a source code for executing a set function is packaged in each applet component.
And step 220, responding to the dragging operation of the component displayed in the first display interface, and displaying the component matched with the dragging operation at the matched dragging position in the second display interface.
The dragging position in the second display interface may be any position of the second display interface, which is not limited in the embodiment of the present invention.
In a specific implementation, in the process of generating the target applet, one or more components of the multiple components displayed in the first display interface may be dragged and dragged to the second display interface in a dragging and dragging manner, and displayed at a designated position.
Illustratively, if the components constituting the target applet include an applet component a, an applet component B and an applet component C; the applet component a, the applet component B and the applet component C can be selected from the first display interface, dragged and dragged to the second display interface by dragging and dragging modes, and displayed in the second display interface.
And step 230, acquiring a dragging position of the target component matched with the current dragging operation in the second display interface.
Specifically, after the component matched with the dragging operation is displayed at the matched dragging position in the second display interface, the dragging position of the target component matched with the current dragging operation in the second display interface may be further obtained, where the target component may be any one of the multiple components dragged in the first display interface in step 220, for example, the applet component a, the applet component B, or the applet component C in the above example, which is not limited in the embodiment of the present invention.
For example, after dragging and pulling the plurality of applet components from the first presentation interface to the second presentation interface, the position of each applet component in the second presentation interface may be further obtained, for example, the position of the applet component a may be a title bar, the position of the applet component B may be the left side of the second presentation interface, the position of the applet component C may be the right side of the second presentation interface, and so on.
And 240, correspondingly writing the source code matched with the target component into a source code file matched with the target applet to be generated according to the dragging position.
Specifically, after the drag position of the target component matched with the current drag operation in the second display interface is obtained, the source code matched with the target component may be further written into the source code file matched with the target applet to be generated according to the drag position.
In an optional implementation manner of the embodiment of the present invention, writing the source code matched with the target component into the source code file matched with the target applet to be generated correspondingly according to the dragging position may include: and if the target component is determined to be an independent functional component according to the dragging position, additionally writing the source code matched with the target component into the target position of the source code file matched with the target applet, wherein the target position is not overlapped with the source code positions of other components in the source code file.
Specifically, if the target component is determined to be an independent functional component according to the dragging position of the target component, namely the position of the target component in the second display interface; the independent function component is the target small program component, and the small program component with a certain function can be realized without being combined with other small program components. For example, if the dragging position of the target component is the title bar of the second display interface, and no other applet component exists in the title bar of the second display interface, it may be determined that the target component is an independent function component; the source code that matches the target component may be written to a target location in a source code file that matches the target applet, where the target location involved in this embodiment does not coincide with the source code location of other components in the source code file.
For example, if the applet component a is determined to be an independent functional component according to the dragging position of the applet component a, the source code matched with the applet component a may be written into a specified position of a DSL file of the target applet, where the DSL file of the target applet is the source code file of the target applet.
In another optional implementation manner of the embodiment of the present invention, writing the source code matched with the target component into the source code file matched with the target applet to be generated correspondingly according to the dragging position, may further include: if the target component is determined to be the nested functional component according to the dragging position, acquiring a nested component matched with the target component; identifying a target source code matched with the nested component in a source code file matched with the target applet, and positioning a nested position in the target source code; the source code that matches the target component is written into the nested location.
Specifically, if the target component is determined to be a nested functional component according to the dragging position of the target component, namely the position of the target component in the second display interface; the nested functional component is an applet component which can realize a certain function only by combining the target applet component with other applet components. For example, if the dragged position of the target component is the left position of the second presentation interface, the title bar of the second presentation interface further includes other applet components D, and the target applet component is contained in the applet component D, it may be determined that the target component is a nested function component; then further nested components may be obtained that match the target applet component, e.g., other applet components in the above example; identifying target source codes matched with other applet components in a source code file matched with the target applet, and positioning a nested position in the target source codes; and then writing source code that matches the target applet component into the nested location.
For example, if the dragged position of the target component is the left position of the second presentation interface, the title bar of the second presentation interface further includes other applet components D, and the target applet component is contained in the applet component D, it may be determined that the target component is a nested function component; further, a source code matching the applet component D may be identified in the DSL file of the target applet and a nested position located in the source code matching the applet component D; writing the source code matched with the target applet component into the nesting position; the DSL file of the target applet is the source code file of the target applet.
And step 250, responding to the development finishing instruction of the small program, and generating the target small program according to the source code file.
According to the scheme of the embodiment, at least one applet component included in a component library is displayed in a first display interface, and a source code for executing a set function is packaged in each applet component; responding to a dragging operation of the component displayed in the first display interface, and displaying the component matched with the dragging operation at a matched dragging position in the second display interface; acquiring a dragging position of the target assembly matched with the current dragging operation in the second display interface; correspondingly writing the source code matched with the target component into a source code file matched with the target applet to be generated according to the dragging position; the method has the advantages that the target applet is generated according to the source code file in response to the development ending instruction of the applet, the problems that the development period of the existing applet development method is long, and developers need to have certain programming bases to generate the applet can be solved, and the applet can be generated quickly.
EXAMPLE III
Fig. 3 is a flowchart of a method for generating an applet in a third embodiment of the present invention, which is a further refinement of the foregoing technical solution, and the technical solution in this embodiment may be combined with various alternatives in one or more of the foregoing embodiments. As shown in fig. 3, the generation method of the applet includes the steps of:
and step 310, displaying at least one applet component included in the component library in a first display interface, wherein a source code for executing a set function is packaged in each applet component.
And step 320, responding to the selected component in the first display interface, and displaying the selected component in the second display interface.
Step 330, in response to the component modification instruction matched with the target applet, acquiring a modified component matched with the component modification instruction.
Specifically, after the selected component is displayed in the second display interface in response to the component selected in the first display interface, a component modification instruction matched with the target applet may be further responded, and a modified component matched with the component modification instruction is obtained.
For example, after three components are selected in the first presentation interface and presented in the second presentation interface, if a component modification instruction matching with the target applet is received, a modification component matching with the modification instruction may be further determined; wherein the modification component can be any one of the three groups selected in the first presentation interface.
And 340, modifying the source code corresponding to the style and/or content matched with the modification component in the source code matched with the modification component, and correspondingly writing the modified modification component code into a source code file matched with the target applet to be generated.
Specifically, after the modification component matching the component modification instruction is obtained in response to the component modification instruction matching the target applet, the source code matching the modification component may be further modified, and for example, after the modification component matching the modification instruction is determined, the source code of the modification component may be further modified.
Specifically, the source code corresponding to the style of the modified component, the source code corresponding to the content of the modified component, or both the style of the modified component and the source code corresponding to the content may be modified, and the modified component code is correspondingly written into the source code file matched with the target applet to be generated.
For example, if it is determined that the modified component is the applet component a, the source code matched with the applet component a may be further obtained, and the content of the applet component a and the style of the applet component a in the source code, or the style of the applet component a and the source code corresponding to the content may be modified, and the modified code is written into a source code file (DSL file) of the target applet to be generated.
And step 350, responding to the development finishing instruction of the small program, and generating the target small program according to the source code file.
According to the scheme of the embodiment, a modification component matched with a component modification instruction is obtained by responding to the component modification instruction matched with a target applet; and modifying the source code corresponding to the pattern and/or content matched with the modification component in the source code matched with the modification component, and correspondingly writing the modified modification component code into a source code file matched with a target applet to be generated, so that the content or the pattern of the applet can be modified while the applet is quickly generated, and the diversity of the applet is enriched.
Example four
Fig. 4 is a flowchart of a method for generating an applet in a fourth embodiment of the present invention, where this embodiment is a further refinement of the foregoing technical solution, and the technical solution in this embodiment may be combined with various alternatives in one or more of the foregoing embodiments. As shown in fig. 4, the generation method of the applet includes the steps of:
and step 410, displaying at least one small program component in the component library in a first display interface, wherein a source code for executing a set function is packaged in each small program component.
And step 420, responding to the selected component in the first display interface, displaying the selected component in a second display interface, and correspondingly writing the source code matched with the selected component into a source code file matched with the target applet to be generated.
And 430, responding to the development finishing instruction of the small program, and generating the target small program according to the source code file.
And step 440, responding to the applet issuing instruction, and issuing the target applet to the target issuing platform.
Specifically, after the target applet is generated according to the source code file of the applet in response to the development end instruction of the applet, the target applet may be further released in the target platform. The target platform is a host program of the target applet, wherein the host program can be any application program which is installed on the terminal and runs through the software and hardware end capability provided by the operating system; for example, the host program may be a chat application, a video playing application, a payment application, or a search application, which is not limited in the embodiment of the present invention. It should be noted that the terminal for installing the host program may be an intelligent terminal such as a smart phone, a tablet computer, or a smart watch, and the embodiment of the present invention is not limited thereto; the operating system may be an operating system such as android, IOS, or microsoft, which is not limited in the embodiment of the present invention.
According to the scheme of the embodiment, after the target applet is generated according to the source code file of the applet in response to the development end instruction of the applet, the target applet can be further issued in the target platform, and the applet can be quickly generated and simultaneously quickly issued.
In order to make those skilled in the art better understand the embodiment of the present invention, fig. 5 illustrates a schematic structural diagram of an applet development platform, which mainly includes: the application market 510 (first show interface), the applet operation and maintenance platform 520 (second show interface), the applet operation platform 530, and the publishing platform 540.
The application market 510 is the first presentation interface involved in the above embodiments, and the application market 510 provides some basic components for the applet operation and maintenance platform 520 to use. It should be noted that the application market 510 has extensibility, and for example, if the components provided in the application market cannot meet the user requirements, the users without programming base can perform opinion feedback, and the users with programming capability can perform component extension, and perform component development according to the component development specification provided by the platform and upload the component to the application market.
Some basic components are shown in the component list of the applet operation and maintenance platform 520, and if the basic components cannot meet the user requirements, the user can select components from the application market 510 and add the components to the applet operation and maintenance platform 520. In the applet operating platform 530 the user performs the design and development of the applet by dragging components into the page and editing the attributes of the page and components. It should be noted that, in the applet operating platform 530, the user can maintain the content in the applet, but the design of the applet is not allowed to be modified, which is also the difference between the applet operating platform 530 and the applet operating platform 520.
Finally, the developed applet is released in one key in the applet operating platform 530, and the user can select the platform which the user wants to release, so that the applet is released to the platform selected by the user.
Fig. 6 illustrates an implementation architecture diagram of an applet development platform in which the front-end technology stack uses Vue and the back-end technology stack uses nodjs, while also supporting microservice access using other technology stacks. Dragable is realized based on a third-party component library Vue, and the multi-end issuing function is realized by constructing DSL into small program file contents of different platforms through AST. The platform is concretely realized by the following processes:
1) determining a component DSL structure and a page DSL structure, and establishing a component DSL specification.
Illustratively, the page DSL structure may be:
Figure BDA0002540146680000141
Figure BDA0002540146680000151
Figure BDA0002540146680000161
Figure BDA0002540146680000171
illustratively, the component DSL architecture may be:
Figure BDA0002540146680000172
Figure BDA0002540146680000181
Figure BDA0002540146680000191
Figure BDA0002540146680000201
Figure BDA0002540146680000211
2) component (functional unit) development is carried out, in the embodiment, a plurality of basic components can be developed firstly, and component types are perfected after the subsequent platform is built. The functional unit comprises a front end, a back end and a management end of the assembly. The front end of the component contains vue files of the component, DSL files, and scripts to convert the DSL into applet files; the back end of the assembly provides required service for the assembly; the management end of the component is a micro front-end module which runs on an applet management end platform (applet operation platform) and manages the content of the component. It should be noted that these three parts are not necessarily all required, and if a component does not need to use a certain part, they may not be provided, for example: the text component does not need to be supported by a server, and a back end does not need to be provided in a functional module of the component.
3) After the development of the components is completed, the components are released to an application market, and the release process can convert the DSL of the front end into the script of the small program file and the management end service for deployment.
4) Developing an applet operation and maintenance platform (a design end), realizing a component dragging function based on a third-party component library Vue. Draggable and providing a property panel for a user to edit component data. Supporting users to add components to the developed project from the application market; the method supports a user to drag the components in the toolbar into the applet page, the components in the page can also be dragged, and the positions of the components in the page are changed through dragging; and the user is supported to edit the style and the content of the selected component in the property panel.
5) Developing an applet operation platform (management end), and realizing dynamic loading of a management page of the component through a micro front end architecture. It should be noted that the applet operating platform does not support the user to modify the style and layout of the page and the component, and only supports the user to edit the style and content of the selected component in the property panel.
6) And the development platform user management service module supports a multi-tenant mode.
7) And realizing the one-key issuing function. And splicing the DSL data of the assemblies into page DSL data, and converting the page DSL data into an applet file by calling a deployed script for converting the DSL into the applet file when the issuing assembly is called. And compiling and packaging the applet file and issuing the applet file to the applet running platform.
8) Enriching platform components and applet templates.
For better understanding of the embodiment of the present invention, fig. 7 lists an exemplary diagram of an applet development platform (an applet operation and maintenance platform is taken as an example).
It should be noted that the applet development platform related in the embodiment of the present invention can perform applet development without using programming, which can greatly improve the applet development efficiency, and enable a user without a programming basis to perform design and development of an applet. Meanwhile, the small program development platform supports multi-terminal release, and a user can release the small program to multi-terminal operation only by designing and developing a set of small program on the platform, so that the development cost is greatly reduced.
EXAMPLE five
Fig. 8 is a schematic structural diagram of an applet generating apparatus according to a fifth embodiment of the present invention, which may execute the applet generating method according to the foregoing embodiments, and the apparatus may be implemented by software and/or hardware. Specifically, referring to fig. 8, the apparatus includes: an applet component presentation module 810, a component source code writing module 820, and a target applet generating module 830.
The applet component display module 810 is configured to display at least one applet component included in the component library in a first display interface, where a source code for executing a set function is encapsulated in each applet component;
a component source code writing module 820, configured to respond to the component selected in the first display interface, display the selected component in a second display interface, and correspondingly write the source code matched with the selected component into the source code file matched with the target applet to be generated;
and the target applet generating module 830 is configured to generate a target applet according to the source code file in response to an applet development end instruction.
According to the scheme of the embodiment, at least one applet component in a component library is displayed in a first display interface through an applet component display module; responding to the selected component in the first display interface through a component source code writing module, displaying the selected component in a second display interface, and correspondingly writing a source code matched with the selected component into a source code file matched with a target applet to be generated; the target applet generating module responds to the development finishing instruction of the applet and generates the target applet according to the source code file, so that the problems that the development period of the existing applet developing method is long, developers need to have certain programming bases to generate the applet can be solved, and the applet can be generated quickly.
Optionally, the component source code writing module 820 includes: the module display submodule and the source code write-in submodule;
and the component display sub-module is used for responding to dragging operation of the component displayed in the first display interface and displaying the component matched with the dragging operation at a dragging position matched in the second display interface.
The source code writing sub-module comprises a position acquisition unit and a source code writing unit; the position acquisition unit is used for acquiring the dragging position of the target assembly matched with the current dragging operation in the second display interface; and the source code writing unit is used for correspondingly writing the source code matched with the target component into a source code file matched with the target applet to be generated according to the dragging position.
And the source code writing unit is further specifically used for additionally writing the source code matched with the target component into a target position of a source code file matched with the target applet if the target component is determined to be an independent functional component according to the dragging position, wherein the target position is not overlapped with the source code positions of other components in the source code file.
The source code writing unit is further specifically used for acquiring a nested component matched with the target component if the target component is determined to be the nested functional component according to the dragging position; identifying a target source code matched with the nested component in a source code file matched with the target applet, and positioning a nested position in the target source code; the source code that matches the target component is written into the nested location.
Optionally, the applet generating apparatus may further include: the modification component acquisition module is used for responding to a component modification instruction matched with the target applet and acquiring a modification component matched with the component modification instruction; and modifying the source code corresponding to the style and/or content matched with the modification component in the source code matched with the modification component, and correspondingly writing the modified modification component code into a source code file matched with the target applet to be generated.
Optionally, the applet generating apparatus may further include: and the small program issuing module is used for responding to the small program issuing instruction and issuing the target small program to the target issuing platform.
The applet generating device provided by the embodiment of the invention can execute the applet generating method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE six
Fig. 9 is a schematic structural diagram of a computer apparatus according to a sixth embodiment of the present invention, as shown in fig. 9, the computer apparatus includes a processor 90, a memory 91, an input device 92, and an output device 93; the number of the processors 90 in the computer device may be one or more, and one processor 90 is taken as an example in fig. 9; the processor 90, the memory 91, the input device 92 and the output device 93 in the computer apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 9.
The memory 91 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the applet generating method in the embodiment of the present invention (for example, the applet component presentation module 810, the component source code writing module 820, and the target applet generating module 830 in the applet generating apparatus). The processor 90 executes various functional applications of the computer device and data processing by running software programs, instructions, and modules stored in the memory 91, that is, implements the above-described applet generating method.
The memory 91 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 91 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 91 may further include memory located remotely from processor 90, which may be connected to a computer device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 92 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function controls of the computer apparatus. The output device 93 may include a display device such as a display screen.
EXAMPLE seven
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method for generating an applet, the method including:
displaying at least one small program component in the component library in a first display interface, wherein a source code for executing a set function is packaged in each small program component;
responding to the selected component in the first display interface, displaying the selected component in a second display interface, and correspondingly writing the source code matched with the selected component into a source code file matched with a target applet to be generated;
and responding to a development finishing instruction of the small program, and generating the target small program according to the source code file.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the method for generating the applet provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the applet generating apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for generating an applet, comprising:
displaying at least one small program component in the component library in a first display interface, wherein a source code for executing a set function is packaged in each small program component;
responding to the selected component in the first display interface, displaying the selected component in a second display interface, and correspondingly writing the source code matched with the selected component into a source code file matched with a target applet to be generated;
and responding to a development finishing instruction of the small program, and generating the target small program according to the source code file.
2. The method of claim 1, wherein presenting the selected component in a second presentation interface in response to the selected component in the first presentation interface comprises:
and responding to the dragging operation of the component displayed in the first display interface, and displaying the component matched with the dragging operation at the matched dragging position in the second display interface.
3. The method of claim 2, wherein correspondingly writing the source code matched with the selected component into a source code file matched with a target applet to be generated comprises:
acquiring a dragging position of a target assembly matched with the current dragging operation in the second display interface;
and correspondingly writing the source code matched with the target component into a source code file matched with the target applet to be generated according to the dragging position.
4. The method of claim 3, wherein correspondingly writing the source code matched with the target component into a source code file matched with a target applet to be generated according to the drag position comprises:
and if the target component is determined to be an independent functional component according to the dragging position, additionally writing the source code matched with the target component into a target position of a source code file matched with the target applet, wherein the target position is not overlapped with the source code positions of other components in the source code file.
5. The method of claim 3, wherein correspondingly writing the source code matched with the target component into a source code file matched with a target applet to be generated according to the drag position comprises:
if the target component is determined to be a nested functional component according to the dragging position, acquiring a nested component matched with the target component;
identifying target source code matched with the nested component in a source code file matched with the target applet, and locating a nesting position in the target source code;
writing source code that matches the target component into the nested location.
6. The method of any of claims 1-5, further comprising, after presenting the selected component in the second presentation interface in response to the selected component in the first presentation interface:
responding to a component modification instruction matched with the target applet, and acquiring a modification component matched with the component modification instruction;
and modifying the source code corresponding to the style and/or content matched with the modification component in the source code matched with the modification component, and correspondingly writing the modified modification component code into a source code file matched with the target applet to be generated.
7. The method of claim 6, after generating the target applet from the source code file, further comprising:
and responding to an applet issuing instruction, and issuing the target applet to a target issuing platform.
8. An applet generating apparatus, comprising:
the system comprises an applet component display module, a first display interface and a second display interface, wherein the applet component display module is used for displaying at least one applet component in a component library in the first display interface, and a source code for executing a set function is packaged in each applet component;
the component source code writing module is used for responding to the component selected in the first display interface, displaying the selected component in a second display interface, and correspondingly writing the source code matched with the selected component into a source code file matched with the target applet to be generated;
and the target small program generating module is used for responding to a development finishing instruction of the small program and generating the target small program according to the source code file.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of generation of an applet as claimed in any one of claims 1-7 when executing the program.
10. A storage medium containing computer-executable instructions for performing the method of generating an applet according to any one of claims 1-7 when executed by a computer processor.
CN202010544617.5A 2020-06-15 2020-06-15 Method, device and equipment for generating small program and storage medium Pending CN111708528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010544617.5A CN111708528A (en) 2020-06-15 2020-06-15 Method, device and equipment for generating small program and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010544617.5A CN111708528A (en) 2020-06-15 2020-06-15 Method, device and equipment for generating small program and storage medium

Publications (1)

Publication Number Publication Date
CN111708528A true CN111708528A (en) 2020-09-25

Family

ID=72540667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010544617.5A Pending CN111708528A (en) 2020-06-15 2020-06-15 Method, device and equipment for generating small program and storage medium

Country Status (1)

Country Link
CN (1) CN111708528A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416328A (en) * 2020-12-11 2021-02-26 广州伊智信息科技有限公司 Multi-platform small program mall construction method, device, equipment and medium
CN112416318A (en) * 2020-11-03 2021-02-26 前海飞算云智软件科技(深圳)有限公司 Micro-service development method and device, storage medium and electronic equipment
CN112631494A (en) * 2020-12-31 2021-04-09 中国农业银行股份有限公司 Column generation method and device
CN112748926A (en) * 2020-12-30 2021-05-04 上海微盟企业发展有限公司 Applet publishing method, device, equipment and computer readable storage medium
CN112799660A (en) * 2021-01-21 2021-05-14 三一重工股份有限公司 Application program generation method and device
CN113791836A (en) * 2021-01-22 2021-12-14 北京沃东天骏信息技术有限公司 Subprogram generation method and device, medium and electronic device
CN113961272A (en) * 2021-12-20 2022-01-21 广州半城云信息科技有限公司 Personalized page display method and system
CN114416087A (en) * 2022-01-18 2022-04-29 平安国际融资租赁有限公司 Applet development and generation method and device, electronic device and storage medium
CN114625366A (en) * 2022-03-11 2022-06-14 北京金堤科技有限公司 Page editing method and device, storage medium and electronic equipment
CN115002214A (en) * 2021-02-20 2022-09-02 京东科技控股股份有限公司 Information processing method, device and system, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106406877A (en) * 2016-09-09 2017-02-15 浪潮软件股份有限公司 Implementation method for on-line development and release of light application
CN109343845A (en) * 2018-08-14 2019-02-15 北京奇艺世纪科技有限公司 A kind of code file generation method and device
CN110333862A (en) * 2019-06-17 2019-10-15 深圳壹账通智能科技有限公司 UI page code generation method, device and server
CN110377858A (en) * 2019-07-08 2019-10-25 紫光云技术有限公司 A kind of visualization pulls the system and method for the generation dynamic list page
CN110727431A (en) * 2019-09-17 2020-01-24 阿里巴巴集团控股有限公司 Applet generation method and apparatus
CN110968305A (en) * 2019-12-20 2020-04-07 深圳乐信软件技术有限公司 Applet visualization generation method, device, equipment and storage medium
CN111190595A (en) * 2019-12-23 2020-05-22 平安国际智慧城市科技股份有限公司 Method, device, medium and electronic equipment for automatically generating interface code based on interface design drawing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106406877A (en) * 2016-09-09 2017-02-15 浪潮软件股份有限公司 Implementation method for on-line development and release of light application
CN109343845A (en) * 2018-08-14 2019-02-15 北京奇艺世纪科技有限公司 A kind of code file generation method and device
CN110333862A (en) * 2019-06-17 2019-10-15 深圳壹账通智能科技有限公司 UI page code generation method, device and server
CN110377858A (en) * 2019-07-08 2019-10-25 紫光云技术有限公司 A kind of visualization pulls the system and method for the generation dynamic list page
CN110727431A (en) * 2019-09-17 2020-01-24 阿里巴巴集团控股有限公司 Applet generation method and apparatus
CN110968305A (en) * 2019-12-20 2020-04-07 深圳乐信软件技术有限公司 Applet visualization generation method, device, equipment and storage medium
CN111190595A (en) * 2019-12-23 2020-05-22 平安国际智慧城市科技股份有限公司 Method, device, medium and electronic equipment for automatically generating interface code based on interface design drawing

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
MY_SHUAISHUAI: "逆战!你我共进退—uni-app开发多平台小程序", pages 109 - 111, Retrieved from the Internet <URL:《https://blog.csdn.net/My_shuaishuai/article/details/104459310》> *
佚名: "原生小程序怎样跨平台实现(微信/支付宝/百度)", pages 1 - 4, Retrieved from the Internet <URL:《https://cloud.tencent.com/developer/article/1625044》> *
天津滨海迅腾科技集团有限公司: "《HTML5与CSS3项目实战》", 北京理工大学出版社 *
李文奎主编: "《微信小程序开发与运营》", 31 August 2018, 北京理工大学出版社, pages: 1 - 4 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416318B (en) * 2020-11-03 2021-10-08 前海飞算云智软件科技(深圳)有限公司 Micro-service development method and device, storage medium and electronic equipment
CN112416318A (en) * 2020-11-03 2021-02-26 前海飞算云智软件科技(深圳)有限公司 Micro-service development method and device, storage medium and electronic equipment
CN112416328A (en) * 2020-12-11 2021-02-26 广州伊智信息科技有限公司 Multi-platform small program mall construction method, device, equipment and medium
CN112748926B (en) * 2020-12-30 2024-05-17 上海微盟企业发展有限公司 Applet issuing method, device, equipment and computer readable storage medium
CN112748926A (en) * 2020-12-30 2021-05-04 上海微盟企业发展有限公司 Applet publishing method, device, equipment and computer readable storage medium
CN112631494B (en) * 2020-12-31 2022-06-03 中国农业银行股份有限公司 Column generation method and device
CN112631494A (en) * 2020-12-31 2021-04-09 中国农业银行股份有限公司 Column generation method and device
CN112799660A (en) * 2021-01-21 2021-05-14 三一重工股份有限公司 Application program generation method and device
CN113791836A (en) * 2021-01-22 2021-12-14 北京沃东天骏信息技术有限公司 Subprogram generation method and device, medium and electronic device
CN115002214A (en) * 2021-02-20 2022-09-02 京东科技控股股份有限公司 Information processing method, device and system, electronic equipment and storage medium
CN113961272A (en) * 2021-12-20 2022-01-21 广州半城云信息科技有限公司 Personalized page display method and system
CN114416087A (en) * 2022-01-18 2022-04-29 平安国际融资租赁有限公司 Applet development and generation method and device, electronic device and storage medium
CN114625366A (en) * 2022-03-11 2022-06-14 北京金堤科技有限公司 Page editing method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN111708528A (en) Method, device and equipment for generating small program and storage medium
EP3605324B1 (en) Application development method and tool, and storage medium thereof
CN102971688B (en) Cross-platform program frame
US7917888B2 (en) System and method for building multi-modal and multi-channel applications
CN111949170B (en) Method and device for configuring task flow and electronic equipment
US20060117267A1 (en) System and method for property-based focus navigation in a user interface
CN103164300A (en) Mobile terminal touch screen automatic testing method and device
RU2639667C2 (en) Context invitation in trial version of application
CN113505082B (en) Application program testing method and device
Snell et al. Microsoft Visual Studio 2012 Unleashed: Micro Visua Studi 2012 Unl_p2
Sarmah et al. Geno: A Developer Tool for Authoring Multimodal Interaction on Existing Web Applications
CN113407284A (en) Navigation interface generation method and device, storage medium and electronic equipment
US10303331B2 (en) Live mobile application visual editor demo
CN118259906A (en) Multi-terminal page adaptation method, equipment and medium based on PaaS framework
CN113448569A (en) Site page processing system, method, equipment and storage medium
CN112506503A (en) Programming method, device, terminal equipment and storage medium
Khan et al. A retargetable model-driven framework for the development of mobile user interfaces
Freeman Pro react 16
Schuler et al. Rule-based generation of mobile user interfaces
CN104408198A (en) Method and device for acquiring webpage contents
CN114911541A (en) Configuration information processing method and device, electronic equipment and storage medium
Freeman Pro Vue. js 2
Kimmel et al. Excel 2003 VBA Programmer's Reference
CN112988139A (en) Method and device for developing event processing file
CN112632436A (en) Webpage display method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220909

Address after: 12 / F, 15 / F, 99 Yincheng Road, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai, 200120

Applicant after: Jianxin Financial Science and Technology Co.,Ltd.

Address before: 25 Financial Street, Xicheng District, Beijing 100033

Applicant before: CHINA CONSTRUCTION BANK Corp.

Applicant before: Jianxin Financial Science and Technology Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20200925

RJ01 Rejection of invention patent application after publication