JSFoo 2014

JavaScript as the centerpiece of a complex web stack

Object.observe -- Native data binding in javascript

Submitted by Bhargava Srinarasi (@srinarasi) on Monday, 30 June 2014

videocam_off

Technical level

Intermediate

Section

Crisp talk

Status

Submitted

Vote on this proposal

Login to vote

Total votes:  +5

Objective

We have been using MV* frameworks to get notifications when a javascript object is updated in our webapp. But they came with either of the two disadvantages.
1. Polling for change which wasted significant amount of processing cycles.
2. Having to use the containers specified by the framework to store our objects.

We now have a native JS way to achieve this in a way that lets us have the best of both worlds.

Description

When we are building a Webapp, we almost always need a mechanism to detect changes to objects that we care about so that we can process the changes. Until now, we had to depend on some frameworks which were doing some form of dirtychecking to implement this functionality. Now, we have an efficient, native way to do it.

In the session, we'll talk a bit about how we use frameworks like Backbone, Ember and Angular to achieve data binding. We'll talk about the disadvantages with each of them. We'll then talk about the new Object.observe and it's advantages. Finally we'll go through a few examples and benchmarks.

Requirements

Experience of using any MV* Framework

Speaker bio

A member of Adobe Dreamweaver Development team, Bhargava has been working at Adobe for more than 6 years. His interests include web development, data analysis, data visualization and building tools to help others with the same. He has contributed to open source IDEs like Brackets. He likes talking about himself in third person.

Comments

Login with Twitter or Google to leave a comment