JSFoo 2014

JavaScript as the centerpiece of a complex web stack

Selvakumar Natesan

@selvakn

Untangling evented code with (ECMAScript 6) Generators

Submitted May 16, 2014

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.

Outline

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

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

JSFoo is a forum for discussing UI engineering; fullstack development; web applications engineering, performance, security and design; accessibility; and latest developments in #JavaScript. Follow JSFoo on Twitter more