Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding
51–60 of 62 posts
Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding
#52That's the only javascript framework one needs. Actually I've been wanting to write something like that for a long time but didn't get around to it. Nice to see someone else did exactly what I wanted...
Does anybody have real world examples of websites that use this kind of thing? Im always under the assumption that the old "post data to server, save it there" model still works best. Am I missing something?
[0]: https://builtwith.angularjs.org/ [1]: http://emberjs.com/ember-users/ [2]: http://www.discourse.org/
Some people prefer to do things your way, but lots of us really do like this sort of data binding and find it to be very useful.
Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding
#53Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding
#54I've been working on something pretty similar, but on the server side. It's called 'Neurons', and it's a pre-alpha Python library. It's built on Spyne[3], an RPC framework which is another side project of mine that I've been working on for ~4 years now. The aim with neurons initially is to let you generate a html form (e.g. [1]) and related services from just a model definition and an instance of this model (e.g. [2]…
Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding
#55I've been working on something pretty similar, but on the server side. It's called 'Neurons', and it's a pre-alpha Python library. It's built on Spyne[3], an RPC framework which is another side project of mine that I've been working on for ~4 years now. The aim with neurons initially is to let you generate a html form (e.g. [1]) and related services from just a model definition and an instance of this model (e.g. [2]…
Oh man, I've had to work on projects with serverside form generation (python people are really into this stuff for some reason), and it's a huge pain. Backend engineer thinks it's going to be way easier or something not having to write templates, however on the frontend, the code generated by these tools is always weird and different from the rest of the markup. No thanks.
Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding
#56Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding
#57I've been working on something pretty similar, but on the server side. It's called 'Neurons', and it's a pre-alpha Python library. It's built on Spyne[3], an RPC framework which is another side project of mine that I've been working on for ~4 years now. The aim with neurons initially is to let you generate a html form (e.g. [1]) and related services from just a model definition and an instance of this model (e.g. [2]…
Oh man, I've had to work on projects with serverside form generation (python people are really into this stuff for some reason), and it's a huge pain. Backend engineer thinks it's going to be way easier or something not having to write templates, however on the frontend, the code generated by these tools is always weird and different from the rest of the markup. No thanks.
You'll even be able to pass templates down a certain object hierarchy, but that's further down the pipeline.
Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding
#58Earlier quoted context omitted.
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.
Is it really more painless to add way.js and its dependencies (jquery.js, underscore.js, underscore.json.js, form2js.js and js2form.js) to your page then to simply add a plain javascript eventhandler to the field you want to validate?
I'm using Angular's databinding and recently it felt as if it was just convenient enough to implement a nice-to-have feature that I might have postponed otherwise.
I'm also careful with adding too many dependencies for simple things. But since I've committed to learning and using Angular anyways, I don't mind the weight and like using what it has to offer.
Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding
#59Earlier quoted context omitted.
One possible use case is "live editing" of an object. Imagine a form that lets you build an HTML button from various properties: text, color, font, background, border-radius etc. Using way.js the button can be updated immediately whenever you change one of its properties, without waiting for a server response. And saving the data to localstorage is very useful when the user is spending a long time filling the form an…
> One possible use case Sure, one can think up use cases. But I never had one. Thats why I asked for real world examples where 2-way-binding libraries are used.
Welcome to your very own filter bubble.
Re: Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding
#60Earlier quoted context omitted.
Does anybody have real world examples of websites that use this kind of thing? Im always under the assumption that the old "post data to server, save it there" model still works best. Am I missing something?
If what you're doing is simple enough that "serialise the form, send to server, wait for response, do a full page reload" works for you, then no, you don't need two-way data binding, and in fact wouldn't have any use for it. You only need two-way data binding if you need your client-side code to respond to user input, which a truly basic form doesn't need to do. Of course, for a good user experience, you probably wan…
Worth noting that, from what I can see, Salesforce largely uses the "every click is a full HTTP round trip" approach and it seems to be quite popular. NB I'm not saying that Salesforce has the best interface ever, just that old-fashioned web applications can still be pretty successful.