Font Size: a A A

Design And Implementation Of Code Generation Tool Based On SEF Framework

Posted on:2019-10-31Degree:MasterType:Thesis
Country:ChinaCandidate:L N ZhaoFull Text:PDF
GTID:2428330542996914Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the development of computer technology,the scale of application software grows larger and larger,and the software development environment becomes more and more complicated.The company's requirements for software production efficiency have increased,and the requirements for rapid system delivery have also gradually increased.To this end,the company independently developed a smart enterprise-level framework SEF to speed up system development and solve the complexity of enterprise application development.However,most developers still use the traditional method to write code,which has many disadvantages i.e.,inconsistent code style,code debugging difficulty and lower efficiency.Therefore,designing code generator to automatically generate code has great significance to improve the standardization and accuracy of the code and development efficiency.At present,the code generators based on model-driven and template-driven are complex to use and require pre-built data models or a large number of templates that cannot directly generate code that conforms to SEF.Moreover,it's difficult to automate the configuration of component properties and debug code.Based on the above background and current situation,the paper analyzes the characteristics of the project based on SEF in detail and needs a full consideration of the habit and style of coding and the main workload to design and realize a special code generation tool.The targeted groups are developers who use SEF.The code generation tool realizes the automatic generation of SQL to Java code and interface code and automate configuration of interface component properties to help developers out of the mechanical work of the code and put more time and effort into the business logic of the analysis and development.The paper mainly builds code generation tool based on SEF from the aspects of research background,requirement analysis,overall design,detailed design,implementation,test and so on.The system mainly consists of five parts including knowledge construction and retrieval,debugging SQL,code generation,code conversion and system configuration.The knowledge management module is responsible for building,retrieving and querying the column knowledge.It integrates project code based on SEF and database dictionary data to construct a column-centric component relationship network and uses a combination of Oracle and Neo4j to store column-based attributes and relationships.It retrieves knowledge for the component to recommend attribute values to solve the tedious issues caused by a large number of configuration of the interface components.The debugging SQL module is responsible for the online visual debugging of SQL,parsing SQL,analyzing execution results,and connecting different databases to check the accuracy of SQL.The code generation module.is responsible for the code generation including Java code,Grid code and Form code.It generates code that conforms to the SEF specification based on the template-based automatic code generation technology to solve the problem.of inconsistent code style.The code conversion module is responsible for the mutual conversion between Java,Grid,Form code and SQL.It uses file parsing to obtain SQL,component attributes and other data from the code string,and organizes the data for code conversion.The basic configuration module is responsible for configuring the database connection information and other basic information required by the system to provide support for features such as code generation and other functions.The system has been put online within the company,for more than 500 developers to use normally.After a year's use of the system,developers use the tool to generate up to millions of lines of code.It not only standardizes the program code of the business system,but also improves the developer's development efficiency,reduces the maintenance cost.The system achieves the expected results.
Keywords/Search Tags:Automatic code generation, SEF, Neo4j, SQL
PDF Full Text Request
Related items