My Life As A Blog

Template Engine

leave a comment »

As I mentioned here the other day, nspectre uses a customised version of the Ader Template Engine.  The Ader Template Engine is the only dependency of nspectre. The customisation is that the Ader Template Engine suppresses template exceptions or outputs them inline. Since nspectre uses templates to generate code that is compiled at runtime, it is more useful to have the template engine throw exceptions – this provides more useful feedback than the compilation exception that would otherwise occur.
Originally – before release – nspectre used NVelocity. The switch to the Ader Template Engine halved the time the unit tests took to run. The change between the template languages was fairly easy. NVelocity has resource loading functionality, so I had to add the ResourceLocator class. It seems reasonable to me that a templating engine should handle templates and no more, so that wasn’t a major concern.


Written by remark

March 30, 2006 at 9:09 pm

Posted in nspectre, Tools

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: