User Generated Templates For .NET

Jonathan just posted an article about using User Generated Templates for .NET, using Liquid.NET. It’s a good piece of info so do check it out!

Why this is important, is that this is a great way to introduce flexibility in report outputs, especially document printing. You know, printing invoices, certificates, letters, etc, which tend to be routine, only each company or institution wants it in their own format. Normally software vendors do a customization and then charge for the time and money spent, and they have to deal with the hassle of maintaining all this custom code through version upgrades and further customizations. Eventually it becomes a mammoth task, which only large companies can afford to pay for, and smaller companies either just start using pre-built templates, or stop altogether and go back to using MS Office.

We ourselves had this predicament when we started building Catalyst three years ago, and we dealt with it slightly differently. Our customers are less tech savvy than the average, and they just don’t have time to learn new template languages or dsls. So we used RTF templates – basically allowing customers to upload their own templates with a predetermined number of placeholders, which will be replaced at runtime. This gave us the best of both worlds and this is what we use so far.

However where this falls short, is that this ease comes at a price – flexibility is curtailed and we cannot use even slightly complex logic, such as flexibility in number of subjects for which marks are given, or number of lines an invoice is supposed to have – they can be handled, but each of these needs to be considered as a special case which again introduces complexity. I am wondering if we should go back and revisit that decision of using RTF templates, and start using a templating engine like Liquid.NET.

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax