Monday, March 29, 2010

JavaScript Template Engines - Introduction

I’m about to begin a series of posts on JavaScript template engines.  There is currently a fair amount of buzz about them among web developers and I think they serve a purpose, so I’d like to dig into them a bit.  I’m considering using this series as the basis for an upcoming talk as well.

In the next post (part I), I’ll explain what JavaScript template engines are and how they work.  In part II, I’ll look at the use cases for them and break down when they are (and are not) appropriate.  Finally, I’ll put together a series of posts where I investigate particular template solutions.  Among the criteria I’ll be evaluating are: size of the library, template syntax style, features, and performance.  I don’t have a fixed list in mind, but I imagine I’ll write about five or six of the most popular ones.  Some candidates are:

In addition, Microsoft has recently announced a proposal for a template engine to be built into a future release of jQuery core, which seems like a natural addition to the library.  I’ll keep an eye on this as well.

Finally, I’m aware that client-side data binding is a feature of the ASP.NET Ajax library (now integrated into the ASP.NET Ajax Control Toolkit).  I imagine that there are also similar capabilities in YUI, although I haven’t used it.  However, both of these solutions include a great deal of functionality beyond pure JavaScript templates, so I doubt I’m going to spend any time on them.  Microsoft seems to have acknowledged this and is nudging developers interested in a simple client-side solution to the aforementioned jQuery proposal.

Stay tuned!

No comments: