Mike Hatfield's CoffeeScript Application Development Cookbook (Packt Publishing, March 2015) has the subtitle, "Over 90 hands-on recipes to help you develop engaging applications using CoffeeScript." This book on CoffeeScript features eleven chapters spanning approximately 340 substantive pages. As its title suggests, this is a "cookbook" style of book. Its recipes begin by covering introductory items and then move into more specific and more involved CoffeeScript uses.
The "What you need for this book" section of the Preface states, "To use the code in this book, you will need a code editor of your choice, a web browser, and an Internet connection to download Node packages and other libraries or frameworks." The "Who this book is for" section states, "If you enjoy developing applications that can be run on desktop, tablet, and mobile devices without needing to learn platform-specific languages, this is the book for you."
Chapter 1: Getting Ready
The chapter's (and book's) first recipe discusses downloading and installing the tools used in a CoffeeScript development environment including Node.js, CoffeeScript via Node Package Manager (npm) and the -g option, and editors/IDEs Sublime Text (Better CoffeeScript) and Visual Studio (Web Essentials).
Chapter 2: Starting with the Basics
Although the first chapter introduced some syntax and concepts of CoffeeScript, it's Chapter 2 that provides a more comprehensive introduction to CoffeeScript syntax and language. The chapter introduces CoffeeScript's Ruby-like (and Groovy like) string interpolation, Groovy-like multi-line strings ("block strings") with three double quotes, overriding toString() in CoffeeScript for an object's default coercion value, regular expressions, and other text/String manipulation.
=>) to deal with
Chapter 3: Creating Client Applications
Chapter 4: Using Kendo UI for Desktop and Mobile Applications
Chapter 5: Going Native with Cordova
CoffeeScript Application Development Cookbook's fifth chapter introduces Apache Cordova, which it defines as "a framework ... that allows you to wrap your web applications inside a native wrapper that can be packaged and made available via the various app marketplaces." It adds that "Cordova currently supports iOS, Android, Blackberry, Windows Phone, and FireFoxOS." Recipes in this chapter cover downloading Cordova via
npm, creating a mobile application from Cordova's command-line tool, and using Cordova to access the device's camera, geolocation, contacts, and device information.
Chapter 6: Working with Databases
The sixth chapter of CoffeeScript Application Development Cookbook "how to use CoffeeScript to perform common create, read, update, and delete (CRUD) operations" against datastores SQLite, Redis, MongoDB, and CouchDB. The chapter's recipes focus on performance of CRUD operations against these various types of datastores from CoffeeScript.
Chapter 7: Building Application Services
The recipes of Chapter 7 describe using "CoffeeScript to perform common Internet-related tasks and create RESTful services to be used by our applications." These recipes cover things such as encoding and decoding "binary and base64-encoded files" (atob, btoa, fs), working with domain name services (dns) and IP addresses, parsing URLs (url), creating RESTful web services (express.js), and creating package configuration files with npm init. The chapter also introduces the Chrome extension Postman.
Chapter 8: Using External Services
Chapter 8's recipes focus on how to use third-party services such as Amazon S3, Twilio, GeoNames, email, and FTP in CoffeeScript applications. The chapter also introduces REST Client for Node.js, nodemailer, and, node-ftp.
Chapter 9: Testing Our Applications
Chapter 9 of CoffeeScript Application Development Cookbook describes "various methods of testing our CoffeeScript applications using a variety of techniques and libraries" such as QUnit, Mocha, Zombie.js, Sinon.js, Bower package manager, and live-server. As the recipes are presented, common testing concepts are discussed such as test-driven development and test doubles. This chapter presents numerous screen snapshots to illustrate test results in the browser and console.
Chapter 10: Hosting Our Web Application
Chapter 11: Scripting for DevOps
The final chapter of CoffeeScript Application Development Cookbook looks at "ways that DevOps can use CoffeeScript to perform some common tasks." Recipes in this chapter demonstrate application of child_process.exec() and child_process.spawn for executing shell commands from CoffeeScript, manipulating files in CoffeeScript with node's fs and fs-extra modules, archiving files and directories with archiver, parsing command-separated values files with node-csv, parsing fixed-width text files with moment.js and accounting.js, formatting dates with moment.js, formatting numbers with accounting.js, and padding and aligning output.
- As described in this review, CoffeeScript Application Development Cookbook covers a wide spectrum of technologies and concepts associated with CoffeeScript in addition to introducing and covering CoffeeScript itself.
- Chapters 1, 2, 9, and 11 are the most CoffeeScript focused (though even some of them cover related technologies) and the remaining chapters emphasize related libraries and frameworks, what they are, and how they can be used from CoffeeScript code.
- Debugging and unit testing of CoffeeScript code are covered in this book along with other CoffeeScript development topics.
- The screen snapshots in CoffeeScript Application Development Cookbook are generally clear and illustrate well what's being described.
- The text of CoffeeScript Application Development Cookbook is easy to read and generally flows well. There are some typos, but I never found any of them to prevent me from understanding what was being conveyed.
- The code listings are generally short enough to be readable and focus on the point being made. These listings are black text on white background with no color syntax and no line numbers.