K
Kunle Odutola
I have just released a beta version of ST# - a template library written in
C# that enforces Model-View separation - on the www.stringtemplate.org
website. Though ST# is developed in C#, it can be used with projects
developed in other languages such as VB.NET, C++.NET, J# etc.
For those unfamiliar with them, a template engine is at it's most basic, a
code generator that emits text using templates. These templates are really
just "documents with holes". The "holes" are markers for where you can stick
values. Other template engines include Velocity/NVelocity and FreeMarker.
"C# StringTemplate" (or ST#) is a template library that breaks up your
templates into chunks of text and attribute expressions, which are by
default enclosed in dollar signs (e.g. $attribute-expression$). It ignores
everything except attribute expressions. Everything else is treated as
literal text and is simply copied verbatim to the output when you call the
method ToString() on a StringTemplate instance.
ST# runs on the C#/CLI platform (i.e Microsoft .NET, Novell Mono, and
dotGNU). Although ST# has only been tested on the Microsoft .NET platform,
it should work with little or no change on the others. ST# is feature
complete, includes an *alpha* release of a StringTemplate visualizer and,
features a useful template loader abstraction.
ST# is available from this page on the StringTemplate website where you can
also find more information about StringTemplate itself:
http://www.stringtemplate.org/share/list
Enjoy!
Kunle
C# that enforces Model-View separation - on the www.stringtemplate.org
website. Though ST# is developed in C#, it can be used with projects
developed in other languages such as VB.NET, C++.NET, J# etc.
For those unfamiliar with them, a template engine is at it's most basic, a
code generator that emits text using templates. These templates are really
just "documents with holes". The "holes" are markers for where you can stick
values. Other template engines include Velocity/NVelocity and FreeMarker.
"C# StringTemplate" (or ST#) is a template library that breaks up your
templates into chunks of text and attribute expressions, which are by
default enclosed in dollar signs (e.g. $attribute-expression$). It ignores
everything except attribute expressions. Everything else is treated as
literal text and is simply copied verbatim to the output when you call the
method ToString() on a StringTemplate instance.
ST# runs on the C#/CLI platform (i.e Microsoft .NET, Novell Mono, and
dotGNU). Although ST# has only been tested on the Microsoft .NET platform,
it should work with little or no change on the others. ST# is feature
complete, includes an *alpha* release of a StringTemplate visualizer and,
features a useful template loader abstraction.
ST# is available from this page on the StringTemplate website where you can
also find more information about StringTemplate itself:
http://www.stringtemplate.org/share/list
Enjoy!
Kunle