JSFoo 2012
It’s like kung fu with JavaScript and objects! All about building full size apps in JavaScript.
Oct 2012
15 Mon
16 Tue
17 Wed
18 Thu
19 Fri 11:30 AM – 05:45 PM IST
20 Sat 11:30 AM – 05:15 PM IST
21 Sun
It’s like kung fu with JavaScript and objects! All about building full size apps in JavaScript.
Oct 2012
15 Mon
16 Tue
17 Wed
18 Thu
19 Fri 11:30 AM – 05:45 PM IST
20 Sat 11:30 AM – 05:15 PM IST
21 Sun
Yuvi Panda
@yuvipanda
Submitted Aug 19, 2012
Tired of writing JS with so many nested callbacks that it looks like the Gaza Pyramid turned sideways? Thought you’ll never have to write synchronization code again but suddenly find yourself wanting to wait
on 5 callbacks to return before you want to execute something? Hate having to add ugly boilerplate everywhere if you ever want to chain callbacks? Miss the return
statement? Think your code looks ugly because it has way too many levels of indentation?
Start using Deferreds and fix all these! Deferreds are a way of managing callbacks that is painless, elegant and powerful. Using deferreds makes your code cleaner, easier to understand and less error prone. And free ponies too!
Intermediate level of Javascript knowledge would be sufficient.
Yuvi Panda is a 21 year old open source geek who chases shiny new things way too often. He wrote major parts of the Wikipedia Android/iOS app (JS/Phonegap), and the upcoming Wiki Loves Monument app (also JS/PhoneGap). He was yearning for a threaded model in Javascript until he found Deferreds. Amongst his hobbies is screaming ‘USE DEFERREDS!’ at anyone claiming to use Javascript. He’s currently a student at KCG College of Technology.
Oct 2012
15 Mon
16 Tue
17 Wed
18 Thu
19 Fri 11:30 AM – 05:45 PM IST
20 Sat 11:30 AM – 05:15 PM IST
21 Sun
Hosted by
Login to leave a comment
Yuvi Panda
@yuvipanda Submitter
Deferreds basics, waiting on multiple deferreds, + transforming a few hairy callback hell snippets into deferred based ones wouldn't be enough?
Sunil Pai
@threepointone
I think it's just fine for half an hour, actually.
Aditya
@netroy
cool. :)
BTW, i didn't say it won't be enough. I just said it'd be a better talk if you do mention other control flow methods, so that the noobs don't walk out thinking the deferreds are holy grail for writing async code. I personally like callbacks sometimes, while caolan's async is awesome in certain cases.
Deferreds/Promises make great chainable APIs, but what if you had to do an asynchronous map, reduce or filter on an array of 5000 items ? creating 5000 deferred objects would work, but won't be a good idea.
I know I'm being a bit anal, but the talk is marked as Intermediate.
Cheers
Yuvi Panda
@yuvipanda Submitter
Ah, right. In that case, perhaps I should mark it as beginner. I'm unsure of the beginner-intermediate-advanced levels - it is possible that spending too much time telling people 'NO, it is not
inti
butint i
' has skewed my perspective.jaseem abid
Don't miss promises.
Aditya
@netroy
Cool.. but you might consider covering other control-flow methods for dealing with async code and comparing them to deferreds.
Deferreds alone for 30 minutes wouldn't make a good talk.
Trivia: Deferreds were introduced by Dojo back in 2006