CoffeeScript Application Development

What JavaScript user wouldn’t want to be able to dramatically reduce application development time? This book will teach you the clean, elegant CoffeeScript language and show you how to build stunning applications.

CoffeeScript Application Development

Starting
Ian Young

What JavaScript user wouldn’t want to be able to dramatically reduce application development time? This book will teach you the clean, elegant CoffeeScript language and show you how to build stunning applications.
$26.99
$44.99
RRP $26.99
RRP $44.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781782162667
Paperback258 pages

About This Book

  • Learn the ins and outs of the CoffeeScript language, and understand how the transformation happens behind the scenes
  • Use practical examples to put your new skills to work towards building a functional web application, written entirely in CoffeeScript
  • Understand the language concepts from short, easy-to-understand examples which can be practised by applying them to your ongoing project

Who This Book Is For

If you are a JavaScript developer who wants to save time and add power to your code, then this is the book that will help you do it. With minimal fuss you will learn a whole new language which will reduce your application development time from weeks to days.

Table of Contents

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
Summary
Chapter 3: Building a Simple Application
Building our application
String Interpolation
Defining functions
Adding dynamic behavior to our application
Switch statements
Summary
Chapter 4: Improving Our Application
Checking if a value exists
Assigning multiple values at once
Advanced function arguments
Summary
Chapter 5: Classes in CoffeeScript
Defining a class in CoffeeScript
Constructors
Calling methods statically on classes
Inheritance
Using CoffeeScript with other class libraries
Summary
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
Summary
Chapter 7: Advanced CoffeeScript Usage
Getting our context right
Saving our work with memoization
A new idiom: options objects
Summary
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
Summary
Chapter 9: Debugging
Discovering a problem
Working with source maps
Fixing the problem
Summary
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
Summary
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
Summary

What You Will Learn

  • Write CoffeeScript everywhere, and compile it to JavaScript that can run anywhere
  • Discover techniques to manage a complicated codebase and ever-changing requirements
  • Drop the semicolons with CoffeeScript's clean, powerful syntax
  • Build for loops, if statements, and functions without all the extra keystrokes
  • Keep your code clean and organized with classes and inheritance
  • Use advanced CoffeeScript idioms to deal with the needs of a growing application
  • Debug effectively with source maps
  • Integrate CoffeeScript into your project seamlessly with Rails, Brunch, and other web frameworks
  • Utilize CoffeeScript for server-side software with Node.js

In Detail

JavaScript is becoming one of the key languages in web development. It is now more important than ever across a growing list of platforms. CoffeeScript puts the fun back into JavaScript programming with elegant syntax and powerful features.

CoffeeScript Application Development will give you an in-depth look at the CoffeeScript language, all while building a working web application. Along the way, you'll see all the great features CoffeeScript has to offer, and learn how to use them to deal with real problems like sprawling codebases, incomplete data, and asynchronous web requests.

Through the course of this book you will learn the CoffeeScript syntax and see it demonstrated with simple examples. As you go, you'll put your new skills into practice by building a web application, piece by piece. You'll start with standard language features such as loops, functions, and string manipulation. Then, we’ll delve into advanced features like classes and inheritance. Learn advanced idioms to deal with common occurrences like external web requests, and hone your technique for development tasks like debugging and refactoring.

CoffeeScript Application Development will teach you not only how to write CoffeeScript, but also how to build solid applications that run smoothly and are a pleasure to maintain.

Authors

Table of Contents

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
Summary
Chapter 3: Building a Simple Application
Building our application
String Interpolation
Defining functions
Adding dynamic behavior to our application
Switch statements
Summary
Chapter 4: Improving Our Application
Checking if a value exists
Assigning multiple values at once
Advanced function arguments
Summary
Chapter 5: Classes in CoffeeScript
Defining a class in CoffeeScript
Constructors
Calling methods statically on classes
Inheritance
Using CoffeeScript with other class libraries
Summary
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
Summary
Chapter 7: Advanced CoffeeScript Usage
Getting our context right
Saving our work with memoization
A new idiom: options objects
Summary
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
Summary
Chapter 9: Debugging
Discovering a problem
Working with source maps
Fixing the problem
Summary
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
Summary
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
Summary

Book Details

ISBN 139781782162667
Paperback258 pages
Read More