Live data from Hacker News

Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding

gwendall.github.io

1–10 of 62 posts

Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding

#4
Looks very nice indeed. Especially like the low overhead. I've been using an alternative, Cortex[1], recently. It's similar, but with a pubsub based eventing system so your updates don't need to be broadcast to every component that uses the data model (e.g. you can subscribe callbacks to specific changes in the model). It works nicely with React.js. Worth a look if way.js isn't quite enough.

[1] https://github.com/mquan/cortex

Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding

#5
Looks very straight-forward. Good job!

OT: After building a couple of large applications in Angular I've come to realize that I seldom need two-way bindings. The school example where you enter something in an input box and it shows up somewhere else in real-time is not really used in the real world. Or is it? Why do we need two-way data binding?

Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding

#7
post #5

Looks very straight-forward. Good job! OT: After building a couple of large applications in Angular I've come to realize that I seldom need two-way bindings. The school example where you enter something in an input box and it shows up somewhere else in real-time is not really used in the real world. Or is it? Why do we need two-way data binding?

It depend on your application.

Collaboration applications need it.

Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding

#8
post #5

Looks very straight-forward. Good job! OT: After building a couple of large applications in Angular I've come to realize that I seldom need two-way bindings. The school example where you enter something in an input box and it shows up somewhere else in real-time is not really used in the real world. Or is it? Why do we need two-way data binding?

How about: Enter an amount in an input box and see a sub-total in real-time, or alert when constraints are violated?

Possibilities are endless and you're more likely to implement them when it is so painless.

Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding

#9
post #5

Looks very straight-forward. Good job! OT: After building a couple of large applications in Angular I've come to realize that I seldom need two-way bindings. The school example where you enter something in an input box and it shows up somewhere else in real-time is not really used in the real world. Or is it? Why do we need two-way data binding?

I rarely need _simultaneous_ two-way databinding.

But I do sometimes need databinding from view to model (when I want users to enter data, and it just fills in my object), and I sometimes want databinding from model to view (where my data is nicely displayed).

So rather than doing something fiddly and different for each way, it makes more sense to just have 2-way databinding in the first place.

And that then makes it easier for when I _do_ want 2-way databinding - for instance allowing users to enter a filter to narrow down a list.

Post reply on HN