JSFoo 2014

JavaScript as the centerpiece of a complex web stack

Untangling evented code with (ECMAScript 6) Generators

Submitted by Selvakumar Natesan (@selvakn) on Thursday, 15 May 2014

Section: Full talk Technical level: Intermediate

Vote on this proposal

Login to vote

Total votes:  +8


Understand new concepts like iterators, generators, the yield keyword in ECMAScript 6. And how they can be used to write async code, but without any form of callbacks including promises.

Also, understand how they are leveraged in libraries like co, koa and other koa middlewares, using which complex node applications including webapp/api development is much cleaner and simpler.


We always had the tension of managing 'the callback hell' in every mid to large sized JavaScript apps. But not anymore!. Time to untangle all those complicated, hard to follow nested callbacks.

ECMAScript 6 has arrived with a lot of features, including iterators, generators, brand new yield keyword.
And generators with yield is a great way to avoid the nesting and callbacks.

In this talk, I shall cover what exactly iterators and generators are, where and how can be they used, along with detailed examples (in REPL). Followed by deep dive into co, thunks and the koa framwork, which is the successor of express framework(for writing webapps and apis) and related ecosystem.

Speaker bio

A full stack Developer,
who has developed wide range of application in various web and mobile techologies including Ruby/Rails, JavaScript, Java, Android, iOS, Scala,
who belives strongly in contributing to community as the greatest way of learning,
And works @ Thoughtworks for the last 6 years.

Contributes to OSS @ github.com/selvakn


Login with Twitter or Google to leave a comment