Generating Structured Text with StringTemplate

added by mceranski
2/8/2010 11:01:59 AM

82 Views

StringTemplate is a powerful tool that can be used to generate source code, web pages, emails, or any other formatted text output. Although StringTemplate was originally written in Java it has been ported to C#, Python and Ruby. My first encounter with StringTemplate was a few years ago when I needed to build a complex deployment script for setting up new SQL Server instances. The script needed to configure operators, alerts, SQL mail and also create a few basic jobs. The most important requirement was that the template could be easily changed without recompiling any code or needing any advanced knowledge of programming. Luckily, StringTemplate meets all these requirements.


0 comments