A template-based code generator for web applications

The importance and usage of web applications grow every day. Today from small businesses to large-scale corporations, many institutions prefer web applications for both their internal and external services. Code size and complexity of these kinds of applications grow rapidly. This brings up the question of how to improve the development process of web applications. A solution can be to use code generators. This paper introduces a template-based code generator to improve the development process of web applications. The code generator was developed and integrated into a real-life web application. Today, the web application together with the code generator is actively used in industry. This proves that an effective integration of a template-based code generator into a real-life large-scale web application can be achieved. In addition, the effectiveness of automatic code generation to manual implementation was shown with experimentation. Throughout the experiments, bug-free code generation was observed. Also, 98.95% improvement in average development time, 93.97% improvement in average test run count, and 49.37% improvement in average code size was achieved.

___

  • [1] Fielding RT, Taylor RN. Principled design of the modern Web architecture. ACM Transactions on Internet Technology 2002; 2 (2): 115–150. doi: 10.1145/514183.514185
  • [2] Tragatschnig S, Stevanetic S, Zdun U. Supporting the evolution of event-driven service-oriented architectures using change patterns. Information and Software Technology 2018; 100 (3): 133–146. doi: 10.1016/j.infsof.2018.04.005
  • [3] Papazoglou MP. Service-oriented computing: concepts, characteristics and directions. In: Fourth International Conference on Web Information Systems Engineering (WISE 2003); Rome, Italy; 2003. pp. 3–12. doi: 10.1109/WISE.2003.1254461
  • [4] Rich C, Waters RC. Automatic programming: myths and prospects. Computer 1988; 21 (8): 40–51. doi: 10.1109/2.75
  • [5] Syriani E, Luhunu L, Sahraoui H. Systematic mapping study of template-based code generation. Computer Languages, Systems & Structures 2018; 52: 43–62. doi: 10.1016/j.cl.2017.11.003
  • [6] Cooper KD, Torczon L. Engineering a Compiler. 2nd ed. Boston, MA, USA: Morgan Kaufmann, 2011.
  • [7] Possatto MA, Lucrédio D. Automatically propagating changes from reference implementations to code generation templates. Information and Software Technology 2015; 67: 65–78. doi: 10.1016/j.infsof.2015.06.009
  • [8] Akbulut A, Toprak S. Code generator framework for smart TV platforms. IET Software 2019; 13 (4): 268–279. doi: 10.1049/iet-sen.2018.5157
  • 9] Völter M, Bettin J. Patterns for model-driven software development. In: 9th European Conference on Pattern Languages of Programmes; Irsee, Germany; 2004. pp. 525–560.
  • [10] Muszynski M. Implementing a domain-specific modeling environment for a family of thick-client GUI components. In: 5th OOPSLA Workshop on Domain-Specific Modeling; San Diego, CA, USA; 2005.
  • [11] Peng GCA, Gala C. Cloud Erp: A new dilemma to modern organisations? Journal of Computer Information Systems 2014; 54 (4): 22–30. doi: 10.1080/08874417.2014.11645719
  • [12] Charland P, Léger PM, Cronan TP, Robert J. Developing and assessing ERP competencies: basic and complex knowledge. Journal of Computer Information Systems 2016; 56 (1): 31–39. doi: 10.1080/08874417.2015.11645798
  • [13] Wohlin C, Runeson P, Höst M, Ohlsson MC, Regnell B et al. Experimentation in Software Engineering. Berlin, Germany: Springer, 2012.
  • [14] Ramakrishnan R, Gehrke J. Database Management Systems. 3rd ed. Boston, MA, USA: McGraw-Hill, 2002.
  • [15] ECMA International. ECMA-404. The JSON Data Interchange Syntax Standard. 2nd ed. Geneva, Switzerland: ECMA International, 2017.
  • [16] Balzer R. A 15 year perspective on automatic programming. IEEE Transactions on Software Engineering 1985; SE-11 (11): 1257–1268. doi: 10.1109/TSE.1985.231877
  • [17] Jugel U, Preusner A. A case study on API generation. In: Kraemer FA, Herrmann P (editors). Lecture Notes in Computer Science, Vol. 6598. Berlin, Germany: Springer, 2011, pp. 156–172.
  • [18] Altiparmak HC, Tokgoz B, Balcicek OE, Ozkaya A, Arslan A. Source code generation for large scale applications. In: International Conference on Technological Advances in Electrical, Electronics and Computer Engineering; Konya, Turkey; 2013. pp. 404–410. doi: 10.1109/TAEECE.2013.6557309
  • [19] Akbulut A, Patlar Akbulut F, Köseokur H, Çatal Ç. Design and implementation of an automatic code generation tool for end-user development. Dokuz Eylül University Faculty of Engineering Journal of Science and Engineering 2017; 19 (55.1 Special Issue): 76–88 (in Turkish with an abstract in English). doi: 10.21205/deufmd.2017195532
  • [20] Harrison W, Barton C, Raghavachari M. Mapping UML designs to Java. ACM SIGPLAN Notices 2000; 35 (10): 178–187. doi: 10.1145/354222.353184
  • [21] Sunitha EV, Samuel P. Object constraint language for code generation from activity models. Information and Software Technology 2018; 103: 92–111. doi: 10.1016/j.infsof.2018.06.010
  • [22] Steinberg D, Budinsky F, Paternostro M, Merks E. EMF: Eclipse Modeling Framework. 2nd ed. Boston, MA, USA: Addison-Wesley Professional, 2008.
  • [23] Shulga TE, Ivanov EA, Slastihina MD, Vagarina NS. Developing a software system for automata-based code generation. Programming and Computer Software 2016; 42 (3): 167–173. doi: 10.1134/S0361768816030075
  • [24] Leonov AV, Khusnutdinov RR. Study and development of the DTD generation system for XML documents. Programming and Computer Software 2005; 31 (4): 197–210. doi: 10.1007/s11086-005-0032-6
  • [25] Hu K, Duan Z, Wang J, Gao L, Shang L. Template-based AADL automatic code generation. Frontiers of Computer Science 2019; 13 (4): 698–714. doi: 10.1007/s11704-017-6477-y
  • [26] Jörges S. The state of the art in code generation. In: Jörges S (editor). Construction and Evolution of Code Generators: A Model-Driven and Service-Oriented Approach. Berlin, Germany: Springer, 2013, pp. 11–38.
  • [27] Mehmood A, Jawawi DNA. Aspect-oriented model-driven code generation: a systematic mapping study. Information and Software Technology 2013; 55 (2): 395–411. doi: 10.1016/j.infsof.2012.09.003
  • [28] Domínguez E, Pérez B, Rubio ÁL, Zapata MA. A systematic review of code generation proposals from state machine specifications. Information and Software Technology 2012; 54 (10): 1045–1066. doi: 10.1016/j.infsof.2012.04.008