Permalink
Browse files

sections

  • Loading branch information...
1 parent e1d8cf3 commit 38872bf3f3656ec17421b4a05f778484fb457b51 @swannodette swannodette committed Nov 16, 2009
Showing with 7 additions and 1 deletion.
  1. +7 −1 readme.textile
View
8 readme.textile
@@ -110,6 +110,8 @@ Compare this to the example above where the order of JavaScript
function argument evaluation ensures the proper order and no
accumulator via a closure is required.
+h1. Traditional AJAX requests don't compose
+
For a second example let's examine something a little more
sophisticated, this time let's consider how we would like to write the
program logic- that is, not in terms of requests. Assuming *get* and *add*
@@ -172,7 +174,9 @@ Hmm...
Now that we understand the problem space, how does one go about
solving this? Is it just impossible for requests to be written in such a
-way that we can compose them?
+way that we can compose them?
+
+h1. A JavaScript-y Solution
While there have been several attempts to do such a thing many of the
solutions require the programmer to adopt a library that is painfully
@@ -223,6 +227,8 @@ decorator called *promise* that does a few interesting things:
functions with non-Promise arguments and they will work just fine!
# Reread 3. This means you can sanely unit test AJAX code!
+h1. A Silly Example
+
Enough talk, here's an example:
<pre>

0 comments on commit 38872bf

Please sign in to comment.