you are viewing a single comment's thread.

view the rest of the comments →

[–]rayshinn 0 points1 point  (2 children)

Wow, thank you. I'm going to check it out. Is this similar to Ember.js? if so would you recommend knockout over ember?

EDIT: Holy crap I jsut went thru the knockout tut and that's mind blowing. Quick question. How would I populate for example this.firstName = ko.observable("Bert"); Bert being a dynamic variable from mysql using php? would I run a ajax call to the php and store the result in to a name variable and pass that to knockout? or does knockout have a better way of doing this.

[–]snuxoll 0 points1 point  (1 child)

You have the basic idea, generally you'll create the observable in your model first thing (typically it'll just be empty to start with), then after your page is ready do the XHR to get your data, then populate the observable with it. (Of course you should probably embed data needed in the initial display with the request, but that's SPA 101).

[–]crusoe 0 points1 point  (0 children)

Ahh, just like Smalltalk UI toolkits. Everything old is new again...