Comparison of Text templating vs Compiler Extensibility

 In this post, I would like to wrap up a quick tour of compiler extensibility with a few thoughts on how it compares to Text Templates. Text Templates It is easy to get started with text templates and the tools.  In most cases, you probably have a file that looks similar to what you…


How to implement IAsyncResult using compiler extensibility

In previous posts I gave an introduction to Boo and the extensibility of the compiler. In this post we are now able to look at how compiler extensibility can be used to improve the creation of asynchronous operations. Initially, I thought it would be straighs’t forward to modify the model created earlier with text templates…


Asynchronous Operation Model and Code Generation

In the previous post I gave a brief overview of an object model that would allow one to capture the data necessary to implement an asynchronous operation. In this post, I will describe in more detail the concepts of the model. One of the key concepts, the ExceptionModel, consists of a friendly name and possibly…


How to get more out of text templates

In this post I would like to cover more advanced text templates.  I won’t attempt to cover everything there is to know about text templates. There is plenty of documentation on the web to drill down into the details if you are interested in learning more.  In these examples I used Visual Studio 2010 and the Visualization…


Comparison of Text Templates and Code DOM

In this post I would to present a basic text template, and show how it could be easier to generate code using text templates than with the code DOM.    A text template is a document with special escape sequences to indicate where variable portions of text should be inserted.  The escape sequences can also be…


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…