Site Meter
 
 

Knockout 1.1.0 + new project site launched

Yes, it’s been a while since my last blog post… Partly this is due to other work, and partly it’s because my community efforts lately have increasingly focused on open source projects.

In case you’re new to it, Knockout is a JavaScript library that brings declarative bindings and the Model-View-View Model pattern to your HTML. It makes it easier to build sophisticated, dynamic web UIs in a clean structure that handles complexity, not just an ad-hoc mass of jQuery event handlers and manual DOM manipulations.

Version 1.1.0 is a significant release that adds (compared to 1.05):

  • Various syntax improvements and simplifications (chained assignments, finding model functions automatically, new utility methods requested on the project forum)
  • Support for the newest version of jquery.tmpl template engine (supposedly, this will be be integrated into the core of jQuery 1.5)
  • Smaller download size (via a new minification technique)
  • IE 9 beta support, plus various compatibility fixes for IE 6 in obscure situations
  • Full documentation (link)
  • Whole new project website with easier-to-read live examples

It supports all mainstream browsers (IE 6+, Firefox 2+, Chrome, Safari (Win/Mac/iPhone), Opera). By now it’s been used by many developers in a range of projects, so I’m pretty confident it stands up to real-world situations.

Developers using ASP.NET MVC might want to see an example of integrating it with a KO UI. Knockout isn’t limited to ASP.NET MVC – it’s pure JavaScript, so it supports any server-side framework, such as Ruby on Rails, PHP, and others. Carl Hörberg created an example of using KO with Sinatra (a Ruby web framework) and WebSockets here.

Obviously this blog post has something of a marketing edge to it :) so you’ll want to form your own judgements. But personally I think that if you’re creating any nontrivial dynamic UI on the web, there’s a lot of benefit in structuring it nicely with a clear view model like KO helps you to do.

Check it out

Feedback and questions

If you have questions about how to use Knockout, please post on the project forum, not on this blog. That helps to keep things organised. Thanks!

If you have general comments or feedback (not support requests) then please go ahead and put a comment on this blog post.

13 Responses to Knockout 1.1.0 + new project site launched

  1. mike kidder

    Wow!! You have been busy. Nice work on the documentation and the great looking Knockout website. I would have been satisfied with just updated wiki links via Github. :)

    Lots of good uses for this (wish I had it a year ago!). Hope to contribute some samples….

  2. Pingback: The Morning Brew - Chris Alcock » The Morning Brew #712

  3. Steve

    Paul, there’s some discussion about comparing KO to backbone.js at http://news.ycombinator.com/item?id=1810665 – that’s probably more informative than anything I could say here (it contains some thoughts by jashkenas, creator of CoffeeScript and all-round super-smart guy).

    Mike, thanks! I’ll look out for your samples.

  4. Thats what I was looking for, cheers.

  5. Nice work, I’m excited to see this update – plan on digging in and trying it out

  6. Fantastic work, thanks for releasing this. Does the most recent 1.1 version break your asp.net mvc tutorial? Can’t even get the initial gifts().length showing?

  7. Feel free to completely ignore the above post or remove it. My viewmodel setup script was before the data-bind line, must be too early for my brain yet!

  8. Rob Fearn

    Hey there Steve – it’s seems you’re validation has the same “number” problem as mine so you might be able to help me. If you trigger the validation in price box by putting in some letters (i.e. get it to bring up a validation error) then delete the invalid data and type 30.00 you get a validation error when you reach the decimal point and then it goes away again when 0 is added to it. e.g. 30 [valid] 30. [invalid] 30.0 [valid].

    This is driving me nuts on my own site just wondered if you might have some thought on how to overcome it?

    Cheers
    Rob

  9. Awesome, Steve! I loved the concept. I’ll be trying this on my next project.

  10. 1st, I’d want to give thanks to you for this enlightening piece. Finally, I had prefer to question wheresoever I can study much more information regarding your post. I just came here via Ask and cannot identify other interrelated web websites along this matter. How do I sign in your web blog? I had prefer to stick to your updates as they appear along! I have a matter to question but I forgotten what it absolutely was… anyway, thank you.

  11. Hey how are you doing? I just wished to stop by and say that it’s been a pleasure reading your blog. I even have bookmarked your website so that I can come again & read more in the future as well. plz do maintain the standard ?writing

  12. Hello just wanted to give you a quick heads up and let you know a few of the images aren’t loading correctly. I’m not sure why but I think its a linking issue. I’ve tried it in two different internet browsers and both show the same results.