03.03.2015 Views

First Demo Flip Book

This is my First Demo Flip Book

This is my First Demo Flip Book

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Contents<br />

Foreword from Derick Bailey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i<br />

Who This <strong>Book</strong> is For . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<br />

ii<br />

Following Along with Git . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii<br />

Jumping in for Advanced Readers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv<br />

Setting Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1<br />

Asset Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1<br />

Getting Our Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2<br />

Displaying a Static View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5<br />

Dynamically Specifying a View Template . . . . . . . . . . . . . . . . . . . . . . . . . . . 10<br />

Specifying Other View Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12<br />

Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />

Displaying a Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br />

Using Model Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

Introducing Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br />

Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />

Displaying a Collection of Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21<br />

Introducing the CollectionView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21<br />

Listing our Contacts with a CollectionView . . . . . . . . . . . . . . . . . . . . . . . . . . 22<br />

Sorting a Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29<br />

Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30<br />

Chapters not in Sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32<br />

Implementing Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33<br />

How to Think About Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33<br />

Adding a Router to ContactsApp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34<br />

Routing Helpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38<br />

DRYing up Routing with Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41<br />

Adding a Show Route . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42<br />

Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!