CN110580159A - automatic software code generation method and system - Google Patents

automatic software code generation method and system Download PDF

Info

Publication number
CN110580159A
CN110580159A CN201910871898.2A CN201910871898A CN110580159A CN 110580159 A CN110580159 A CN 110580159A CN 201910871898 A CN201910871898 A CN 201910871898A CN 110580159 A CN110580159 A CN 110580159A
Authority
CN
China
Prior art keywords
code
instruction
unit
receiving
configuration
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
CN201910871898.2A
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.)
Shanghai Juling Information Technology Co Ltd
Original Assignee
Shanghai Juling Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Juling Information Technology Co Ltd filed Critical Shanghai Juling Information Technology Co Ltd
Priority to CN201910871898.2A priority Critical patent/CN110580159A/en
Publication of CN110580159A publication Critical patent/CN110580159A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Landscapes

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

Abstract

the invention relates to the field of software low-code development, in particular to a method and a system for automatically generating software codes, wherein the method comprises the following steps: (1) receiving an element configuration instruction; (2) acquiring a visual configuration interface according to the element configuration instruction; (3) inputting element information needing maintenance management on a configuration interface; (4) receiving a code generation instruction; (5) and calling a pre-stored code template and the input element information according to the code generation instruction to automatically generate a code. Compared with the prior art, the method can greatly save the time cost of software development, and the generated codes are orderly and consistent in interface painting after running.

Description

automatic software code generation method and system
Technical Field
the invention relates to the technical field of software code development, in particular to a method and a system for automatically generating software codes.
Background
most systems have a software management system to maintain basic data, authority management, log records and the like, most of the functions for management are addition, deletion, modification and check, the actions are basically the same, but the elements for maintenance are different, so that the functions are similar, the repetitive codes are more, but the repetitive codes cannot be copied. The database table, the page and the java class are manually and singly created, so that the software development workload is large and the working efficiency is low.
disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a method and a system for automatically generating software codes.
The purpose of the invention can be realized by the following technical scheme:
an automatic generation method of software codes comprises the following steps:
(1) receiving an element configuration instruction;
(2) Acquiring a visual configuration interface according to the element configuration instruction;
(3) Inputting element information needing maintenance management on a configuration interface;
(4) receiving a code generation instruction;
(5) And calling a pre-stored code template and the input element information according to the code generation instruction to automatically generate a code.
Configuring codes to generate a stored physical address before the step (1), and further automatically generating the codes in the step (5) and storing the codes to the physical address.
the visual configuration interface is an HTML webpage.
the automatically generated code includes HTML files and JAVA files.
An automatic software code generation system, the system comprising:
a template storage unit for storing a code template;
a first instruction entry unit for entering an element configuration instruction;
a first instruction receiving unit for receiving an element configuration instruction;
the configuration interface acquisition unit acquires a visual configuration interface according to the element configuration instruction;
The element information input unit is used for inputting element information needing maintenance management on a visual configuration interface;
a second instruction entry unit for entering a code generation instruction;
A second instruction receiving unit for receiving a code generation instruction;
and a code generation unit which automatically generates a code by calling the stored code template and the input element information upon receiving a code generation instruction.
The system further comprises:
a code storage address configuration unit for configuring a physical address for code generation storage;
and the code storage unit is used for reading the physical address in the code storage address configuration unit and storing the automatically generated code into the physical address.
The visual configuration interface is an HTML webpage.
the automatically generated code includes HTML files and JAVA files.
compared with the prior art, the invention has the following advantages:
(1) the invention can automatically generate codes, and compared with the traditional handwritten codes, the invention can greatly save time cost;
(2) compared with the traditional handwritten codes, the interface paintings which are possibly generated by more or less codes are different, but the automatically generated interface styles are consistent, and the paintings look neat.
drawings
FIG. 1 is a block flow diagram of a method for automatically generating software code according to the present invention;
FIG. 2 is a block diagram of the automatic generation system of software codes according to the present invention.
in the figure, 1 is a template storage unit, 2 is a code storage address configuration unit, 3 is a first instruction entry unit, 4 is a first instruction receiving unit, 5 is a configuration interface acquisition unit, 6 is an element information input unit, 7 is a second instruction entry unit, 8 is a second instruction receiving unit, 9 is a code generation unit, and 10 is a code storage unit.
Detailed Description
the invention is described in detail below with reference to the figures and specific embodiments. Note that the following description of the embodiments is merely a substantial example, and the present invention is not intended to be limited to the application or the use thereof, and is not limited to the following embodiments.
examples
As shown in fig. 1, an automatic software code generation method includes the following steps:
s1, generating a physical address for storage by the configuration code;
s2, receiving an element configuration instruction;
s3, acquiring a visual configuration interface according to the element configuration instruction, wherein the visual configuration interface is an HTML webpage;
s4, inputting element information needing maintenance management on a configuration interface;
S5, receiving a code generation instruction;
S6, calling a pre-stored code template and input element information according to the code generation instruction to automatically generate codes, wherein the automatically generated codes comprise HTML files and JAVA files;
s7, storing the automatically generated code in the physical address configured in the step S1.
in this embodiment, user management is taken as an example, when a code of the user management needs to be generated, element information related to the code that needs to be maintained and managed includes name, gender and age, and therefore, after receiving an element configuration instruction, the user jumps out of a visual configuration interface (i.e., a web page), inputs the element information in the web page, and at the same time, the visual configuration interface provides a trigger box of the code generation instruction, and at this time, the code can be automatically generated by clicking the trigger box.
as shown in fig. 2, an automatic software code generation system includes:
a template storage unit 1 for storing a code template;
A code storage address configuration unit 2, which is used for configuring a physical address for code generation storage;
a first order entry unit 3 for entering an element configuration order;
A first instruction receiving unit 4 for receiving an element configuration instruction;
A configuration interface obtaining unit 5, which obtains a visual configuration interface according to the element configuration instruction, wherein the visual configuration interface is an HTML webpage;
an element information input unit 6, which is used for inputting element information needing maintenance management on a visual configuration interface;
A second instruction recording unit 7, which is arranged on the HTML webpage and is used for recording a code generation instruction;
a second instruction receiving unit 8 for receiving a code generation instruction;
A code generation unit 9 which automatically generates a code by calling a stored code template and inputted element information upon receiving a code generation instruction, the automatically generated code including 1 HTML file and 4 JAVA files;
a code storage unit 10 for reading the physical address in the code storage address configuration unit and storing the automatically generated code in said physical address.
The above embodiments are merely examples and do not limit the scope of the present invention. These embodiments may be implemented in other various manners, and various omissions, substitutions, and changes may be made without departing from the technical spirit of the present invention.

Claims (8)

1. an automatic generation method of software codes is characterized by comprising the following steps:
(1) receiving an element configuration instruction;
(2) Acquiring a visual configuration interface according to the element configuration instruction;
(3) Inputting element information needing maintenance management on a configuration interface;
(4) Receiving a code generation instruction;
(5) and calling a pre-stored code template and the input element information according to the code generation instruction to automatically generate a code.
2. The method of claim 1, further comprising the step of configuring a code to generate a physical address for storage before step (1), and further wherein step (5) automatically generates a code and stores the code to the physical address.
3. The method of claim 1, wherein the visual configuration interface is an HTML web page.
4. The method of claim 1, wherein the automatically generated code comprises HTML files and JAVA files.
5. An automatic software code generation system, comprising:
a template storage unit (1) for storing a code template;
a first order entry unit (3) for entering an element configuration order;
A first instruction receiving unit (4) for receiving an element configuration instruction;
A configuration interface acquisition unit (5) which acquires a visual configuration interface according to the element configuration instruction;
an element information input unit (6) for inputting element information requiring maintenance management on a visual configuration interface;
a second instruction entry unit (7) for entering a code generation instruction;
a second instruction receiving unit (8) for receiving a code generation instruction;
and a code generation unit (9) which automatically generates a code by calling the stored code template and the input element information upon receiving a code generation instruction.
6. An automatic software code generation system according to claim 5, characterized in that it further comprises:
a code storage address configuration unit (2) for configuring a physical address where a code is stored;
And a code storage unit (10) for reading the physical address in the code storage address configuration unit and storing the automatically generated code in the physical address.
7. the system according to claim 5, wherein the visual configuration interface is an HTML web page.
8. The system of claim 5, wherein the automatically generated code comprises HTML files and JAVA files.
CN201910871898.2A 2019-09-16 2019-09-16 automatic software code generation method and system Pending CN110580159A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910871898.2A CN110580159A (en) 2019-09-16 2019-09-16 automatic software code generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910871898.2A CN110580159A (en) 2019-09-16 2019-09-16 automatic software code generation method and system

Publications (1)

Publication Number Publication Date
CN110580159A true CN110580159A (en) 2019-12-17

Family

ID=68812008

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910871898.2A Pending CN110580159A (en) 2019-09-16 2019-09-16 automatic software code generation method and system

Country Status (1)

Country Link
CN (1) CN110580159A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030122697A1 (en) * 2001-12-28 2003-07-03 Anthony Schooler Method and system for a programmable code generator
US20120030649A1 (en) * 2010-08-02 2012-02-02 Advanced Bionics AG, c/o Froriep Renggli Methods and Systems for Automatic Generation of Multithread-Safe Software Code
CN106469064A (en) * 2016-09-04 2017-03-01 深圳市云智易联科技有限公司 Code generating method and code generating unit
CN106873949A (en) * 2015-12-11 2017-06-20 泰康保险集团股份有限公司 Code generating method and its device
CN109885291A (en) * 2019-01-25 2019-06-14 深圳市元征科技股份有限公司 A kind of code automatic generation method and code generator

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030122697A1 (en) * 2001-12-28 2003-07-03 Anthony Schooler Method and system for a programmable code generator
US20120030649A1 (en) * 2010-08-02 2012-02-02 Advanced Bionics AG, c/o Froriep Renggli Methods and Systems for Automatic Generation of Multithread-Safe Software Code
CN106873949A (en) * 2015-12-11 2017-06-20 泰康保险集团股份有限公司 Code generating method and its device
CN106469064A (en) * 2016-09-04 2017-03-01 深圳市云智易联科技有限公司 Code generating method and code generating unit
CN109885291A (en) * 2019-01-25 2019-06-14 深圳市元征科技股份有限公司 A kind of code automatic generation method and code generator

Similar Documents

Publication Publication Date Title
CN107918666B (en) Data synchronization method and system on block chain
CN108874924B (en) Method and device for creating search service and computer-readable storage medium
US8527451B2 (en) Business semantic network build
CN109542997B (en) Motion trail display method and device
CN104133772A (en) Automatic test data generation method
US8370303B1 (en) Generating snapshots of data tables
CN106844307B (en) System and method for converting Excel into Word based on mark
CN104035754A (en) XML (Extensible Markup Language)-based custom code generation method and generator
CN104866599A (en) Production method and system of visual report
CN102135938A (en) Software product testing method and system
CN106055528A (en) Automatic generation method and apparatus of documents
CN109299074B (en) Data verification method and system based on templated database view
CN101859303A (en) Metadata management method and management system
CN102110102A (en) Data processing method and device, and file identifying method and tool
CN108228268B (en) Method and device for automatically generating configuration file
CN108363684A (en) List creation method, device and server
CN110889272A (en) Data processing method, device, equipment and storage medium
CN108629052B (en) Kettle task scheduling method, system, computer equipment and storage medium
CN104021219A (en) Method and device for generating data template
CN110941629A (en) Metadata processing method, device, equipment and computer readable storage medium
CN110806866A (en) Generation method and device of front-end management system
CN104731588A (en) Page layout file generation method and device
CN110990396A (en) Data storage method, device and storage medium
CN105573774A (en) Application parameter managing and configuring method
CN112035207A (en) Page menu dynamic loading method and device based on database

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191217