You are previewing CoffeeScript, 2nd Edition.
O'Reilly logo
CoffeeScript, 2nd Edition

Book Description

Over the last five years, CoffeeScript has taken the web development world by storm. With the humble motto "It's just JavaScript," CoffeeScript provides all the power of the JavaScript language in a friendly and elegant package. This extensively revised and updated new edition includes an all-new project to demonstrate CoffeeScript in action, both in the browser and on a Node.js server. There's no faster way to learn to write a modern web application.

Table of Contents

  1. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">&#160;</span>ForewordForeword
  2. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">&#160;</span>AcknowledgmentsAcknowledgments
  3. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">&#160;</span>IntroductionIntroduction
    1. The New Kid in Town
    2. Who This Book Is For
    3. How This Book Is Organized
    4. What’s Changed Since CoffeeScript 1.0.0?
    5. The CoffeeScript Community
  4. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">1. </span>Getting StartedGetting Started
    1. Installing CoffeeScript
    2. Running and Compiling CoffeeScript
    3. Using Source Maps
    4. Editing CoffeeScript
  5. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">2. </span>Functions, Scope, and ContextFunctions, Scope, and Context
    1. Functions 101
    2. Variable Scope
    3. Execution Context
    4. Mini-Project: Checkbook Balancer
  6. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">3. </span>Collections, Iteration, and DestructuringCollections, Iteration, and Destructuring
    1. Objects as Hash Maps
    2. Arrays
    3. Iterating over Collections
    4. Mini-Project: Refactored Checkbook Balancer
  7. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">4. </span>Classes, Prototypes, and InheritanceClasses, Prototypes, and Inheritance
    1. The Power of Prototypes
    2. Classes: Giving Prototypes Structure
    3. Inheritance: Classy Prototype Chains
    4. Mini-Project: All-Purpose Checkbook Balancer
  8. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">5. </span> Web Applications with jQuery and Backbone.js Web Applications with jQuery and Backbone.js
    1. Building the Project with Grunt
    2. Managing Front-End Dependencies with Bower
    3. Building the Page with Templates
    4. Structuring Data for Persistence
    5. Representing Data in Backbone Models and Collections
    6. Presenting Data with Views
  9. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">6. </span>Web Servers with Node and ExpressWeb Servers with Node and Express
    1. What Is Node?
    2. Writing Node Modules
    3. Compiling a Node Project with Grunt
    4. Creating a Web Server with Express and NeDB
    5. Using a RESTful API in Backbone
  10. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">7. </span>Testing with InternTesting with Intern
    1. Getting Started with Intern
    2. Mock-Testing Backbone with Sinon
    3. Mock-Testing a Node Server with Supertest
  11. <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">&#160;</span>BibliographyBibliography