Freigeben über


Text Templating and code generation

One technology that seems to be underutilized is the use of text templating to generate code that is repetitive and follows a regular pattern. By coding the pattern into a template, it increases the consistency of the implementation of the pattern, and free's up time to be used for other development tasks.

Text templating seems to have one advantage over tools and built in compiler support, in that if you don't like what is being generated, you can make changes to the template to correct the problem. All generated code will immediately pick up the benefits.  The manual process of fixing code that adheres to a coding pattern is usually quite tedious.

Stop by and read about text templating and consider how you can use the technique.  After giving some background on text templating, we will be able to use it on some old problems.

Series

next

Posts

Comparison of Text Templates and Code DOM

How to get more out of text templates