CN113504908A - Business code generation method and device, electronic equipment and computer readable medium - Google Patents

Business code generation method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN113504908A
CN113504908A CN202110813590.XA CN202110813590A CN113504908A CN 113504908 A CN113504908 A CN 113504908A CN 202110813590 A CN202110813590 A CN 202110813590A CN 113504908 A CN113504908 A CN 113504908A
Authority
CN
China
Prior art keywords
component
code
instruction
layer
editing area
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
CN202110813590.XA
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 filed Critical China Construction Bank Corp
Priority to CN202110813590.XA priority Critical patent/CN113504908A/en
Publication of CN113504908A publication Critical patent/CN113504908A/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/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a business code generation method, a business code generation device, electronic equipment and a computer readable medium, and relates to the technical field of big data.A specific implementation mode comprises the steps of responding to a dragging instruction, determining at least one selected component from a preset component library, and dragging the at least one selected component to a view area; responding to the connection instruction, performing logic connection on the components in the view area to generate a component tree with nodes as parameter configuration in the attribute editing area; responding to the parameter instruction, acquiring parameter data to be transmitted to the parameter configuration corresponding to the attribute editing area, and dynamically analyzing to generate a corresponding component code; and responding to the code generation instruction, traversing the component tree of the attribute editing area layer by layer from top to bottom, and generating the service code. Therefore, the implementation mode of the invention can enable developers to complete development tasks more conveniently and rapidly, and improve the efficiency of software development.

Description

Business code generation method and device, electronic equipment and computer readable medium
Technical Field
The invention relates to the technical field of mobile interconnection, and provides a service code generation method, a service code generation device, electronic equipment and a computer readable medium.
Background
With the penetration of internet technology into aspects of human life and work, various front-end application development needs have also seen explosive growth.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the traditional software development mode is a text type coding mode, the efficiency is low, defects, loopholes and the like are easy to generate, a large amount of manpower and material resources are required to be invested when a mobile terminal application program APP is developed, and the development and maintenance cost is high.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for generating a service code, an electronic device, and a computer-readable medium, so that a developer can complete a development task more conveniently and quickly, and efficiency of software development is improved.
In order to achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a service code generation method, including determining, in response to a drag instruction, a selected at least one component from a preset component library, and dragging the selected at least one component to a view area; responding to the connection instruction, performing logic connection on the components in the view area to generate a component tree with nodes as parameter configuration in the attribute editing area; responding to the parameter instruction, acquiring parameter data to be transmitted to the parameter configuration corresponding to the attribute editing area, and dynamically analyzing to generate a corresponding component code; and responding to the code generation instruction, traversing the component tree of the attribute editing area layer by layer from top to bottom, and generating the service code.
Optionally, in response to the drag instruction, the method further includes:
and acquiring the parameter configuration of the selected at least one component so as to display the parameter configuration in the attribute editing area.
Optionally, before obtaining the parameter data to be transmitted to the parameter configuration corresponding to the attribute editing area, the method includes:
and mapping each component in the view area with the currently developed service project information so as to add parameter configuration corresponding to the service project information to each component in the attribute editing area.
Optionally, traversing the component tree layer by layer from top to bottom, further comprising:
reading the parameter information of the components and the corresponding component codes layer by layer from top to bottom according to the component tree, and sequentially displaying the reading results on a preset visual graph operation page.
Optionally, after traversing the component tree layer by layer from top to bottom to generate the service code, the method includes:
and recording and generating a component list so as to trigger the loading of the corresponding component according to the execution progress based on the component list.
Optionally, the dynamically parsing generates corresponding component code, further including:
and rendering the template codes corresponding to the components to a code view area, and displaying the rendering effect of the current components in the view area.
Optionally, after dragging the selected at least one component to the view area, the method includes:
rendering the style code corresponding to the component to a style editing area;
and in response to the style modification instruction, modifying the style code in the style editing area to dynamically change the component display content of the view area.
Optionally, comprising:
editing a generated custom tag assembly by adopting a preset code, packaging and storing the custom tag assembly into an assembly library; the label comprises a label name, a label ID and a label parameter.
In addition, the invention also provides a service code generation device, which comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for responding to the dragging instruction, determining the selected at least one component from a preset component library and further dragging the selected at least one component to the view area; responding to the connection instruction, performing logic connection on the components in the view area to generate a component tree with nodes as parameter configuration in the attribute editing area; the generating module is used for responding to the parameter instruction, acquiring parameter data to transmit to the parameter configuration corresponding to the attribute editing area, and dynamically analyzing and generating a corresponding component code; and responding to the code generation instruction, traversing the component tree of the attribute editing area layer by layer from top to bottom, and generating the service code.
Optionally, the obtaining module, in response to a drag instruction, further includes:
and acquiring the parameter configuration of the selected at least one component so as to display the parameter configuration in the attribute editing area.
Optionally, before the generating module obtains the parameter data to be transmitted to the parameter configuration corresponding to the attribute editing area, the generating module includes:
and mapping each component in the view area with the currently developed service project information so as to add parameter configuration corresponding to the service project information to each component in the attribute editing area.
Optionally, the generating module traverses the component tree layer by layer from top to bottom, further including:
reading the parameter information of the components and the corresponding component codes layer by layer from top to bottom according to the component tree, and sequentially displaying the reading results on a preset visual graph operation page.
Optionally, after the generating module traverses the component tree layer by layer from top to bottom to generate the service code, the generating module includes:
and recording and generating a component list so as to trigger the loading of the corresponding component according to the execution progress based on the component list.
Optionally, the generating module dynamically analyzes and generates the corresponding component code, and further includes:
and rendering the template codes corresponding to the components to a code view area, and displaying the rendering effect of the current components in the view area.
Optionally, the generating module is further configured to:
rendering the style code corresponding to the component to a style editing area;
and in response to the style modification instruction, modifying the style code in the style editing area to dynamically change the component display content of the view area.
Optionally, the obtaining module is further configured to:
editing a generated custom tag assembly by adopting a preset code, packaging and storing the custom tag assembly into an assembly library; the label comprises a label name, a label ID and a label parameter.
One embodiment of the above invention has the following advantages or benefits: the invention creatively applies the IDE development tool to the front-end project development and the component development, thereby effectively improving the efficiency of the front-end development; the traditional coding mode of front-end development is changed, a front-end developer can directly assemble required components through visual operation technologies such as dragging on an interface, corresponding parameters such as attributes, styles and events are configured for the required components and elements in the required components in a form in an attribute editing area, and finally compiling and combining are carried out to generate complete service codes, so that the operation is simple, the learning cost of the front-end developer is reduced, the development period is shortened, the development efficiency is improved, and the service codes can be ensured to have the characteristics of high performance, high quality, high multiplexing and the like; moreover, the component relation tree is traversed layer by layer from top to bottom according to the modular design of the components, the component codes of all the components are obtained, and the service codes are generated by combining and optimizing, so that the situations of component code redundancy and label nesting confusion in the traditional development mode are avoided, and the use efficiency of the component codes is improved; the component relation tree supports real-time updating, and real-time updating can be carried out according to the change of the component reference relation, so that the mutual nesting relation among the components in the current page is displayed more visually, and the development efficiency is improved; in addition, the invention reads the configuration parameter information and the corresponding component codes stored in the components layer by layer from top to bottom according to the component relation tree, and displays the configuration parameter information and the corresponding component codes on the visual graphic operation page, thereby facilitating the user to preview the component display effect on the visual operation interface.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a business code generation method according to a first embodiment of the present invention;
FIG. 2 is a block diagram of a business code generation framework according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a visualization operation page of business code generation according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a visual operation page control generated by business code according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a main flow of a business code generation method according to a second embodiment of the present invention;
fig. 6 is a schematic diagram of main modules of a service code generation apparatus according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a service code generation method according to a first embodiment of the present invention, and as shown in fig. 1, the service code generation method includes:
step S101, in response to a dragging instruction, determining at least one selected component from a preset component library, and dragging the at least one selected component to a view area.
In embodiments, the present invention improves software Development efficiency through graphical-based component Development, such as drag and drop operations in HTML pages or embedding visualization pages in IDEs (IDE is an Integrated Development Environment abbreviation).
Preferably, the generated custom tag assembly is edited by a preset code and packaged and stored in the assembly library, and the tag may include a tag name, a tag ID, a tag parameter, and other contents. That is, the independent components are split according to the original service scene and encapsulated into tags for developers to use, and the components carry contents such as variable names, function names, style attributes and the like. The component repository is formed by component development and component building as shown in fig. 2, and business code is generated by the process of visualizing the designer (i.e., in response to drag, connect, etc. instructions) for the components (i.e., component 1, component 2, etc.) in the component repository (i.e., component library).
In some embodiments, in response to the drag instruction, the parameter configuration of the selected at least one component may be further obtained to display the parameter configuration in the property editing area. That is, as shown in fig. 3, the components in the left component library are dragged in the visualization page, and the parameter configuration of the selected component is displayed in the "property editing area" on the right side of the page in real time.
And step S102, responding to the connection instruction, performing logic connection on the components in the view area, and generating a component tree with nodes as parameter configuration in the attribute editing area.
In the embodiment, as shown in fig. 3, according to each component displayed in the "view area", a component tree is displayed in real time in the "property editing area" on the right side of the page for recording all selected components in the "view area", and the content such as the component name and the nesting relation used by the developer is more intuitively displayed in the form of the component tree.
Step S103, responding to the parameter instruction, acquiring parameter data to be transmitted to the parameter configuration corresponding to the attribute editing area, and dynamically analyzing to generate a corresponding component code.
In the embodiment, before the parameter data is acquired to be transmitted to the parameter configuration corresponding to the attribute editing area, each component in the view area is mapped with the currently developed service item information in response to the parameter instruction, so that the parameter configuration corresponding to the service item information is added to each component in the attribute editing area. That is, the component of the present invention has the parameter configuration of the construction itself, and the addition of the component parameter configuration can be performed according to the currently developed service project.
It should be noted that, in the process of dynamically analyzing and generating the corresponding component code, the template code corresponding to the component may be rendered to the code view area, and the related code of the component is stored, including but not limited to the css style of the component itself, adding a unique ID or corresponding class value, binding a JavaScript interaction event, and the like, so that the actual effect of the currently selected component is displayed in the view area, that is, the visual component is generated in the view area according to the component required by the service, and the user may preview the display effect of the component in the view area, so that the developer can more intuitively know the configuration state of the current component parameter, and better guide development. The template codes are template files of packaged components, selected component codes are inserted into the code view area and deleted conveniently, and convenience is brought to later-stage merging optimization and generation of business codes.
As a specific embodiment, the parameter configuration may include component configuration information and page element configuration information, where the component configuration information includes: the page element configuration information includes page element node properties, node CSS styles, interface-bound JavaScript (a lightweight, interpreted, or just-in-time compiled high-level programming language) events, and the like. The page element configuration information can be displayed in the right attribute editing area, so that the page element configuration information is easy to read and modify by developers and easy to analyze and generate by a machine, and the efficiency can be effectively improved. In an embodiment, a developer may select a component to be assembled from a visualization operation page as shown in fig. 3, drag the component into a view area, configure page element information in a right attribute editing area, and automatically save parameter information of the currently configured component when an input box loses a focus event after input is completed.
And step S104, responding to the code generation instruction, traversing the component tree of the attribute editing area layer by layer from top to bottom, and generating a service code.
In the embodiment, as shown in fig. 3, a component tree is displayed in real time in the property editing area on the right side of the page, and is used for recording component tag names existing in the view area, acquiring each component code layer by layer from top to bottom according to the component relationship tree, and merging and optimizing the component codes to generate the service codes. Preferably, the parameter information of the components and the corresponding component codes are read layer by layer from top to bottom according to the component tree, and the read results are sequentially displayed on a preset visual graphic operation page, so that a developer can preview the component display effect on a visual operation interface conveniently.
In addition, after the component tree is traversed layer by layer from top to bottom to generate the service code, a component list can be recorded and generated, so that loading of the corresponding component is triggered according to the execution progress based on the component list. That is to say, the invention can trigger the loading of the components in the component list according to the requirements, so that the using condition and the using frequency of the components can be counted based on the component list, and the relevant information is collected and used for the optimization and modification of the components.
It should be noted that, in the process of traversing the component tree of the attribute editing region layer by layer from top to bottom, if operations such as re-dragging and modifying the sequence of each component displayed in the view region are performed, the content of the code view region and the attribute editing region may be changed correspondingly in real time.
As another embodiment of the present invention, the visual graphics operation page further includes a style editing area, and the selected component is displayed in the view area, and the style code corresponding to the component is rendered to the style editing area, so that the style code in the style editing area can be modified in response to the style modification instruction, and the component display content in the view area is dynamically changed.
It is worth pointing out that the invention can associate the components of the view area with the code view area and the style editing area, so that the corresponding codes of the components in the view area can be viewed through the code view area and the style editing area. Preferably, in response to the code viewing instruction, the content of the components displayed in the view area can be switched to a code view area or a style editing area for code display; of course, the view area or the style editing area can be switched to be displayed for the code view area in response to the code view viewing instruction; in addition, the view area or the code view area can be switched to be displayed as a style editing area in response to the view style code instruction. For example, as shown in fig. 4, a switching control is displayed on the visualization operation page to switch the view area, the code view area, and the style editing area.
Preferably, when the code is previewed, an on-demand loading function can be triggered, namely, a component list generated by the attribute editing area dynamically loads components to the code view area and the style editing area for displaying.
Fig. 5 is a schematic diagram of a main flow of a service code generation method according to a second embodiment of the present invention, and as shown in fig. 5, the service code generation method includes:
step S501, a user-defined label assembly generated by editing a preset code is adopted, packaged and stored in an assembly library.
In an embodiment, the tag may include a tag name, a tag ID, tag parameters, and the like. And the component itself carries the variable name, function name, style attributes, etc.
Step S502, in response to a dragging instruction, determining at least one selected component from a preset component library, and dragging the at least one selected component to a view area.
Step S503, acquiring the parameter configuration of the selected at least one component, so as to display the parameter configuration in the attribute editing area.
And step S504, responding to the connection instruction, and logically connecting the components in the view area to generate a component tree with the nodes as parameter configuration in the attribute editing area.
Step S505, responding to the parameter instruction, mapping each component in the view area with the currently developed service project information, so as to add the parameter configuration corresponding to the service project information to each component in the attribute editing area.
Step S506, parameter data are obtained to be transmitted to the parameter configuration corresponding to the attribute editing area, and the corresponding component codes are generated through dynamic analysis.
Step S507, render the template code corresponding to the component to the code view area and render the style code to the style editing area.
Step S508, in response to the style modification instruction, modifying the style code in the style editing area, and dynamically changing the component display content of the view area.
Step S509, in response to the code generation instruction, traverse the component tree of the attribute editing region layer by layer from top to bottom, and generate a service code.
Step S510, recording and generating a component list, so as to trigger loading of a corresponding component according to an execution progress based on the component list.
Fig. 6 is a schematic diagram of main modules of a service code generation apparatus according to an embodiment of the present invention, and as shown in fig. 6, the service code generation apparatus includes an acquisition module 601 and a generation module 602. The obtaining module 601 responds to a dragging instruction, determines at least one selected component from a preset component library, and drags the at least one selected component to the view area; responding to the connection instruction, performing logic connection on the components in the view area to generate a component tree with nodes as parameter configuration in the attribute editing area; the generating module 602, in response to the parameter instruction, acquires parameter data to transmit to the parameter configuration corresponding to the attribute editing area, and dynamically analyzes and generates a corresponding component code; and responding to the code generation instruction, traversing the component tree of the attribute editing area layer by layer from top to bottom, and generating the service code.
In some embodiments, the obtaining module 601, in response to the drag instruction, further includes:
and acquiring the parameter configuration of the selected at least one component so as to display the parameter configuration in the attribute editing area.
In some embodiments, before the generating module 602 obtains the parameter data to be transmitted to the parameter configuration corresponding to the property editing area, the method includes:
and mapping each component in the view area with the currently developed service project information so as to add parameter configuration corresponding to the service project information to each component in the attribute editing area.
In some embodiments, the generating module 602 traverses the component tree layer by layer from top to bottom, further comprising:
reading the parameter information of the components and the corresponding component codes layer by layer from top to bottom according to the component tree, and sequentially displaying the reading results on a preset visual graph operation page.
In some embodiments, after the generating module 602 traverses the component tree layer by layer from top to bottom to generate the business code, the method includes:
and recording and generating a component list so as to trigger the loading of the corresponding component according to the execution progress based on the component list.
In some embodiments, the generating module 602 dynamically parses the generated corresponding component code, further comprising:
and rendering the template codes corresponding to the components to a code view area, and displaying the rendering effect of the current components in the view area.
In some embodiments, the generating module 602 is further configured to:
rendering the style code corresponding to the component to a style editing area;
in response to the style modification instruction, the style code in the style editing area is modified to dynamically change the component display content of the view area
In some embodiments, the obtaining module 601 is further configured to:
editing a generated custom tag assembly by adopting a preset code, packaging and storing the custom tag assembly into an assembly library; the label comprises a label name, a label ID and a label parameter.
It should be noted that, the service code generation method and the service code generation apparatus of the present invention have corresponding relationship in the specific implementation content, so the repeated content is not described again.
Fig. 7 shows an exemplary system architecture 700 to which a business code generation method or a business code generation apparatus of an embodiment of the present invention may be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 serves to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
Guests may interact with the server 705 over the network 704 using the terminal devices 701, 702, 703 to receive or send messages, etc. The terminal devices 701, 702, 703 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only).
The terminal devices 701, 702, 703 may be various electronic devices having a service code generation screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server that provides various services, such as a background management server (for example only) that supports shopping websites browsed by guests using the terminal devices 701, 702, 703. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the service code generation method provided by the embodiment of the present invention is generally executed by the server 705, and accordingly, the computing device is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data necessary for the operation of the computer system 800 are also stored. The CPU801, ROM802, and RAM803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including components such as a Cathode Ray Tube (CRT), a liquid crystal service code generator (LCD), and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 807 including a network interface card such as a LAN card, a modem, or the like. The communication section 807 performs communication processing via a network such as the internet. A drive 808 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 808 as necessary, so that a computer program read out therefrom is mounted on the storage portion 808 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 807, and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer 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 computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module and a generation module. Wherein the names of the modules do not in some cases constitute a limitation of the module itself.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include determining a selected at least one component from a preset component library in response to a drag instruction, and dragging the selected at least one component to a view area; responding to the connection instruction, performing logic connection on the components in the view area to generate a component tree with nodes as parameter configuration in the attribute editing area; responding to the parameter instruction, acquiring parameter data to be transmitted to the parameter configuration corresponding to the attribute editing area, and dynamically analyzing to generate a corresponding component code; and responding to the code generation instruction, traversing the component tree of the attribute editing area layer by layer from top to bottom, and generating the service code.
According to the technical scheme of the embodiment of the invention, developers can complete development tasks more conveniently and quickly, and the software development efficiency is improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A method for generating a service code, comprising:
in response to a dragging instruction, determining at least one selected component from a preset component library, and dragging the at least one selected component to a view area;
responding to the connection instruction, performing logic connection on the components in the view area to generate a component tree with nodes as parameter configuration in the attribute editing area;
responding to the parameter instruction, acquiring parameter data to be transmitted to the parameter configuration corresponding to the attribute editing area, and dynamically analyzing to generate a corresponding component code;
and responding to the code generation instruction, traversing the component tree of the attribute editing area layer by layer from top to bottom, and generating the service code.
2. The method of claim 1, in response to a drag instruction, further comprising:
and acquiring the parameter configuration of the selected at least one component so as to display the parameter configuration in the attribute editing area.
3. The method of claim 1, wherein before obtaining the parameter data to be transmitted to the parameter configuration corresponding to the property editing area, the method comprises:
and mapping each component in the view area with the currently developed service project information so as to add parameter configuration corresponding to the service project information to each component in the attribute editing area.
4. The method of claim 1, wherein traversing the component tree layer-by-layer from top to bottom further comprises:
reading the parameter information of the components and the corresponding component codes layer by layer from top to bottom according to the component tree, and sequentially displaying the reading results on a preset visual graph operation page.
5. The method of claim 1, wherein traversing the component tree layer-by-layer from top to bottom to generate the business code comprises:
and recording and generating a component list so as to trigger the loading of the corresponding component according to the execution progress based on the component list.
6. The method of claim 1, wherein dynamically parsing generates corresponding component code, further comprising:
and rendering the template codes corresponding to the components to a code view area, and displaying the rendering effect of the current components in the view area.
7. The method of claim 1, wherein dragging the selected at least one component to the view area comprises:
rendering the style code corresponding to the component to a style editing area;
and in response to the style modification instruction, modifying the style code in the style editing area to dynamically change the component display content of the view area.
8. The method according to any one of claims 1 to 7, comprising:
editing a generated custom tag assembly by adopting a preset code, packaging and storing the custom tag assembly into an assembly library; the label comprises a label name, a label ID and a label parameter.
9. A service code generation apparatus, comprising:
the acquisition module is used for responding to a dragging instruction, determining at least one selected component from a preset component library and dragging the at least one selected component to a view area; responding to the connection instruction, performing logic connection on the components in the view area to generate a component tree with nodes as parameter configuration in the attribute editing area;
the generating module is used for responding to the parameter instruction, acquiring parameter data to transmit to the parameter configuration corresponding to the attribute editing area, and dynamically analyzing and generating a corresponding component code; and responding to the code generation instruction, traversing the component tree of the attribute editing area layer by layer from top to bottom, and generating the service code.
10. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
11. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-8.
CN202110813590.XA 2021-07-19 2021-07-19 Business code generation method and device, electronic equipment and computer readable medium Pending CN113504908A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110813590.XA CN113504908A (en) 2021-07-19 2021-07-19 Business code generation method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110813590.XA CN113504908A (en) 2021-07-19 2021-07-19 Business code generation method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN113504908A true CN113504908A (en) 2021-10-15

Family

ID=78013689

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110813590.XA Pending CN113504908A (en) 2021-07-19 2021-07-19 Business code generation method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN113504908A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672210A (en) * 2021-10-25 2021-11-19 深圳市明源云空间电子商务有限公司 Triangular icon code generation method and device and readable storage medium
CN114064024A (en) * 2021-11-29 2022-02-18 Oppo广东移动通信有限公司 Method, apparatus, device, storage medium, and program product for developing micro-application
CN114461204A (en) * 2022-04-12 2022-05-10 南京飓风引擎信息技术有限公司 Development system and method for translating multi-level object data into native code
CN114625366A (en) * 2022-03-11 2022-06-14 北京金堤科技有限公司 Page editing method and device, storage medium and electronic equipment
CN114995803A (en) * 2022-05-31 2022-09-02 中国电信股份有限公司 Development method of human-computer interface, low-code development platform, terminal and medium
CN115268861A (en) * 2022-06-21 2022-11-01 北京志凌海纳科技有限公司 Introduction method, system, equipment and storage medium of custom component
CN115495807A (en) * 2022-09-26 2022-12-20 上海弘玑信息技术有限公司 Automatic drawing method and electronic equipment
CN116009847A (en) * 2023-02-16 2023-04-25 上海伯俊软件科技有限公司 Code generation method, device, electronic equipment and storage medium
CN116088816A (en) * 2021-11-05 2023-05-09 大连联达科技有限公司 Method for developing panoramic service view by low codes
CN116088825A (en) * 2023-04-03 2023-05-09 广东省信息工程有限公司 Script generation method, visual editor and storage medium

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672210A (en) * 2021-10-25 2021-11-19 深圳市明源云空间电子商务有限公司 Triangular icon code generation method and device and readable storage medium
CN116088816A (en) * 2021-11-05 2023-05-09 大连联达科技有限公司 Method for developing panoramic service view by low codes
CN116088816B (en) * 2021-11-05 2024-03-26 大连联达科技有限公司 Method for developing panoramic service view by low codes
CN114064024A (en) * 2021-11-29 2022-02-18 Oppo广东移动通信有限公司 Method, apparatus, device, storage medium, and program product for developing micro-application
CN114625366A (en) * 2022-03-11 2022-06-14 北京金堤科技有限公司 Page editing method and device, storage medium and electronic equipment
CN114461204B (en) * 2022-04-12 2022-06-17 南京飓风引擎信息技术有限公司 Development system and method for translating multi-level object data into native code
CN114461204A (en) * 2022-04-12 2022-05-10 南京飓风引擎信息技术有限公司 Development system and method for translating multi-level object data into native code
CN114995803A (en) * 2022-05-31 2022-09-02 中国电信股份有限公司 Development method of human-computer interface, low-code development platform, terminal and medium
CN115268861A (en) * 2022-06-21 2022-11-01 北京志凌海纳科技有限公司 Introduction method, system, equipment and storage medium of custom component
CN115495807A (en) * 2022-09-26 2022-12-20 上海弘玑信息技术有限公司 Automatic drawing method and electronic equipment
CN115495807B (en) * 2022-09-26 2024-05-10 上海弘玑信息技术有限公司 Automatic drawing method and electronic equipment
CN116009847A (en) * 2023-02-16 2023-04-25 上海伯俊软件科技有限公司 Code generation method, device, electronic equipment and storage medium
CN116088825A (en) * 2023-04-03 2023-05-09 广东省信息工程有限公司 Script generation method, visual editor and storage medium

Similar Documents

Publication Publication Date Title
CN113504908A (en) Business code generation method and device, electronic equipment and computer readable medium
CN109634598B (en) Page display method, device, equipment and storage medium
CN109918607B (en) Page construction method and device, medium and computing equipment
US10152362B2 (en) Techniques to modify a document using a latent transfer surface
CN107832045B (en) Method and apparatus for cross programming language interface conversion
CN103207853B (en) The direct operated method and system analyzing data visualization is provided in analytical statement
US8711148B2 (en) Method and system for generating and displaying an interactive dynamic selective view of multiply connected objects
US9268562B1 (en) Methods and apparatuses for dynamically generating mobile application layouts using client-independent configuration
CN112286513A (en) Visual design method and device based on component metadata
CN112561386A (en) Method, device and equipment for acquiring business process
CN104484189A (en) Construction and design method of application interface
CN106354483B (en) Data processing method and device and electronic equipment
CN110554874A (en) Method and device for reusing webpage components of SaaS platform
US20240160410A1 (en) Application Development Platform, Micro-program Generation Method, and Device and Storage Medium
CN111651966A (en) Data report file generation method and device and electronic equipment
CN113495730A (en) Resource package generation and analysis method and device
CN114564199A (en) Method, device and equipment for generating use page and readable storage medium
CN114756228A (en) Page processing method, device, equipment and storage medium
CN113515275A (en) WYSIWYG cloud industrial configuration software system and development method thereof
CN110647327B (en) Method and device for dynamic control of user interface based on card
CN113220381A (en) Click data display method and device
CN116069303A (en) Code generation method, device, equipment and storage medium
CN112486482A (en) Page display method and device
US11843679B2 (en) Automated dependency management based on page components
CN114816430A (en) Business code development method, system and computer readable 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