- We design and build extraordinary applications for companies looking to make the next great idea a reality.
- learn more
>Nice Post on Continuations in Javascript
Continuations are one of the more confusing aspects of programming languages. For those languages that do implement it, such as Ruby and Scheme, it is one of their darker and more confusing corners, waiting to catch the novice developer with inscrutable code. I blogged a while back about Narrative Javascript, a preprocessor that lets you transform your complex, long running Javascript code into cooperative multitasking elegance; Narrative Javascript did the continuation dance under the covers. For those of you who want to understand continuations, what they are, how they work and how they can be implemented in any language that has closures, check out this post, entitled Continuation-Passing Style and why JavaScript developers might be interested in it, from Marijn Haverbeke. It's a very approachable explanation of continuations in Javascript (or, if you want something a little more general, check out Continuations for Curmudgeons, and equally entertaining romp through that dark corner).
Why should you care about continuations? Because, like it or not, it is one of the things you can do in JavaScript and, given that as the complexity of client-side code increases, you may want to have some long running tasks on the browser. You can't always use a framework like Narrative Javascript or jwacs (see below), so sometime you may have to roll your own.
P.S. For another system similar to Narrative Javascript, check out jwacs (Javascript with advanced continuation support).
Technorati Tags: ajax, continuations
Topics: Javascript
Leave a comment
About Pathfinder
Recent
- Pimp my jQuery: Five plugins to replace the features Prototype and Scriptaculous users expect
- Thanksgiving 2008: What We’re Thankful For (In Rails)
- iPhone SDK: Testing with TextMate & GTM
- GWTQuery - JQuery-like Syntax in GWT
- Ask the readers: How do I fire native browser events in Prototype.js?
- News Rollup for the Week of November 17, 2008
- Rails ThreatDown!
- Automated Deployments Rock
- Bandwidth profiling Flex projects and more with Charles
- iPhone SDK: UIViewController Testing & TDD
Archives
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006

