CoffeeScript Programming with jQuery, Rails, and Node.js
Formats:
save 15%!
save 33%!
Free Shipping!
| Also available on: |
|
- 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
Book Details
Language : EnglishPaperback : 140 pages [ 235mm x 191mm ]
Release Date : December 2012
ISBN : 1849519587
ISBN 13 : 9781849519588
Author(s) : Michael Erasmus
Topics and Technologies : All Books, Open Source
Table of Contents
PrefaceChapter 1: Why CoffeeScript?
Chapter 2: Running CoffeeScript
Chapter 3: CoffeeScript and jQuery
Chapter 4: CoffeeScript and Rails
Chapter 5: CoffeeScript and Node.js
Index
- Chapter 1: Why CoffeeScript?
- CoffeeScript syntax
- Semicolons and braces
- Whitespace
- Parenthesis
- CoffeeScript has great function syntax
- Return isn't required
- Function arguments
- Where did the var keyword go?
- CoffeeScript handles scope better
- Top level var keywords
- CoffeeScript has better object syntax
- Inheritance
- Overwhelmed?
- Extending prototypes
- A few other things CoffeeScript fixes
- Reserved words and object syntax
- String concatenation
- Equality
- The existential operator
- List comprehensions
- The while loop
- 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
- Using the Apple installer
- Using Homebrew
- Installing CoffeeScript with npm
- Installing CoffeeScript on Linux
- Ubuntu and MintOS
- Debian
- Other distributions
- Installing CoffeeScript with npm
- Building Node.js from source
- Building on Linux or Unix
- Building on Windows
- Using CoffeeScript
- The coffee command
- The REPL
- Running .coffee files
- Compiling to JavaScript
- Watching
- Putting it all together
- Summary
- Chapter 3: CoffeeScript and jQuery
- Finding and changing elements
- The $ function
- Utility functions
- Ajax methods
- Using jQuery
- Using CoffeeScript and jQuery in the browser
- Compiling CoffeeScript
- jQuery and CoffeeScript
- Testing it all
- Running a local web server
- Our application
- TodoMVC
- Our initial HTML
- Initializing our app
- Adding a to-do item
- Using localStorage
- Displaying the to-do items
- Showing the to-do items
- Removing and completing items
- Now, it's your turn!
- Summary
- Chapter 4: CoffeeScript and Rails
- What makes Rails special?
- Convention over configuration
- Don't repeat yourself (DRY)
- Rails and JavaScript
- Rails and CoffeeScript
- Installing Rails
- Installing Rails using RailsInstaller
- Installing Rails using RVM
- Got Rails installed?
- Developing our Rails application
- MVC
- Running our application
- Our todo_items resource
- routes.rb
- The controller
- The view
- The CSS
- Our model
- Migrations
- The Rails console
- Displaying the items in our view using ERB
- Creating a partial
- Adding new items
- Let's try and add a to-do item
- Adding a CoffeeScript view
- CoffeeScript in the asset pipeline
- Completing the to-do items
- Removing tasks
- Now, it's your turn
- 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
- package.json
- Installing our modules
- Creating our app
- Running our application
- Creating a view
- node-supervisor
- The to-do list view
- Middleware
- Our stylesheet
- The client side
- Adding collaboration
- Creating the collaboration UI
- WebSocket on the client
- WebSocket on the server
- Joining a list
- The UI
- Leaving a list
- Testing it all
- Adding to-do items to a shared list
- Removing to-do items from a shared list
- Now, it's your turn
- Summary
Michael Erasmus
Code Downloads
Download the code and support files for this book.
Submit Errata
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Sorry, there are currently no downloads available for this title.
- 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
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.
It’s a quick guide for programming CoffeeScript and then diving into programming with Rails, jQuery, and Node.js.
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.

