Ben Davies said
Thanks, good introduction.
Knockout.js makes it easier to create rich, responsive UIs with JavaScript. In this series Jacob Swanner shows you the basics of using this client-side JavaScript library to keep your code organized.
Thanks, good introduction.
Thanks for the great intro !
+1
@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.
Jacob, what's the advantage of using Knockout to do this over using plain javascript / jQuery?
@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
Can you share your vim config and plugins? Your vim looks great. Awesome cast. Thanks!
Thanks, this seems great. Nice video.
Very nice video. I didn't know of knockout and it looks great.!
Great introduction, thanks!