About This Title

Pages: 122
Published: February 2015
ISBN: 9781941222263
In Print

Skill Level Meter

CoffeeScript

Accelerated JavaScript Development, Second Edition

by Trevor Burnham

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.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $22.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal


Paperback Formats:

Please support indie bookstores!
Find indie bookstores in the U.S. Find indie bookstores around the world.


This new edition has been extensively revised and updated to reflect the current state and features of CoffeeScript. Every chapter has been revised and refactored, and new sections and a new chapter on testing have been added. If you already know JavaScript, this book will make your transition to CoffeeScript easy. If you’re new to JavaScript, it’s a great place to start.

New in this edition:

  • Automating setup with the Grunt task runner
  • Using CoffeeScript classes with the Backbone framework
  • Using CoffeeScript’s simple callback syntax to interact with the Express framework
  • A new chapter on client-side and server-side testing with Intern
  • A new project that gives you hands-on experience with browser-side and server-side CoffeeScript

CoffeeScript is every bit as portable and effective as JavaScript. It aids development by adding a bevy of features, such as classes, splats, list comprehensions, and destructuring. These features make it easier to write clear, readable code, and by learning how these features work, you’ll deepen your understanding of JavaScript as well. This book is your complete guide to writing better JavaScript code, faster.

Top 5 Ways the CoffeeScript World Has Evolved by Trevor Burnham

1. Source maps! This long-awaited feature allows stack traces to reference the original CoffeeScript source code, rather than the compiled JavaScript. This makes debugging much easier, breaking down the barrier between “pure” JavaScript and machine-made JavaScript.

2. Next-generation build tools. Grunt and its ilk make it much easier to manage complex project toolchains with scripts for compiling, minifying, and running code during development. That’s great news for CoffeeScripters working outside of Rails.

3. The spread of Node. When the first edition of the book came out, Windows users had to use an emulated Linux environment like Cygwin to use Node-based CoffeeScript tools. Node has come a long way since then. You probably already have it on your machine, and if you don’t, it’s a breeze to install.

4. A mature community. Top-tier tech companies like 37signals and GitHub use CoffeeScript production, and the style of CoffeeScript code has become more standardized as a result. Plus, it’s easy to find help on Stack Overflow.

5. ECMAScript 6. Many of CoffeeScript’s features (shorthand function syntax, classes, destructuring…) have been embraced and adopted as part of the next generation of JavaScript. The ES6 standard hasn’t yet been ratified, so CoffeeScript allows you to enjoy the future of JavaScript, today!

What You Need

Some prior experience with object-oriented programming in a language such as Ruby, Python, or JavaScript is strongly recommended.

Resources

Releases:

  • P1.0 2015/02/17
  • B3.0 2015/01/22
  • B2.0 2014/12/11
  • B1.0 2014/10/07

Contents & Extracts

  • Getting Started
    • Installing CoffeeScript
    • Running and Compiling CoffeeScript
    • Editing CoffeeScript
  • Functions, Scope, and Context
    • Functions 101
    • Variable Scope
    • Execution Context
    • Mini-Project: Checkbook Balancer
    • Wow! Such Function! So Coffee!
  • Collections, Iteration, and Destructuring
  • Classes, Prototypes, and Inheritance
    • The Power of Prototypes
    • Classes: Giving Prototypes Structure
    • Inheritance: Classy Prototype Chains
    • Mini-Project: All-Purpose Checkbook Balancer
    • Just a Spoonful of Sugar
  • Web Applications with jQuery and Backbone.js
    • Building Our Project with Grunt
    • Managing Front-End Dependencies with Bower
    • Building the Page with Templates
    • Structuring Data for Persistence
    • Representing Data in Backbone Models and Collections
    • Presenting Data with Views
    • Finishing Touches
    • Tasks that last
  • Web Servers with Node and Express
    • What Is Node? excerpt
    • Writing Node modules
    • Compiling a Node project with Grunt
    • Creating a web server with Express and NeDB
    • Using a RESTful API in Backbone
    • A brief encounter with Node

Author

Trevor Burnham is a full-stack web developer living in Cambridge, MA. You can reach him on Twitter, where he goes by TrevorBurnham and CoffeeScript.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $22.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal


Paperback Formats:

Please support indie bookstores!
Find indie bookstores in the U.S. Find indie bookstores around the world.

Related Titles:

Skill Level Meter

About This Title

Pages: 122
Published: February 2015
ISBN: 9781941222263
Edition: 1
In Print