When developing the Web-based enterprise application systems, since differentmodules usually are similar, abundant repetitive work is required and copy and paste arethe main software reuse forms, which may result in many issues, such as error-proneproblems and difficulty in maintenance. Given this situation, the thesis designs a codegenerator that can generate source code automatically by the program according to thefeature of the application business.Based on the methodology of Model Driven Architecture and taking the postalWeb access system social agency’s front-end business as the study goal, the thesis firstlyanalyzes the features of the application framework, and thus the object code to begenerated by the code generator is identified. Secondly, setting out from the PlatformIndependent Model, XML technology and FreeMarker template technology is utilized,the data model, the template files and the code generation engine of the code generatorare designed, and thus automatic code generation for the front-end business can beimplemented.The code generator has been used in the development of new business in the postalWeb access system social agency. The practical application shows that the developmentefficiency is improved by the proposed code generator, and the system’s expandabilityand maintainability is improved as well. |