A Cost Taxonomy for Template-Based Code Generators Across Multiple Target Technologies

Anna Naumova

Citation: Anna Naumova, "A Cost Taxonomy for Template-Based Code Generators Across Multiple Target Technologies", Universal Library of Innovative Research and Studies, Volume 03, Issue 03.

Copyright: This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract

Template-based code generators promise a single declarative model rendered into many implementation artefacts, and the promise strengthens as the number of target technologies grows: one model, several languages, frameworks and persistence stacks. Reported outcomes do not match that promise evenly. A survey of 450 practitioners found productivity effects ranging from a 27% loss to an 800% gain, with most organisations reporting increases of 20–30%. A spread that wide suggests that the quantity being estimated is not a single quantity. This review argues that the maintenance cost of a multi-target generator decomposes into five classes that behave differently, and that the classification axis which makes the difference visible is scaling behaviour: what each cost scales with, and whether it is a one-off stock or a recurring rate. The five classes are replication cost, paid once per target and growing with the number of targets; consistency cost, which recurs with every model change and multiplies by the number of targets; exception cost, which recurs and grows faster than linearly as special cases accumulate inside templates; boundary cost, a one-off investment in the seam between generated and hand-written code that does not add to the total so much as bound the exception class; and drift cost, which recurs at the pace at which each target ecosystem evolves. Thirty-six verified sources support the classification, fifteen of them examined in full text, and a public MIT-licensed generator repository serves as a checkable illustration. The practical consequence is that only the replication class is visible when a team decides to add a target technology, while three of the remaining four are rates that become apparent later, so adoption decisions taken on the visible class alone understate the commitment. The review closes with five named open problems and a first step for each.


Keywords: Code Generation, Extension Points, Maintenance Cost, Model-Driven Engineering, Software Templates.

Download doi https://doi.org/10.70315/uloap.ulirs.2026.0303008