Free Sample
+ Collection

CoffeeScript Programming with jQuery, Rails, and Node.js

Starting
Michael Erasmus

Get more fun and productivity out of your web development by learning CoffeeScript. This book is the perfect primer that takes you from language basics to creating responsive applications. Enjoy.
$14.99
$29.99
RRP $14.99
RRP $29.99
eBook
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 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 139781849519588
Paperback140 pages

About This Book

  • Learn CoffeeScript, a small and elegant language that compiles to JavaScript and will make your life as a web developer better
  • Explore the syntax of the language and see how it improves and enhances JavaScript
  • Build three example applications in CoffeeScript step by step

Who This Book Is For

This book is for web developers who would like to learn programming with CoffeScript. It is also for developers who have some experience in JavaScript and are curious to learn CoffeScript and build applications with it.

Table of Contents

Chapter 1: Why CoffeeScript?
CoffeeScript syntax
CoffeeScript has great function syntax
CoffeeScript handles scope better
CoffeeScript has better object syntax
A few other things CoffeeScript fixes
List comprehensions
Conditional clauses and logical aliases
Array slicing and splicing
Destructuring or pattern matching
=> and @
Switch statements
Chained comparisons
Block strings, block comments, and strings
Summary
Chapter 2: Running CoffeeScript
The CoffeeScript stack
Node.js and npm
Node.js, npm, and CoffeeScript on Windows
Installing CoffeeScript on a Mac
Installing CoffeeScript on Linux
Building Node.js from source
Using CoffeeScript
The coffee command
Summary
Chapter 3: CoffeeScript and jQuery
Finding and changing elements
Utility functions
Ajax methods
Using jQuery
Using CoffeeScript and jQuery in the browser
Our application
Summary
Chapter 4: CoffeeScript and Rails
What makes Rails special?
Rails and JavaScript
Rails and CoffeeScript
Installing Rails
Developing our Rails application
Summary
Chapter 5: CoffeeScript and Node.js
Node is event-driven
Node is fast and scalable
Node is not Rails
Node and CoffeeScript
"Hello World" in Node
Express
WebSocket
Jade
Our application
Let's get started
Creating a view
node-supervisor
The to-do list view
The client side
Adding collaboration
Creating the collaboration UI
WebSocket on the client
WebSocket on the server
Joining a list
Adding to-do items to a shared list
Removing to-do items from a shared list
Summary

What You Will Learn

  • The basics of the language and how it compares to JavaScript
  • CoffeeScript’s powerful class syntax
  • Installing CoffeeScript on Windows, Mac OSX, and Linux using Node.js
  • Configuring CoffeeScript for browser applications
  • The basics of jQuery and using it with CoffeeScript
  • Using localStorage in browser-based applications
  • Two approaches to write CoffeeScript in Rails applications
  • Creating responsive web applications using WebSocket

In Detail

CoffeeScript is a young but popular language that makes web programming fun and more productive. It compiles to JavaScript and unleashes its powerful features while not straying too far from the language. It’s become one of the most popular languages on Github and is being used for both browser and server side programming.

"CoffeeScript programming with jQuery, Rails, and Node.js" will not only teach you the CoffeeScript language but also show you how it’s being used by professional programmers with the latest web technologies.

This book will teach you the basics of the language, focusing particularly on how it improves on JavaScript. It then focuses on building real life projects in CoffeeScript using jQuery, Rails, and Node.js.

We look at CoffeeScript as a language that takes the power of JavaScript and presents it in an elegant and concise syntax. We will then see how we can use its power to write beautiful and short programs for various environments and how it complements the latest and greatest web frameworks.

CoffeeScript programming with jQuery, Rails, and Node.js is all you need to become well versed with this great language and set you on your way to using it to write web applications.

Authors

Read More