I feel that D3 is probably better, for the obvious reason that it doesn't give two stones. However, there are more complicated considerations than just connecting.
I still suspect D3 was better, but here were my initial thoughts...
If black plays D3, white can play like this:
$$Bc
$$ - . . . . . . .
$$ - . . X . . . .
$$ - . . . . . . .
$$ - . . X . . O .
$$ - . . X O . O .
$$ - . . . . O . X
$$ - C C X . . . X
$$ - C C X O 2 . X
$$ - C C X 1 O 4 X
$$ - C C C . 3 O X
$$ - C C C C . 5 X
$$ ----------------
- Click Here To Show Diagram Code
[go]$$Bc
$$ - . . . . . . .
$$ - . . X . . . .
$$ - . . . . . . .
$$ - . . X . . O .
$$ - . . X O . O .
$$ - . . . . O . X
$$ - C C X . . . X
$$ - C C X O 2 . X
$$ - C C X 1 O 4 X
$$ - C C C . 3 O X
$$ - C C C C . 5 X
$$ ----------------[/go]
Now white can tenuki - black got some points, but there aren't a ton of points. If you count the marked intersections, that's 13 points.
Now, white has sente.If black plays as in the book and white does tenuki, then black can play here, and get many more points:
$$Bc
$$ - . . . . . . .
$$ - . . X . . . .
$$ - . . . . . . .
$$ - . . X . . O .
$$ - . . X O . O .
$$ - . . . . O . X
$$ - . . X . 3 . X
$$ - . . X O 1 . X
$$ - . . X . O . X
$$ - . . . . . O X
$$ - . . . . . . X
$$ ----------------
- Click Here To Show Diagram Code
[go]$$Bc
$$ - . . . . . . .
$$ - . . X . . . .
$$ - . . . . . . .
$$ - . . X . . O .
$$ - . . X O . O .
$$ - . . . . O . X
$$ - . . X . 3 . X
$$ - . . X O 1 . X
$$ - . . X . O . X
$$ - . . . . . O X
$$ - . . . . . . X
$$ ----------------[/go]
So I figured, the book solution was more sente than D3. But this logic doesn't hold, because as shown in the book variation, white can keep playing forcing moves to force black to connect:
$$Bc
$$ - . . . . . . .
$$ - . . X . . . .
$$ - . . . . . . .
$$ - . . X . . O .
$$ - . . X O . O .
$$ - . . . . O . X
$$ - . . X 4 3 6 X
$$ - . . X O 1 2 X
$$ - . . X 5 O 8 X
$$ - . . . . 7 O X
$$ - . . . . . 9 X
$$ ----------------
- Click Here To Show Diagram Code
[go]$$Bc
$$ - . . . . . . .
$$ - . . X . . . .
$$ - . . . . . . .
$$ - . . X . . O .
$$ - . . X O . O .
$$ - . . . . O . X
$$ - . . X 4 3 6 X
$$ - . . X O 1 2 X
$$ - . . X 5 O 8 X
$$ - . . . . 7 O X
$$ - . . . . . 9 X
$$ ----------------[/go]
After this, white still gets sente, and has more points.
So if we consider just the single move, D3 or E5, I feel that E5 is more of a sente move - white would be more inclined to answer it immediately if it's played. But if black really wants to connect these stones, the end position sequence in the book is worse for black than the end position I gave above where white gets sente.
So... I think D3 is better.