Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A method and system for code generation

A code generation and source code technology, applied in the field of front-end development, can solve problems such as inflexibility of component libraries, spending a lot of energy, and difficulty in meeting industry usage habits and usage scenarios.

Active Publication Date: 2019-03-22
BEIJING TENGYUN TIANXIA SCI & TECH CO LTD
View PDF4 Cites 13 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the component library is not flexible enough to meet the needs of customization. At this time, either spend a lot of energy to modify the source code of the component library, or wait for the new version of the component library to support the requirements
However, the actual application scenarios of the project are various, and it is difficult for the component library to meet all the scenarios
One is to use basic scaffolding tools, such as vue-cli, yeoman: it can be used to generate basic code and quickly build a complete project structure, but basic scaffolding tools can only generate very basic functions, cannot be flexibly customized, and are difficult Meet industry usage habits and usage scenarios

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and system for code generation
  • A method and system for code generation
  • A method and system for code generation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0023] A component is an entity that encapsulates one or more program modules and has its own properties and methods. The core meaning of a component lies in code reuse. Its function is relatively single or independent. It is at the bottom of the code level of the entire system and is depended on by other codes. Code reuse is to reuse part or even all of the code to build new programs. In the front-end development process, html is...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a code generation method, which is suitable for execution in a server. The method comprises the following steps: sending a user interface configuration file to a client for presenting a visual user interface at the client. Receiving operation information on a visualized user interface presented by a user on a client, the operation information including component informationto be manipulated, page information and layout information of the component on the page; Sending an access request to the database in order to obtain a code snippet corresponding to the component anda page source code file; And integrating the corresponding code snippets of the components into the corresponding positions in the page source code file based on the layout information of the components on the page. This scheme can automatically integrate the structured code snippets, solve the flexibility of code reuse, and improve the efficiency of front-end development.

Description

technical field [0001] The invention relates to the technical field of front-end development, in particular to a code generation method and system. Background technique [0002] Web front-end development is the process of creating front-end interfaces such as web pages or browser applications to present to users. User interface interaction is realized through javascript scripting language, html hypertext markup language, css style language and various derived frameworks. A framework is a reusable component in the whole or part of the system. The current mainstream web frameworks include angular, vue, react, etc., which can improve the efficiency of web development. [0003] In order to further improve the efficiency of front-end development, it is necessary to increase code reusability, standardization and flexibility. There are many ways to improve code reusability, such as inheritance, constructing code blocks, loops, etc. The current solution to code reusability is to ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/38G06F8/73
CPCG06F8/38G06F8/73
Inventor 张长利
Owner BEIJING TENGYUN TIANXIA SCI & TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products