Site Meter
 
 

Knockout.js 1.2.0 released

Earlier today I published the final 1.2.0 build of knockout.js. This is a big release with stacks of new goodness since 1.1.2:

  • Changed the license to MIT (more permissive than the previous license, MS-PL)
  • Added useful new bindings: event, attr, html
  • Enhanced some existing bindings: options, checked
  • Enhanced templating features (now supports jquery.tmpl 1.0.0pre as well as previous versions, template polymorphism, passing additional data via options)
  • Various performance improvements (e.g., now precompiles and caches templates, and ensures all data/subscriptions associated with DOM elements are cleaned immediately when those elements are removed) plus bugfixes
  • Better compilation style (ensures Closure Compiler no longer adds any extra variables to global namespace)
  • Various new extensibility points requested by plugin authors
  • Minor syntactical improvements (e.g., added zero-arg constructor for observable arrays)
  • All documentation updated to match 1.2.0

Thanks very much to the many people who have contributed ideas, pull requests, bug reports, and support to make this release possible! I’m really enjoying the community that’s growing around this.

Hang on, what’s Knockout.js?

In case you’ve never heard of it, here’s tekmaven’s explaination: Smile

image

(By the way, for Visual Studio developers: Install-Package knockoutjs)

More specifically, Knockout is a JavaScript library for building rich, responsive user interfaces. It uses automatic dependency tracking and declarative bindings to update your UI whenever your data model changes, letting you cleanly structure your code around the MVVM pattern.

No, that’s just marketing blather… show me something real

OK then, to learn more:

24 Responses to Knockout.js 1.2.0 released

  1. Dave Van den Eynde

    Given that I’m also have an MS-PL licensed project out in the open, I’m curious to understand: Why the MS-PL is more permissive than the GPL?

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

  3. Steve

    Hi Dave, I’m guessing you’re asking “How is MIT more permissive than MS-PL?”, since I never mentioned GPL.

    The MIT license is more permissive than MS-PL in the sense that MIT is mainly about “no warranties, don’t sue me” whereas MS-PL contains that idea *plus* restrictions about patents, among other things. You’ll need to compare the texts of the two licenses to get the full picture!

    MIT is chosen for Knockout.js in the interests of most developers using it – it’s very unrestrictive, and is the same license as used for jQuery so most web developers will already have permission to include this code in their projects.

  4. Manuel

    Thanks Steve!!!

  5. busticated

    Congrats & thanks Steve!

  6. Dan Sorensen

    Any chance you’ll make the KO example code available from the Mix 11 demo? Hard to catch all the details. Fun demo for 20 minutes of coding. Enjoyed your presentations!

  7. Awesome news on the 1.2.0 release, Steve. :)

    I was just wondering what the word on the jQuery-tmpl support is for Knockout 1.2.0 and the latest version of jQuery? I have my trivial examples working after upgrading jQuery from 1.4.2 to 1.5.2 but I’m wondering if there are any gotchas I should be aware of?

  8. Pingback: JavaScript Magazine Blog for JSMag » Blog Archive » News roundup: Modern JavaScript, V8Monkey and SpiderNode, Adapt.js

  9. Great work. Just discovered Knockout & took it out for a spin. Amazing. IMO this is the biggest deal since jQuery.

  10. Hi Steve, I just watched your MIX11 presentation on Knockout and was blown away, this definitely looks like something I’m going to have to try out in a project! One question that occurred to me, though: what’s the situation with binding a rich text editor, like TinyMCE or some such, to an observable? Is that something that will “just work” or would it require tweaks to the editor?

  11. zbrong

    great job
    thank u !

  12. This is great Steve! How about a book for this? :)

  13. Great Work. Knockout is cool, would definitely try it.

  14. rudy Berendsen

    Is there a road map for knockout?
    for example if en when wil there be scaffolding on the pipeline.

  15. doug nelson

    As I become aware of ReactiveJS, RIAJS, WCF Web API these all need to join forces with Knockout as the glue. And wtih Web Sockets coming… exciting times. I watched the Data-Centric JQuery session. The RIA datasource looks to be the interesting part. All the linking bits just seemed a clumky bit of mess. How much interconnect is there between these teams? I think everyone would benefit greatly if there was more.

  16. zbrong

    Hi steven:
    I’v found a problem y’d mast fix it:

    When I bind following viewModel to a radioList
    var viewModelAnswers = {
    answers: ko.observableArray([
    {"answer":"a","isCorrect":false},
    {"answer":"a","isCorrect":false}
    ])
    };

    then click the two radio button, the underline array become:
    [
    {"answer":"a","isCorrect":"on"},
    {"answer":"a","isCorrect":"on"}
    ]

    there are two problem:
    1. why is “on” ? why not “true” ?
    2. why two “on” ? you know in radioList with same name list items, there is always only one true !

    though with this issue, I still very like your knockoutJS,that is a greate library, the same to jquery.

    I’m a chinese, my english is bad.

    may you have a guid to me. thank your steven !

  17. zbrong

    My email is:zbrong@21cn.com

  18. Klaus

    Hi,

    is it poosiple to use Knockout.js 1.2.1 together wirh
    https://github.com/davebalmer/jo
    ?

    http://joapp.com/

  19. Just discovered KnockoutJS and love this lib! It’s extremely powerful and concise to define the UI through states and not through behavior/functions in JavaScript. Keep on your great work, it’s made for the future! KnockoutJS and MVVM are here to stay, I’ve no doubt.

    Cheers, Matthias

  20. Dencio Tadpoles

    Great job!!! Thank you very much. KnockoutJs is sensational!

  21. Awesome work Steve! Thanks again for sharing.

  22. this look like great steven, look like jquery but funtionality is enhanced.

  23. mogisum

    Hi Steve,

    It would be great if you could publish a solid example which uses KnockoutJS and JQuery Mobile. Offen ko.applyBindings is working as expected with JQ Mobile Styles.

    Thanks.
    MogiSum

  24. mogisum

    Sorry for the typo in my previous post. I meant it is not working as expected.