更新时间:2021-04-09 23:58:52
coverpage
CoffeeScript Application Development
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Free Access for Packt account holders
Preface
What is CoffeeScript?
Why CoffeeScript?
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. Running a CoffeeScript Program
Installing Node.js
Using the installer
Testing our Node installation
Installing CoffeeScript
Our very first CoffeeScript code
Compiling from a CoffeeScript file
CoffeeScript support in the editor
Starting our web application
Summary
Chapter 2. Writing Your First Lines of CoffeeScript
Following along with the examples
CoffeeScript basics
Calling functions
Control structures
Comparison operators
Arrays
Simple objects
Chapter 3. Building a Simple Application
Building our application
String Interpolation
Defining functions
Adding dynamic behavior to our application
Switch statements
Chapter 4. Improving Our Application
Checking if a value exists
Assigning multiple values at once
Advanced function arguments
Chapter 5. Classes in CoffeeScript
Defining a class in CoffeeScript
Constructors
Calling methods statically on classes
Inheritance
Using CoffeeScript with other class libraries
Chapter 6. Refactoring with Classes
The refactoring cycle
Structuring our data with classes
Managing display logic with classes
A final refactoring pass
Using inheritance while refactoring
Getting the green light
Chapter 7. Advanced CoffeeScript Usage
Getting our context right
Saving our work with memoization
A new idiom: options objects
Chapter 8. Going Asynchronous
Understanding asynchronous operations
Getting to know our remote API
Making an asynchronous request
Using a third-party library
Wrangling multiple asynchronous calls
Alternatives for managing asynchronous calls
Chapter 9. Debugging
Discovering a problem
Working with source maps
Fixing the problem
Chapter 10. Using CoffeeScript in More Places
CoffeeScript directly in the browser
CoffeeScript in the browser console
Using CoffeeScript with Rails
Using CoffeeScript with Brunch
Using CoffeeScript with Node.js
Chapter 11. CoffeeScript on the Server
Running a server with CoffeeScript
Adding an endpoint for data
Using a database
Using a Cakefile
Making our application interactive
Index