Re:What if cucumber and jQuery had a baby?
by seliopou on Friday June 17, 2011 @06:39PM
(#2667355)
Here's what you can do without using whenever that addresses your issue, and possibly others'. As far as I can tell what people don't like is the inlined function. You can get rid of that and be descriptive about what's going on, all without the use of whenever:
turns into:
[ Parent
| on HN ]
Yep, I've played around with tons of approaches to this problem : your solution is where I started. It's probably totally ok, but there was something about it that just didn't sit right with me.
In eyeballs.js, for examples, I explored doing all of the binding via the html elements themselves, eg:
<a href="#" data-bind="posts#new">New Post</a>
which would map to a pre-defined posts controller new action.
whenever.js is just another exploration along the same theme. Again, I'm not arguing that it's better or worse: just my motivations for making it.