Screencast Knockout.js - Part 1 JavaScript

  • Jacob Swanner
  • 11579 views

Comments

  1. darrenHiggins said

    Great introduction, thanks!

  2. netoben said

    Very nice video. I didn't know of knockout and it looks great.!

  3. Anderson Pierre Cardoso said

    Thanks, this seems great. Nice video.

  4. Pochara Prapatanant said

    Can you share your vim config and plugins? Your vim looks great. Awesome cast. Thanks!

  5. jacob said

    @porsche, I've actually changed much of my vim setup since making that screencast. Here's my current vim configuration: https://github.com/jswanner/dotvim

    In the screencast, the font I was using was DejaVu Sans Mono, desert color scheme (which ships with vim), and I think the only plugin I used in the screencast was surround.vim

  6. Sulav said

    Jacob, what's the advantage of using Knockout to do this over using plain javascript / jQuery?

  7. jacob said

    @sulav, the advantages, hopefully, become apparent as the complexity of the application grows. If you were to just use jQuery, you'd end up with a long list of event listeners & handlers; and your application logic ends up getting spread across all the event handlers, making it harder to reason about what your application will do.

    Let's give an example: at 16:22 in the video, when I clicked on the reset button, it set the count value to 0, but that also caused the reset button to go away. If you were to do this using jQuery: the event handler for the reset button would need to set the count to 0 and also hide itself, and the event handler for the increment button would need to check each time it is clicked if the reset button can be shown. So, this is a simple example, but you can see that the logic to hide/show the reset button is spread across two event handlers. Whereas, with the knockout example, I never modified the value of allowReset directly, it was defined in terms of count -- which is the only thing I ever modified.

  8. ajspeller said

    +1

  9. Mariano J. Ponce said

    Thanks for the great intro !

  10. Ben Davies said

    Thanks, good introduction.

  11. Jason Ruhlin said

    Great introductory video Jacob!! Keep up the good work!!

  12. Ivan said

    Thanks for the first steps :)

  13. Tim B said

    So I noticed this wasn't showing up in the courses section, is this deprecated or something???

  14. Tim B said

    Ah nm, noticed its a screen-cast not a course.