Web Apps
53.6K views | +0 today
Follow
Web Apps
...JavaScript is awesome !
Your new post is loading...
Your new post is loading...
Rescooped by Srdjan Strbanovic from JavaScript for Line of Business Applications
Scoop.it!

Data-binding Revolutions with Object.observe()

Data-binding Revolutions with Object.observe() | Web Apps | Scoop.it

Object.observe(), part of a future ECMAScript standard, is a method for asynchronously observing changes to JavaScript objects...without the need for a separate library. It allows an observer to receive a time-ordered sequence of change records which describe the set of changes which took place to a set of observed objects.

With Object.observe() you can implement two-way data-binding without the need for a framework.

That’s not to say you shouldn’t use one. For large projects with complicated business logic, opinionated frameworks are invaluable and you should continue to use them. They simplify the orientation of new developers, require less code maintainance and impose patterns on how to achieve common tasks.



Via Jan Hesse
No comment yet.
Rescooped by Srdjan Strbanovic from JavaScript for Line of Business Applications
Scoop.it!

Exploring JavaScript prototypes via TypeScript’s class pattern

Exploring JavaScript prototypes via TypeScript’s class pattern | Web Apps | Scoop.it

In this post, I’m going to take a close look at how JavaScript’s prototypal inheritance works by analysing how Microsoft’s TypeScript language uses it to provide a simple implementation of classes. Don’t worry if you’ve never used TypeScript, we’re not really concerned with the language itself here, just the JavaScript that is produced by its compiler, and how it achieves class-based inheritance in a language that doesn’t natively support it.

This is of particular importance because EcmaScript 6 will include classes that work a lot like TypeScript’s. The idea of adding classes to JavaScript is controversial, but I think some of the hostility stems from a mistaken belief that classes are some kind of competing inheritance mechanism to prototyping, or are an attempt to turn JavaScript into Java. In fact, modern proposals for classes in JavaScript are just a syntactic codification of prototypal inheritance patterns that are already in use.


Via Jan Hesse
No comment yet.