Annotation-based Web application code generation method

A code generation and web application technology, applied in the field of annotation-based web application code generation, can solve problems such as complexity, limited utility of generators, and inability to point to other business modules, achieving the effect of easy modification and beautiful standards

Inactive Publication Date: 2017-05-10
福州宇嘉软件科技有限公司
View PDF3 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The main disadvantages of this method are: (1) For a single business module, it needs to be divided into control layer, view layer, and model layer to be configured separately, and each layer needs to be configured with its specific information, for example, the control layer needs to configure its view Links, executed SQL operations, etc.; the model layer needs to configure the name and type of the attribute; the view layer also needs to configure the name and type of the JSP file, which is very complicated
(2) Since the idea of ​​its configuration is hierarchical XML configuration based on a single module, the configuration at each level cannot point to other business modules
Therefore, the code generated by the above two solutions does not have the possibility of immediate compilation and execution, but needs to manually add the relationship codes between business objects or entities, and compile and debug after adding a large number of codes
In fact, while adding a large number of business object relational codes, many errors will be introduced, and the utility of the generator for the software engineering process is limited

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
  • Annotation-based Web application code generation method
  • Annotation-based Web application code generation method
  • Annotation-based Web application code generation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0055] An annotation-based Web application code generation method of the present invention further automatically compiles, releases and executes the generated code; if there is an error in the configuration of the module relationship in the early stage, it will be automatically checked out during the automatic compilation and release process, for example Figure 4 As shown, the code generates "Building Management", and the "Building Management" page is fully available without modification, and the query results are correct after automatic compilation and deployment. Such as Figure 5 As shown, the "Change Building" page is also automatically compiled and deployed correctly, and the relevant building types, provinces, cities, counties, etc. can display their names.

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 relates to an annotation-based Web application code generation method. The method comprises the following steps of S1: running Ant and starting a code generation technology; S2: applying an annotation reading method of an analysis class; S3: reading annotation contents of related analysis classes; S4: returning the annotation contents to an analysis class of a business module; S5: returning the annotation contents to the code generation technology; S6: sending business description information obtained from annotations to a Freemarker template engine by the code generation technology; S7: generating a source code by the Freemarker template engine; S8: starting a target code compilation task by the Ant; S9: performing compilation and copy on the source code, and generating a jar package or a war package; and S10: starting a Jetty task by the Ant, and releasing a Web application. According to the annotation-based Web application code generation method, an encoding process and detailed design and unit test time related to the encoding process can be greatly shortened.

Description

technical field [0001] The invention belongs to the technical field of software engineering computer algorithms, and in particular relates to an annotation-based method for generating Web application codes. Background technique [0002] The scheme of prior art mainly elaborates from the following several aspects: [0003] Generally, the software development process includes: requirements analysis, general design, detailed system design, coding, unit testing, integration testing and other steps. Among them, database table design is a part of system outline design. [0004] The usual code generators of the state of the art are usually aimed at replacing the tools that programmers "code". "Coding" is only an integral part of the software development process, and the coding work must rely on the work results of the previous requirement analysis, outline design, and system detailed design. The existing technical solution, "Design and Implementation of Web Application Code Gene...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44G06F9/45
CPCG06F8/30G06F8/41G06F8/70
Inventor 蔡晓东
Owner 福州宇嘉软件科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products