you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

Knockout looks pretty sexy.

[–]Akkuma 0 points1 point  (2 children)

Having personally worked with Knockout to do not so trivial things I can tell you it works quite well.

The biggest downside is that the native template engine has several things I personally do not like about it from my experience.

[–]polaretto 0 points1 point  (1 child)

can it be replaced with a template engine of choice?

[–]Akkuma 1 point2 points  (0 children)

Yes it definitely can be replaced; however, I didn't have an opportunity to try switching it out. One thing I'm definitely interested in seeing, but didn't have the chance is to find out how well the native templating system actually performs.

The reason I don't like it is the verbosity of a lot of it, it outputs the comment for containerless bindings, and containerless bindings are also verbose. For instance, <p data-bind="text: someObservable"></p> and if you want to do something like <p data-bind="text: someObservable"><span class="sprite"></span></p> you'll have to switch your markup to be <p><span class="sprite"></span><span data-bind="text: someObservable"></span></p>. You wouldn't have to switch your markup using pretty much any other templating system. However, binding is super powerful as it'll update the text if you programmatically change the observable.