- 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
- Selling Git on the Business End
- IE8 Beta 2 Released
- Faster JavaScript for Firefox 3.1 Thru JIT
- Implementing linked multiselects with jQuery, LiveQuery, and Low Pro: Part 2: First pass at the actual code
- I’m Cranky Because I’m Not Getting Enough REST
- Flex Gauge Component Example with source
- Plugging Some Cool Tools
- Implementing linked multiselects with jQuery, LiveQuery, and Low Pro: Part 1: Requirements and interaction design
- Many Varied Components, or… Multi Variable Complexity, or… Mainly Vanilla Coding
- Custom Flex 3 Lightweight Preloader with source code
Archives
- 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

