Wednesday, April 1, 2015

2-way databinding in javascript

I ahve been using angularJS for a while now and I've learned NOT to like it. I liked it at the beginning, I mean who wouldn't, it's pure magic. But when you get deeper to it, you will realize some deficiencies. I will only mention the one that was the biggest for my latest project: Performance. I had an application that has excel-like table with hundreds or even thousands of cells, that could have naturally even 30 x 2-way databindings inside them.

I actually fixed this (to some extent) with making updates manually, so in the end I didn't have much use of angular, since fixing it's short comings takes a lot of time.

Later on I noticed a great article on 1-way databinding with vanilla javascript. I haven't actually tested this anywhere yet, but will definitely keep it in mind. With code-sections / libraries like these I like to work with, but working with big frameworks, always brings downsides too. At least for me almost always they bring a lot of work with fixing the issues the framework brings with it.

So I suggest to read this article about the javascript 2-way binding:
http://www.sellarafaeli.com/blog/native_javascript_data_binding?utm_source=javascriptweekly&utm_medium=email

P.S. To be honest, I'm not even excited about angular 2. Even though it breaks the compatibility with 1.3, you would assume it should be really a lot better than 1.3, but reading about it doesn't get me positive about it at all.

No comments:

Post a Comment