Compare data-lift and data-bind

27 views
Skip to first unread message

Kaiyin Zhong

unread,
Jun 22, 2015, 8:53:18 AM6/22/15
to lif...@googlegroups.com
The data-lift attribute in Lift and the data-bind attribute in knockout.js seem to have very similar functionality. Could anyone make a comparison?

Antonio Salazar Cardozo

unread,
Jun 22, 2015, 11:17:07 AM6/22/15
to lif...@googlegroups.com, kindl...@gmail.com
Knockout's data-bind describes data binding. It indicates “put this here, put this thing over here”.
You can define custom binders that work differently, and in that usage it's a little more like Lift's
data-lift. data-bind provides data to the binding handlers. Some external entity plugs data into
the Knockout binding structure, and data-bind assigns that data to various properties about the
element it's on.

data-lift describes snippet invocation. Largely, data is managed inside Scala and data-lift is simply
about hooking up the Scala to particular places in the page. Some limited data can be passed
from the data-lift attribute, but it's static data (strings, numbers, etc), not references to variables.
Snippets in turn transform markup. So in a sense Knockout's data-bind has more in common
with Lift's CSS selector transforms than it does with data-lift—but overall it's just a very different
flow.
Thanks,
Antonio
Reply all
Reply to author
Forward
0 new messages