Archive

JavaScript HTML templating libraries/frameworks

I am trying to make some comprehensive comparison of what are all the JavaScript HTML templating frameworks out there, so I decided to put together a list and give my thoughts of each of them.

  • jQuery.tmpl()
    pros:
    1. only builds HTML
    2. there is a strong chance that it will be included in core jQuery
    cons:
    1. only builds HTML (some people may want to do more, although I think it's much more cleaner to assign events through jQuery selectors)
  • angularjs
    pros:
    1. does more
    2. two ways data binding (see video)
    3. was written by two of my countrymen from Slovakia :)
    cons:
    1. learning curve
    2. Although this uses jQuery inside, it does not really take the jQuery paradigm. It has its own paradigm.
    3. this framework seems to be really immature and not really tested in large apps, especially in regards to performance
    4. I don't see any on-demand JavaScript loading for resources
    5. it really does a lot, which makes me worried from performance perspective
  • other

Oh just did a little research about the background of the authors of both of these frameworks, so jQuery.tmpl() is unofficially written by two Microsoft, and angularjs by two guys working at google, so is it google vs microsoft now ? :)

angularjs is not really going agains jquery but agains GWT, trying to provide easy to use javascript only framework for RIA to developers who are not really JavaScript geeks...

I can also see some parallels between angularjs and Adobe Flex, from which it draws its markup inspiration... so this might be another audience this might be appeal to...

Here is a cool little video giving a demo of angularjs:

Comments: