Home | News | Wiki | About StringTemplate | Feedback | Support | Bugs


Latest version is 4.0.4.
Download now! »

Download
Terence Parr What is StringTemplate?
StringTemplate is a java template engine (with ports for C#, Python, Ruby, and Scala) for generating source code, web pages, emails, or any other formatted text output. StringTemplate is particularly good at multi-targeted code generators, multiple site skins, and internationalization/localization. It evolved over years of effort developing jGuru.com. StringTemplate also generates this website and powers the ANTLR v3 code generator. See the Five minute introduction.

Its distinguishing characteristic is that it strictly enforces model-view separation unlike other engines. Strict separation makes websites and code generators more flexible and maintainable; it also provides an excellent defense against malicious template authors.

Terence Parr is the maniac behind both StringTemplate and ANTLR. He is a professor of computer science at the University of San Francisco.

More...

Testimonials

This is going to make JBurg2 emitters about 2.7 kazillion times easier...
Tom Harwood

StringTemplate is awesome!
Paulo Cereda from twitter feed

stringtemplate I love you [pulled from twitter feed]
@eljeko (Stefano Linguerri)

I'm using it to develop an application generator and this tool is awesome...
Arturo Cruz Preda [from @acpreda twitter...

More...

Showcase
AlphaSimple: Generating code from UML models using AlphaSimple and StringTemplate
Rafael Chaves Sun Mar 27, 2011 13:08
We just released a new build of AlphaSimple with basic support for customized...

Google Wave Protocol
Submitted by Terence Parr Sun Nov 21, 2010 19:48
Google Wave is a new web application for real-time communication and c...

lua-CodeGen
fperrad Mon Sep 20, 2010 08:29
After reading the Terence's articles, I wrote a template engine for the...

More...


Search


News
Follow @the_antlr_guy for StringTemplate and related news:
    Check out Terence's blog...

    File Sharing
    Strum project (for ST v4)
    Collin Fagan Thu Feb 10, 2011 15:58
    Lots of cool StringTemplate v4 utilities, renderers, and model adapter...

    StringTemplate Textmate Bundle
    Submitted by Terence Parr Tue Dec 7, 2010 09:43


    Spring - StringTemplate view
    Tom Czarniecki [submitted by TJP] Mon Sep 6, 2010 11:11
    Provides an implementation of a Spring MVC View and ViewResolver for S...

    Clj-StringTemplate -- Clojure wrapper for StringTemplate
    Shantanu Kumar (kumar.shantanu at gmail dot com) Fri Sep 3, 2010 12:54
    Clj-StringTemplate is a simple Clojure wrapper for StringTemplate for the...

    More...
    Documentation
    StringTemplate main documentation

    StringTemplate v4 release notes

    API (v3 API)

    source/changelogs at github

    Raw depot mirror (hosted on stringtemplate.org)

    Bugs

    Mailing List Messages
    Subject: Template instance lifecycle ,NET
    Sam Harwell Wed, 25 Jan 2012 08:46:26 -0600

    Subject: Thread safety issue in Template .NET
    Sam Harwell Wed, 25 Jan 2012 08:43:55 -0600

    Subject: Thread safety issue in Template .NET
    James P. Moring Wed, 25 Jan 2012 21:36:39 +0800

    Subject: Template instance lifecycle ,NET
    James P. Moring Wed, 25 Jan 2012 21:24:40 +0800

    More...
    Articles
    StringTemplate als Java Template Engine für mehrsprachige, formatierte Text-Emails
    Christian Schiestl Thu Aug 11, 2011 09:46
    An article in German. English version

    StringTemplate: a great template engine for code generation
    Pedro J. Molina [submitted by Terence] Fri Nov 26, 2010 08:05
    In this post, I will try to introduce and explain why StringTemplate is...

    ST Part 4:Generating a Builder Class using StringTemplate
    Collin Fagan Sun Jun 13, 2010 15:12


    ST Part 3: Complex Data Types and Renderers
    Collin Fagan Tue Jun 8, 2010 11:39


    More...